config 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. # @reference: man 5 sway
  2. # super for modifier
  3. set $mod Mod4
  4. # define service variables
  5. set $launcher wofi --show=run --lines=5 --prompt=""
  6. set $applauncher wofi --show=drun --lines=5 --prompt=""
  7. set $term alacritty
  8. set $browser firefox
  9. set $editor subl
  10. set $files pcmanfm
  11. # @todo: test loading from ~/.config/sway/config.d/*; would allow hardware specifics to be separated!
  12. # @reference: man 5 sway-output
  13. # @reference: swaymsg -t get_outputs
  14. # output configuration
  15. # output HDMI-A-1 mode --custom 2560x1440@60Hz position 0,0 adaptive_sync on
  16. # @note: we use the default wallpaper as a backup
  17. output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
  18. # @note: cursor theme and size set env vars; may not apply to all applications
  19. seat seat0 xcursor_theme Chameleon-SkyBlue-Large
  20. # @note: idle display sleep is an option, but I don't like display sleep
  21. # exec swayidle -w \
  22. # timeout 300 'swaylock -f -c 000000' \
  23. # timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
  24. # before-sleep 'swaylock -f -c 000000'
  25. # @reference: man 5 sway-input
  26. # @reference: swaymsg -t get_inputs
  27. # @todo: define synaptic touchpad for laptops here
  28. # Example configuration:
  29. # input "2:14:SynPS/2_Synaptics_TouchPad" {
  30. # dwt enabled
  31. # tap enabled
  32. # natural_scroll enabled
  33. # middle_emulation enabled
  34. # }
  35. # window manager commands
  36. bindsym $mod+Shift+c reload
  37. bindsym $mod+Shift+q kill
  38. bindsym $mod+x exec swaymsg exit
  39. bindsym $mod+p focus parent
  40. # Drag floating windows by holding down $mod and left mouse button.
  41. # Resize them with right mouse button + $mod.
  42. # Despite the name, also works for non-floating windows.
  43. # Change normal to inverse to use left mouse button for resizing and right
  44. # mouse button for dragging.
  45. floating_modifier $mod normal
  46. # Move your focus around
  47. bindsym $mod+Left focus left
  48. bindsym $mod+Down focus down
  49. bindsym $mod+Up focus up
  50. bindsym $mod+Right focus right
  51. # Move the focused window with the same, but add Shift
  52. bindsym $mod+Shift+Left move left
  53. bindsym $mod+Shift+Down move down
  54. bindsym $mod+Shift+Up move up
  55. bindsym $mod+Shift+Right move right
  56. mode "resize" {
  57. bindsym Left resize shrink width 10px
  58. bindsym Down resize grow height 10px
  59. bindsym Up resize shrink height 10px
  60. bindsym Right resize grow width 10px
  61. bindsym Return mode "default"
  62. bindsym Escape mode "default"
  63. }
  64. bindsym $mod+r mode "resize"
  65. # @todo: investigate named workspaces and affinities; eg. games workspace, left/right workspace navigation
  66. # @todo: also investigate multi-monitor hotkeys for moving containers across displays
  67. # workspace commands
  68. bindsym $mod+1 workspace number 1
  69. bindsym $mod+2 workspace number 2
  70. bindsym $mod+3 workspace number 3
  71. bindsym $mod+4 workspace number 4
  72. bindsym $mod+5 workspace number 5
  73. bindsym $mod+6 workspace number 6
  74. bindsym $mod+7 workspace number 7
  75. bindsym $mod+8 workspace number 8
  76. bindsym $mod+9 workspace number 9
  77. bindsym $mod+0 workspace number 10
  78. bindsym $mod+Shift+1 move container to workspace number 1, workspace number 1
  79. bindsym $mod+Shift+2 move container to workspace number 2, workspace number 2
  80. bindsym $mod+Shift+3 move container to workspace number 3, workspace number 3
  81. bindsym $mod+Shift+4 move container to workspace number 4, workspace number 4
  82. bindsym $mod+Shift+5 move container to workspace number 5, workspace number 5
  83. bindsym $mod+Shift+6 move container to workspace number 6, workspace number 6
  84. bindsym $mod+Shift+7 move container to workspace number 7, workspace number 7
  85. bindsym $mod+Shift+8 move container to workspace number 8, workspace number 8
  86. bindsym $mod+Shift+9 move container to workspace number 9, workspace number 9
  87. bindsym $mod+Shift+0 move container to workspace number 10, workspace number 10
  88. # services
  89. bindsym $mod+space exec $launcher
  90. bindsym $mod+Shift+F2 exec $applauncher
  91. bindsym $mod+t exec $term
  92. bindsym $mod+b exec $files
  93. bindsym $mod+e exec $editor
  94. bindsym $mod+w exec $browser
  95. bindsym $mod+Ctrl+3 exec screenshot
  96. bindsym $mod+Ctrl+4 exec screenshot-selection
  97. # multimedia keys
  98. # bindsym XF86AudioRaiseVolume exec pash increase
  99. # bindsym XF86AudioLowerVolume exec pash decrease
  100. # bindsym XF86AudioMute exec pash mute
  101. bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
  102. bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
  103. bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
  104. bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
  105. bindsym XF86AudioPlay exec playerctl play-pause
  106. bindsym XF86AudioNext exec playerctl next
  107. bindsym XF86AudioPrev exec playerctl previous
  108. bindsym XF86MonBrightnessUp exec brightnessctl set +5%
  109. bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
  110. bindsym Shift+XF86MonBrightnessUp exec brightnessctl s 100%
  111. bindsym Shift+XF86MonBrightnessDown exec brightnessctl s 0%
  112. # @todo: investigate these layout behaviors; immediate testing showed no changes
  113. #
  114. # Layout stuff:
  115. #
  116. # You can "split" the current object of your focus with
  117. # $mod+b or $mod+v, for horizontal and vertical splits
  118. # respectively.
  119. # bindsym $mod+b splith
  120. # bindsym $mod+v splitv
  121. # Switch the current container between different layout styles
  122. # bindsym $mod+s layout stacking
  123. # bindsym $mod+w layout tabbed
  124. # bindsym $mod+e layout toggle split
  125. # Make the current focus fullscreen
  126. # bindsym $mod+f fullscreen
  127. # @todo: identify an appropriate hotkey to toggle floating mode
  128. # Toggle the current focus between tiling and floating mode
  129. #bindsym $mod+Shift+space floating toggle
  130. # Swap focus between the tiling area and the floating area
  131. #bindsym $mod+space focus mode_toggle
  132. # @todo: investigate scratchpad usage to replace urxvtq script for persistent terminal
  133. # basically mod+tilde toggle and position terminal using scratchpad to hide it
  134. # Scratchpad:
  135. # Sway has a "scratchpad", which is a bag of holding for windows.
  136. # You can send windows there and get them back later.
  137. # Move the currently focused window to the scratchpad
  138. # bindsym $mod+Shift+minus move scratchpad
  139. # Show the next scratchpad window or hide the focused scratchpad window.
  140. # If there are multiple scratchpad windows, this command cycles through them.
  141. # bindsym $mod+minus scratchpad show
  142. # @reference: man 5 sway-bar
  143. # @todo: figure out how to configure and optimize waybar
  144. bar {
  145. swaybar_command waybar
  146. }
  147. # load additional configuration
  148. # @note: input and output configuration specific to your system may be loaded from `config.d/`
  149. include /etc/sway/config.d/*
  150. include ~/.config/sway/config.d/*
  151. # launch session
  152. exec_always "systemctl --user import-environment; systemctl --user start sway-session.target"