dotfiles/sericea/.config/sway/config

151 lines
5.5 KiB
Plaintext
Raw Normal View History

2021-02-05 09:09:36 -06:00
#
# Salt's Sway configuration file
# Licensed under the terms of the MIT License
#
2024-04-17 01:27:21 -05:00
## CONFIGS
2024-02-12 18:34:26 -06:00
set $term foot
2021-02-05 09:09:36 -06:00
# Set modifiers
set $mod Mod1
set $sup Mod4
set $ctl Ctrl
set $shift Shift
# Use Mouse+$mod to drag floating windows to their wanted position
floating_modifier $mod
# Program opening and closing
2024-02-12 18:34:26 -06:00
bindsym $mod+Return exec "$term"
2021-02-05 09:09:36 -06:00
bindsym $mod+q kill
bindsym $mod+space exec "rofi -show drun"
bindsym $mod+backslash exec "rofi -show ssh"
bindsym $mod+Tab exec "rofi -show window"
2024-02-12 19:18:31 -06:00
# Dunst management
bindsym $mod+$shift+space exec dunstctl close
bindsym $mod+$shift+Return exec dunstctl close-all
bindsym $mod+$shift+d exec dunstctl history-pop
bindsym $mod+$shift+o exec dunstctl context
2021-02-05 09:09:36 -06:00
# Pulse controls
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound
# Screenshots
bindsym $mod+o exec grim -g "$(slurp -d)" - | wl-copy
2021-02-05 09:09:36 -06:00
# Brightness controls
#bindsym XF86MonBrightnessUp exec xbacklight -inc 5 # increase screen brightness
#bindsym XF86MonBrightnessDown exec xbacklight -dec 5 # decrease screen brightness
2024-04-17 01:27:21 -05:00
# pavucontrol controls
bindsym $mod+p exec --no-startup-id "pgrep pavucontrol || pavucontrol"
bindsym $mod+$shift+p exec --no-startup-id "pkill pavucontrol"
2021-02-05 09:09:36 -06:00
# Miscellaneous non-movement hotkeys
2024-02-12 19:22:46 -06:00
bindsym $ctl+$mod+l exec --no-startup-id "loginctl lock-session"
2021-02-05 09:09:36 -06:00
bindsym $mod+$shift+c reload
2024-04-17 01:27:21 -05:00
# Change focus
2021-02-05 09:09:36 -06:00
bindsym $mod+h focus left
bindsym $mod+j focus down
bindsym $mod+k focus up
bindsym $mod+l focus right
2024-04-17 01:27:21 -05:00
# Move the focused window around
2021-02-05 09:09:36 -06:00
bindsym $mod+$shift+h move left
bindsym $mod+$shift+j move down
bindsym $mod+$shift+k move up
bindsym $mod+$shift+l move right
2024-04-17 01:27:21 -05:00
# Move the focused workspace between monitors
# Disabled here because I like having workspaces allocated to certain outputs
#bindsym $sup+h move workspace to output left
#bindsym $sup+j move workspace to output down
#bindsym $sup+k move workspace to output up
#bindsym $sup+l move workspace to output right
# Configure the split of this container
2021-02-05 09:09:36 -06:00
bindsym $mod+semicolon split h
bindsym $mod+v split v
2024-04-17 01:27:21 -05:00
# Toggle floating
2021-02-05 09:09:36 -06:00
bindsym $mod+f floating toggle
2024-04-17 01:27:21 -05:00
# Fullscreen
2021-02-05 09:09:36 -06:00
bindsym $mod+$shift+f fullscreen toggle
2024-04-17 01:27:21 -05:00
# Change the layout of this container
# Disabled because I just fatfinger these, they're never useful in my workflow
#bindsym $mod+s layout stacking
#bindsym $mod+w layout tabbed
#bindsym $mod+e layout toggle split
# Focus the parent container. Lets you move groups at a time
2021-02-05 09:09:36 -06:00
bindsym $mod+a focus parent
2024-04-17 01:27:21 -05:00
# Focus the child container
2021-02-05 09:09:36 -06:00
bindsym $mod+d focus child
2024-04-17 01:27:21 -05:00
# Switch between workspaces
2021-02-05 09:09:36 -06:00
bindsym $mod+1 workspace $w1
bindsym $mod+2 workspace $w2
bindsym $mod+3 workspace $w3
bindsym $mod+4 workspace $w4
bindsym $mod+5 workspace $w5
bindsym $mod+6 workspace $w6
bindsym $mod+7 workspace $w7
bindsym $mod+8 workspace $w8
bindsym $mod+9 workspace $w9
bindsym $mod+0 workspace $w10
bindsym $mod+period workspace next
bindsym $mod+comma workspace prev
2024-04-17 01:27:21 -05:00
# Move the focused container to a specific workspace
2021-02-05 09:09:36 -06:00
bindsym $mod+$shift+1 move container to workspace $w1
bindsym $mod+$shift+2 move container to workspace $w2
bindsym $mod+$shift+3 move container to workspace $w3
bindsym $mod+$shift+4 move container to workspace $w4
bindsym $mod+$shift+5 move container to workspace $w5
bindsym $mod+$shift+6 move container to workspace $w6
bindsym $mod+$shift+7 move container to workspace $w7
bindsym $mod+$shift+8 move container to workspace $w8
bindsym $mod+$shift+9 move container to workspace $w9
bindsym $mod+$shift+0 move container to workspace $w10
2024-02-12 18:34:26 -06:00
## OUTPUTS
2024-02-12 18:47:42 -06:00
# Wallpaper
output * bg ~/Pictures/Wallpapers/.current fill
2024-02-12 18:34:26 -06:00
2021-02-05 09:09:36 -06:00
## MODES
# Resize
bindsym $mod+r mode "resize"
mode "resize" {
bindsym h resize shrink width 10 px or 10 ppt
bindsym j resize grow height 10 px or 10 ppt
bindsym k resize shrink height 10 px or 10 ppt
bindsym l resize grow width 10 px or 10 ppt
bindsym Left resize shrink width 10 px or 10 ppt
bindsym Down resize grow height 10 px or 10 ppt
bindsym Up resize shrink height 10 px or 10 ppt
bindsym Right resize grow width 10 px or 10 ppt
bindsym Return mode "default"
bindsym Escape mode "default"
bindsym $mod+r mode "default"
}
2021-02-10 19:38:37 -06:00
## STARTUP APPLICATIONS
2024-02-12 18:47:42 -06:00
# Put them here
## OS-SPECIFIC INCLUDES
# Lifted from Fedora
# ---
# Include configs from 3 locations:
# - /usr/share/sway/config.d
# - /etc/sway/config.d
# - $XDG_CONFIG_HOME/sway/config.d ($HOME/.config/sway/config.d)
#
# If multiple directories contain the files with the same name, the later
# directory takes precedence; `$XDG_CONFIG_HOME/sway/config.d/20-swayidle.conf`
# will always be loaded instead of `/usr/share/sway/config.d/20-swayidle.conf`
# or `/etc/sway/config.d/20-swayidle.conf`
#
# This mechanism permits overriding our default configuration per-system
# (/etc) or per-user ($XDG_CONFIG_HOME) basis. Just create the file you
# want to modify/override in the higher-level directory.
#
# For example, to disable the default bar from Fedora configs, you'll need to
# $ echo -n > "$HOME/.config/sway/config.d/90-bar.conf"
#
# Note the quoting, the $() and the arguments quoting. All the parts are equally
# important to make the magic work. And if you want to learn the secret behind
# the trick, it's all in the `wordexp(3)`.
#
include '$(/usr/libexec/sway/layered-include "/usr/share/sway/config.d/*.conf" "/etc/sway/config.d/*.conf" "${XDG_CONFIG_HOME:-$HOME/.config}/sway/config.d/*.conf")'
2024-02-15 02:35:09 -06:00
include "${XDG_CONFIG_HOME:-$HOME/.config}/sway/machine.d/$HOSTNAME.conf"