Fully modularize sway configs
This commit is contained in:
parent
6494402d57
commit
bec07d6fea
@ -1,6 +1,12 @@
|
|||||||
#
|
#
|
||||||
# Salt's Sway configuration file
|
# Salt's Sway configuration file
|
||||||
# Licensed under the terms of the MIT License
|
#
|
||||||
|
# NOTE
|
||||||
|
# Any further configuration that isn't just declaring a global should be
|
||||||
|
# done via the creation of a file in config.d.
|
||||||
|
#
|
||||||
|
# Note that you can also override system-provided configs by making an
|
||||||
|
# identically-named file in config.d
|
||||||
#
|
#
|
||||||
|
|
||||||
## CONFIGS
|
## CONFIGS
|
||||||
@ -11,140 +17,5 @@ set $sup Mod4
|
|||||||
set $ctl Ctrl
|
set $ctl Ctrl
|
||||||
set $shift Shift
|
set $shift Shift
|
||||||
|
|
||||||
# Use Mouse+$mod to drag floating windows to their wanted position
|
|
||||||
floating_modifier $mod
|
|
||||||
# Program opening and closing
|
|
||||||
bindsym $mod+Return exec "$term"
|
|
||||||
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"
|
|
||||||
# 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
|
|
||||||
# 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
|
|
||||||
# Brightness controls
|
|
||||||
#bindsym XF86MonBrightnessUp exec xbacklight -inc 5 # increase screen brightness
|
|
||||||
#bindsym XF86MonBrightnessDown exec xbacklight -dec 5 # decrease screen brightness
|
|
||||||
# pavucontrol controls
|
|
||||||
bindsym $mod+p exec --no-startup-id "pgrep pavucontrol || pavucontrol"
|
|
||||||
bindsym $mod+$shift+p exec --no-startup-id "pkill pavucontrol"
|
|
||||||
# Miscellaneous non-movement hotkeys
|
|
||||||
bindsym $ctl+$mod+l exec --no-startup-id "loginctl lock-session"
|
|
||||||
bindsym $mod+$shift+c reload
|
|
||||||
# Change focus
|
|
||||||
bindsym $mod+h focus left
|
|
||||||
bindsym $mod+j focus down
|
|
||||||
bindsym $mod+k focus up
|
|
||||||
bindsym $mod+l focus right
|
|
||||||
# Move the focused window around
|
|
||||||
bindsym $mod+$shift+h move left
|
|
||||||
bindsym $mod+$shift+j move down
|
|
||||||
bindsym $mod+$shift+k move up
|
|
||||||
bindsym $mod+$shift+l move right
|
|
||||||
# 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
|
|
||||||
bindsym $mod+semicolon split h
|
|
||||||
bindsym $mod+v split v
|
|
||||||
# Toggle floating
|
|
||||||
bindsym $mod+f floating toggle
|
|
||||||
# Fullscreen
|
|
||||||
bindsym $mod+$shift+f fullscreen toggle
|
|
||||||
# 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
|
|
||||||
bindsym $mod+a focus parent
|
|
||||||
# Focus the child container
|
|
||||||
bindsym $mod+d focus child
|
|
||||||
# Switch between workspaces
|
|
||||||
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
|
|
||||||
# Move the focused container to a specific workspace
|
|
||||||
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
|
|
||||||
|
|
||||||
## OUTPUTS
|
|
||||||
# Wallpaper
|
|
||||||
output * bg ~/Pictures/Wallpapers/.current fill
|
|
||||||
|
|
||||||
## 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"
|
|
||||||
}
|
|
||||||
|
|
||||||
## STARTUP APPLICATIONS
|
|
||||||
# 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")'
|
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")'
|
||||||
include "${XDG_CONFIG_HOME:-$HOME/.config}/sway/machine.d/$HOSTNAME.conf"
|
include "${XDG_CONFIG_HOME:-$HOME/.config}/sway/machine.d/$HOSTNAME.conf"
|
||||||
|
89
sericea/.config/sway/config.d/03-keybinds.conf
Normal file
89
sericea/.config/sway/config.d/03-keybinds.conf
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
# vim: set ft=swayconfig:
|
||||||
|
#
|
||||||
|
# This file holds keybinds for all of swaywm
|
||||||
|
#
|
||||||
|
|
||||||
|
# Use Mouse+$mod to drag floating windows to their wanted position
|
||||||
|
floating_modifier $mod
|
||||||
|
# Program opening and closing
|
||||||
|
bindsym $mod+Return exec "$term"
|
||||||
|
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"
|
||||||
|
# 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
|
||||||
|
# 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
|
||||||
|
# Brightness controls
|
||||||
|
#bindsym XF86MonBrightnessUp exec xbacklight -inc 5 # increase screen brightness
|
||||||
|
#bindsym XF86MonBrightnessDown exec xbacklight -dec 5 # decrease screen brightness
|
||||||
|
# pavucontrol controls
|
||||||
|
bindsym $mod+p exec --no-startup-id "pgrep pavucontrol || pavucontrol"
|
||||||
|
bindsym $mod+$shift+p exec --no-startup-id "pkill pavucontrol"
|
||||||
|
# Miscellaneous non-movement hotkeys
|
||||||
|
bindsym $ctl+$mod+l exec --no-startup-id "loginctl lock-session"
|
||||||
|
bindsym $mod+$shift+c reload
|
||||||
|
# Change focus
|
||||||
|
bindsym $mod+h focus left
|
||||||
|
bindsym $mod+j focus down
|
||||||
|
bindsym $mod+k focus up
|
||||||
|
bindsym $mod+l focus right
|
||||||
|
# Move the focused window around
|
||||||
|
bindsym $mod+$shift+h move left
|
||||||
|
bindsym $mod+$shift+j move down
|
||||||
|
bindsym $mod+$shift+k move up
|
||||||
|
bindsym $mod+$shift+l move right
|
||||||
|
# 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
|
||||||
|
bindsym $mod+semicolon split h
|
||||||
|
bindsym $mod+v split v
|
||||||
|
# Toggle floating
|
||||||
|
bindsym $mod+f floating toggle
|
||||||
|
# Fullscreen
|
||||||
|
bindsym $mod+$shift+f fullscreen toggle
|
||||||
|
# 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
|
||||||
|
bindsym $mod+a focus parent
|
||||||
|
# Focus the child container
|
||||||
|
bindsym $mod+d focus child
|
||||||
|
# Switch between workspaces
|
||||||
|
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
|
||||||
|
# Move the focused container to a specific workspace
|
||||||
|
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
|
24
sericea/.config/sway/config.d/06-modes.conf
Normal file
24
sericea/.config/sway/config.d/06-modes.conf
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# vim: set ft=swayconfig:
|
||||||
|
#
|
||||||
|
# This file stores "modes" for sway, such as for resizing
|
||||||
|
#
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
4
sericea/.config/sway/config.d/30-wallpaper.conf
Normal file
4
sericea/.config/sway/config.d/30-wallpaper.conf
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# vim: set ft=swayconfig:
|
||||||
|
# Wallpaper
|
||||||
|
output * bg ~/Pictures/Wallpapers/.current fill
|
||||||
|
|
Loading…
Reference in New Issue
Block a user