# @reference: man 5 sway # super for modifier set $mod Mod4 # define service variables set $launcher wofi --show=run --lines=5 --prompt="" set $applauncher wofi --show=drun --lines=5 --prompt="" set $term alacritty set $browser firefox set $editor subl set $files pcmanfm # @todo: test loading from ~/.config/sway/config.d/*; would allow hardware specifics to be separated! # @reference: man 5 sway-output # @reference: swaymsg -t get_outputs # output configuration # output HDMI-A-1 mode --custom 2560x1440@60Hz position 0,0 adaptive_sync on # @note: we use the default wallpaper as a backup output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill # @note: cursor theme and size set env vars; may not apply to all applications seat seat0 xcursor_theme Chameleon-SkyBlue-Large # @note: idle display sleep is an option, but I don't like display sleep # exec swayidle -w \ # timeout 300 'swaylock -f -c 000000' \ # timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \ # before-sleep 'swaylock -f -c 000000' # @reference: man 5 sway-input # @reference: swaymsg -t get_inputs # @todo: define synaptic touchpad for laptops here # Example configuration: # input "2:14:SynPS/2_Synaptics_TouchPad" { # dwt enabled # tap enabled # natural_scroll enabled # middle_emulation enabled # } # window manager commands bindsym $mod+Shift+c reload bindsym $mod+Shift+q kill bindsym $mod+x exec swaymsg exit bindsym $mod+p focus parent # Drag floating windows by holding down $mod and left mouse button. # Resize them with right mouse button + $mod. # Despite the name, also works for non-floating windows. # Change normal to inverse to use left mouse button for resizing and right # mouse button for dragging. floating_modifier $mod normal # Move your focus around bindsym $mod+Left focus left bindsym $mod+Down focus down bindsym $mod+Up focus up bindsym $mod+Right focus right # Move the focused window with the same, but add Shift bindsym $mod+Shift+Left move left bindsym $mod+Shift+Down move down bindsym $mod+Shift+Up move up bindsym $mod+Shift+Right move right 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 bindsym Return mode "default" bindsym Escape mode "default" } bindsym $mod+r mode "resize" # @todo: investigate named workspaces and affinities; eg. games workspace, left/right workspace navigation # @todo: also investigate multi-monitor hotkeys for moving containers across displays # workspace commands 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 bindsym $mod+9 workspace number 9 bindsym $mod+0 workspace number 10 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 bindsym $mod+Shift+9 move container to workspace number 9, workspace number 9 bindsym $mod+Shift+0 move container to workspace number 10, workspace number 10 # services bindsym $mod+space exec $launcher bindsym $mod+Shift+F2 exec $applauncher bindsym $mod+t exec $term bindsym $mod+b exec $files bindsym $mod+e exec $editor bindsym $mod+w exec $browser bindsym $mod+Ctrl+3 exec screenshot bindsym $mod+Ctrl+4 exec screenshot-selection # multimedia keys # bindsym XF86AudioRaiseVolume exec pash increase # bindsym XF86AudioLowerVolume exec pash decrease # bindsym XF86AudioMute exec pash mute bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle bindsym XF86AudioPlay exec playerctl play-pause bindsym XF86AudioNext exec playerctl next bindsym XF86AudioPrev exec playerctl previous bindsym XF86MonBrightnessUp exec brightnessctl set +5% bindsym XF86MonBrightnessDown exec brightnessctl set 5%- bindsym Shift+XF86MonBrightnessUp exec brightnessctl s 100% bindsym Shift+XF86MonBrightnessDown exec brightnessctl s 0% # @todo: investigate these layout behaviors; immediate testing showed no changes # # Layout stuff: # # You can "split" the current object of your focus with # $mod+b or $mod+v, for horizontal and vertical splits # respectively. # bindsym $mod+b splith # bindsym $mod+v splitv # Switch the current container between different layout styles # bindsym $mod+s layout stacking # bindsym $mod+w layout tabbed # bindsym $mod+e layout toggle split # Make the current focus fullscreen # bindsym $mod+f fullscreen # @todo: identify an appropriate hotkey to toggle floating mode # Toggle the current focus between tiling and floating mode #bindsym $mod+Shift+space floating toggle # Swap focus between the tiling area and the floating area #bindsym $mod+space focus mode_toggle # @todo: investigate scratchpad usage to replace urxvtq script for persistent terminal # basically mod+tilde toggle and position terminal using scratchpad to hide it # Scratchpad: # 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+minus 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+minus scratchpad show # @reference: man 5 sway-bar # @todo: figure out how to configure and optimize waybar bar { swaybar_command waybar } # load additional configuration # @note: input and output configuration specific to your system may be loaded from `config.d/` include /etc/sway/config.d/* include ~/.config/sway/config.d/* # launch session exec_always "systemctl --user import-environment; systemctl --user start sway-session.target"