This repository has been archived on 2024-09-01. You can view files and clone it, but cannot push or open issues or pull requests.
al-skel/sway-home/.config/sway/config

263 lines
8.6 KiB
Plaintext
Raw Normal View History

2022-05-24 19:14:57 -05:00
# The files we include below will be created / overwritten by nwg-shell tools
2021-12-22 20:08:26 -06:00
#
2022-05-24 19:14:57 -05:00
include variables
include outputs
include autostart
include workspaces
include keyboard
include pointer
include touchpad
# ArchLabs sway config
2021-12-22 20:08:26 -06:00
# Read `man 5 sway` for reference.
# border & title
2022-01-12 18:20:36 -06:00
for_window [title="^.*"] border pixel 1, title_format "<b> %class >> %title </b>"
2021-12-31 16:02:59 -06:00
default_border pixel 1
2021-12-22 20:08:26 -06:00
# gaps
2022-01-06 18:19:28 -06:00
gaps inner 4
2021-12-22 20:08:26 -06:00
gaps outer 0
2022-01-06 18:19:28 -06:00
smart_gaps on
2021-12-22 20:08:26 -06:00
# font
font pango:monospace 11
# mod key used for most binds
# Mod1 = Alt
# Mod4 = Super
set $Mod Mod4
# direction keys
set $up l
set $down k
set $left j
set $right semicolon
############### Autostart ##################
exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec hash dbus-update-activation-environment 2>/dev/null && \
dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
exec /usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1
exec ~/.azotebg
### Turn off screen on lid closed
set $laptop eDP-1
bindswitch lid:on output $laptop disable
bindswitch lid:off output $laptop enable
############# Bindings ##################
# kill focused window
bindsym $Mod+Shift+q kill
bindsym Mod1+q kill
bindsym Mod1+F4 kill
2022-01-06 23:40:10 -06:00
# core applications
2021-12-30 03:47:23 -06:00
bindsym $Mod+Return exec $term
2021-12-31 16:02:59 -06:00
bindsym Mod1+Shift+Return exec $term
2021-12-30 03:47:23 -06:00
bindsym Control+Shift+t exec $term
bindsym $Mod+t exec $term
2022-01-06 23:40:10 -06:00
bindsym $Mod+d exec $dock
bindsym $Mod+e exec $editor
2021-12-30 03:47:23 -06:00
bindsym $Mod+w exec $browser
2022-01-06 23:40:10 -06:00
bindsym Control+space exec $launcher
bindsym Mod1+F1 exec $launcher
2021-12-30 03:47:23 -06:00
bindsym $Mod+f exec $filemanager
2022-01-28 19:38:09 -06:00
bindsym $Mod+c exec swaync-client -t
2021-12-22 20:08:26 -06:00
# Exit menu
bindsym $Mod+x exec $exit
# Exit sway (default way to log you out of your Wayland session)
bindsym $Mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
# screenshot
2021-12-30 03:47:23 -06:00
bindsym Print exec screenshot fullscreen
2022-01-21 16:33:15 -06:00
bindsym Control+Print exec screenshot display
2021-12-22 20:08:26 -06:00
bindsym Shift+Control+Print exec grim -g "$(slurp)" - | swappy -f -
2022-01-21 16:33:15 -06:00
bindsym $Mod+Shift+Control+Print exec screenshot focused
2021-12-22 20:08:26 -06:00
# audio
bindsym XF86AudioPlay exec playerctl play-pause
bindsym XF86AudioNext exec playerctl next
bindsym XF86AudioPrev exec playerctl previous
bindsym XF86AudioStop exec playerctl stop
bindsym XF86AudioMute exec pamixer -t
bindsym XF86AudioRaiseVolume exec pamixer -i 2
bindsym XF86AudioLowerVolume exec pamixer -d 2
# backlight
bindsym XF86MonBrightnessUp exec light -A 5
bindsym XF86MonBrightnessDown exec light -U 5
# Reload the configuration file
bindsym $Mod+Shift+c reload
########### Workspace Bindings ###############
# switch to workspace
bindsym $Mod+1 workspace number 1
bindsym $Mod+2 workspace number 2
bindsym $Mod+3 workspace number 3
bindsym $Mod+4 workspace number 4
bindsym $Mod+5 workspace number 5
bindsym $Mod+6 workspace number 6
bindsym $Mod+7 workspace number 7
bindsym $Mod+8 workspace number 8
# switch to workspace - numpad alternatives
bindsym $Mod+Mod2+KP_1 workspace number 1
bindsym $Mod+Mod2+KP_2 workspace number 2
bindsym $Mod+Mod2+KP_3 workspace number 3
bindsym $Mod+Mod2+KP_4 workspace number 4
bindsym $Mod+Mod2+KP_5 workspace number 5
bindsym $Mod+Mod2+KP_6 workspace number 6
bindsym $Mod+Mod2+KP_7 workspace number 7
bindsym $Mod+Mod2+KP_8 workspace number 8
# switch to next or previous workspace
bindsym $Mod+Mod1+Left workspace prev
bindsym $Mod+Mod1+Right workspace next
# move focused container to workspace
bindsym $Mod+Shift+1 move container to workspace number 1; workspace number 1
bindsym $Mod+Shift+2 move container to workspace number 2; workspace number 2
bindsym $Mod+Shift+3 move container to workspace number 3; workspace number 3
bindsym $Mod+Shift+4 move container to workspace number 4; workspace number 4
bindsym $Mod+Shift+5 move container to workspace number 5; workspace number 5
bindsym $Mod+Shift+6 move container to workspace number 6; workspace number 6
bindsym $Mod+Shift+7 move container to workspace number 7; workspace number 7
bindsym $Mod+Shift+8 move container to workspace number 8; workspace number 8
# move focused container to workspace - numpad alternatives
bindsym $Mod+Shift+Mod2+KP_End move container to workspace number 1; workspace number 1
bindsym $Mod+Shift+Mod2+KP_Down move container to workspace number 2; workspace number 2
bindsym $Mod+Shift+Mod2+KP_Next move container to workspace number 3; workspace number 3
bindsym $Mod+Shift+Mod2+KP_Left move container to workspace number 4; workspace number 4
bindsym $Mod+Shift+Mod2+KP_Begin move container to workspace number 5; workspace number 5
bindsym $Mod+Shift+Mod2+KP_Right move container to workspace number 6; workspace number 7
bindsym $Mod+Shift+Mod2+KP_Home move container to workspace number 7; workspace number 7
bindsym $Mod+Shift+Mod2+KP_Up move container to workspace number 8; workspace number 8
############ Container/Window control ############
# Scratchpad, Floating
bindsym $Mod+space floating toggle
floating_modifier Mod1 normal
# Sway has a "scratchpad", which is a bag of holding for windows.
# You can send windows there and get them back later.
# Move the currently focused window to the scratchpad
bindsym $Mod+Shift+z move scratchpad
# Show the next scratchpad window or hide the focused scratchpad window.
# If there are multiple scratchpad windows, this command cycles through them.
bindsym $Mod+z scratchpad show
# change focus
bindsym $Mod+$left focus left
bindsym $Mod+$down focus down
bindsym $Mod+$up focus up
bindsym $Mod+$right focus right
# alternatively, you can use the cursor keys:
bindsym $Mod+Left focus left
bindsym $Mod+Down focus down
bindsym $Mod+Up focus up
bindsym $Mod+Right focus right
# move focus to the parent container
bindsym $Mod+p focus parent
# move focused window
bindsym $Mod+Shift+$left move left
bindsym $Mod+Shift+$down move down
bindsym $Mod+Shift+$up move up
bindsym $Mod+Shift+$right move right
# alternatively, you can use the cursor keys:
bindsym $Mod+Shift+Up move up
bindsym $Mod+Shift+Down move down
bindsym $Mod+Shift+Left move left
bindsym $Mod+Shift+Right move right
# Resizing containers
mode "resize" {
bindsym $left resize shrink width 10px
bindsym $down resize grow height 10px
bindsym $up resize shrink height 10px
bindsym $right resize grow width 10px
# Ditto, with arrow keys
bindsym Left resize shrink width 10px
bindsym Down resize grow height 10px
bindsym Up resize shrink height 10px
bindsym Right resize grow width 10px
# Return to default mode
bindsym Return mode "default"
bindsym Escape mode "default"
}
bindsym $Mod+r mode "resize"
# Size
bindsym Mod1+Up resize shrink height 10 px or 1 ppt
bindsym Mod1+Down resize grow height 10 px or 1 ppt
bindsym Mod1+Left resize shrink width 10 px or 1 ppt
bindsym Mod1+Right resize grow width 10 px or 1 ppt
# layout toggle
bindsym Mod1+Tab layout toggle tabbed split
bindsym $Mod+Tab layout toggle splitv splith
# switch to workspace with urgent window
for_window [urgent="latest"] focus
focus_on_window_activation focus
# container layout
bindsym $Mod+h split h
bindsym $Mod+v split v
bindsym $Mod+Shift+t layout tabbed
bindsym $Mod+Shift+s layout stacking
bindsym $Mod+Shift+h layout toggle split
default_orientation horizontal
# make the current focus fullscreen
bindsym $Mod+Shift+f fullscreen
2022-01-03 20:54:03 -06:00
# show/hide help
2022-01-06 18:19:28 -06:00
bindsym Mod1+h exec pkill -f -12 nwg-wrapper
2022-01-03 20:54:03 -06:00
# move help to front/back
2022-01-06 18:19:28 -06:00
bindsym Mod1+Shift+h exec pkill -f -10 nwg-wrapper
2021-12-22 20:08:26 -06:00
############### Border & Gaps ###############
# changing border style
bindsym $Mod+n border normal
bindsym $Mod+y border pixel 1
bindsym $Mod+u border none
# change gaps
bindsym $Mod+plus gaps inner current plus 5
bindsym $Mod+minus gaps inner current minus 5
bindsym $Mod+Shift+plus gaps outer current plus 5
bindsym $Mod+Shift+minus gaps outer current minus 5
bindsym $Mod+Control+plus gaps inner all plus 5
bindsym $Mod+Control+minus gaps inner all minus 5
bindsym $Mod+Control+Shift+plus gaps outer all plus 5
bindsym $Mod+Control+Shift+minus gaps outer all minus 5
############ application settings ############
# focus, floating, & sticky
2022-05-24 19:14:57 -05:00
for_window [app_id="(?i)(?:blueman-manager|azote|gnome-disks)"] floating enable
2022-01-02 20:12:48 -06:00
for_window [app_id="(?i)(?:pavucontrol|nm-connection-editor|gsimplecal|galculator)"] floating enable
2021-12-22 20:08:26 -06:00
for_window [app_id="(?i)(?:firefox|chromium)"] border none
for_window [title="(?i)(?:copying|deleting|moving)"] floating enable
popup_during_fullscreen smart