config 6.1 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. set $steam gamemodrun steam -gamepadui
  12. # @note: we use the default wallpaper as a backup
  13. output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
  14. # @note: cursor theme and size set env vars; may not apply to all applications
  15. seat seat0 xcursor_theme Vimix-cursors 36
  16. # window manager commands
  17. bindsym $mod+Shift+c reload
  18. bindsym $mod+Shift+q kill
  19. bindsym $mod+x exec "systemctl --user import-environment; systemctl --user stop sway-session.target; swaymsg exit"
  20. bindsym $mod+p focus parent
  21. # split workspace horizontal and vertical
  22. bindsym $mod+v splitv
  23. bindsym $mod+h splith
  24. # change workspace layout
  25. bindsym $mod+Shift+e layout toggle split
  26. bindsym $mod+Shift+s layout stacking
  27. bindsym $mod+Shift+w layout tabbed
  28. # fullscreen toggle
  29. bindsym $mod+f fullscreen
  30. # floating window controls:
  31. # super+l to toggle floating mode
  32. # super+_shift+l to switch focus to floating window(s)
  33. # hold super then use left click to drag and right click to resize
  34. bindsym $mod+l floating toggle
  35. bindsym $mod+Shift+l focus mode_toggle
  36. floating_modifier $mod normal
  37. # Move your focus around
  38. bindsym $mod+Left focus left
  39. bindsym $mod+Down focus down
  40. bindsym $mod+Up focus up
  41. bindsym $mod+Right focus right
  42. # Move the focused window with the same, but add Shift
  43. bindsym $mod+Shift+Left move left
  44. bindsym $mod+Shift+Down move down
  45. bindsym $mod+Shift+Up move up
  46. bindsym $mod+Shift+Right move right
  47. mode "resize" {
  48. bindsym Left resize shrink width 10px
  49. bindsym Down resize grow height 10px
  50. bindsym Up resize shrink height 10px
  51. bindsym Right resize grow width 10px
  52. bindsym Return mode "default"
  53. bindsym Escape mode "default"
  54. }
  55. bindsym $mod+r mode "resize"
  56. # navigate workspaces
  57. bindsym $mod+1 workspace number 1
  58. bindsym $mod+2 workspace number 2
  59. bindsym $mod+3 workspace number 3
  60. bindsym $mod+4 workspace number 4
  61. bindsym $mod+5 workspace number 5
  62. bindsym $mod+6 workspace number 6
  63. bindsym $mod+7 workspace number 7
  64. bindsym $mod+8 workspace number 8
  65. bindsym $mod+9 workspace number 9
  66. bindsym $mod+0 workspace number 10
  67. bindsym Control+Alt+Right workspace next
  68. bindsym Control+Alt+Left workspace prev
  69. # send window to workspace
  70. bindsym $mod+Shift+1 move container to workspace number 1, workspace number 1
  71. bindsym $mod+Shift+2 move container to workspace number 2, workspace number 2
  72. bindsym $mod+Shift+3 move container to workspace number 3, workspace number 3
  73. bindsym $mod+Shift+4 move container to workspace number 4, workspace number 4
  74. bindsym $mod+Shift+5 move container to workspace number 5, workspace number 5
  75. bindsym $mod+Shift+6 move container to workspace number 6, workspace number 6
  76. bindsym $mod+Shift+7 move container to workspace number 7, workspace number 7
  77. bindsym $mod+Shift+8 move container to workspace number 8, workspace number 8
  78. bindsym $mod+Shift+9 move container to workspace number 9, workspace number 9
  79. bindsym $mod+Shift+0 move container to workspace number 10, workspace number 10
  80. bindsym $mod+Control+Right move container to workspace next, workspace next
  81. bindsym $mod+Control+Left move container to workspace prev, workspace prev
  82. # services
  83. bindsym $mod+Space exec $launcher
  84. bindsym $mod+Shift+F2 exec $applauncher
  85. bindsym $mod+t exec $term
  86. bindsym $mod+b exec $files
  87. bindsym $mod+e exec $editor
  88. bindsym $mod+w exec $browser
  89. bindsym $mod+g exec $steam
  90. bindsym $mod+Ctrl+3 exec screenshot
  91. bindsym Print exec screenshot
  92. bindsym $mod+Ctrl+4 exec screenshot-selection
  93. bindsym Shift+Print exec screenshot-selection
  94. # multimedia keys
  95. bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%
  96. bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%
  97. bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle
  98. bindsym XF86AudioMicMute exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
  99. bindsym XF86AudioPlay exec playerctl -p mpv play-pause
  100. bindsym XF86AudioNext exec playerctl -p mpv next
  101. bindsym XF86AudioPrev exec playerctl -p mpv previous
  102. bindsym XF86MonBrightnessUp exec brightnessctl set +5%
  103. bindsym XF86MonBrightnessDown exec brightnessctl set 5%-
  104. bindsym Shift+XF86MonBrightnessUp exec brightnessctl s 100%
  105. bindsym Shift+XF86MonBrightnessDown exec brightnessctl s 0%
  106. # global push-to-talk & toggle
  107. bindsym $mod+m exec pactl set-source-mute @DEFAULT_SOURCE@ 0 # mute mic
  108. bindsym --release $mod+m exec pactl set-source-mute @DEFAULT_SOURCE@ 1 # unmute mic
  109. bindsym $mod+Shift+m exec pactl set-source-mute @DEFAULT_SOURCE@ toggle
  110. # classify sane defaults for window management
  111. for_window [window_role="pop-up"] floating enable
  112. for_window [window_role="bubble"] floating enable
  113. for_window [window_role="task_dialog"] floating enable
  114. for_window [window_role="Preferences"] floating enable
  115. for_window [window_type="dialog"] floating enable
  116. for_window [window_type="menu"] floating enable
  117. for_window [window_role="About"] floating enable
  118. for_window [class="xdg-desktop-portal-kde"] floating enable
  119. for_window [class="Wine"] floating enable
  120. for_window [app_id="lutris"] floating enable
  121. # @reference: man 5 sway-bar
  122. # @note: we now launch waybar via systemctl --user enable waybar.service
  123. #bar {
  124. # swaybar_command waybar
  125. #}
  126. # load additional configuration
  127. include /etc/sway/config.d/*
  128. # load user configuration from local sub-directory
  129. #
  130. # @reference: man 5 sway-output
  131. # @reference: swaymsg -t get_outputs
  132. #
  133. # example with custom resolution and dual monitors:
  134. #
  135. # output HDMI-A-1 mode --custom 2560x1440@60Hz position 0,0 adaptive_sync on
  136. # output DP-1 mode 3440x1440@144Hz pos 3440 0 adaptive_sync on
  137. #
  138. # @reference: man 5 sway-input
  139. # @reference: swaymsg -t get_inputs
  140. #
  141. # Example configuration:
  142. #
  143. # input "2:14:SynPS/2_Synaptics_TouchPad" {
  144. # dwt enabled
  145. # tap enabled
  146. # natural_scroll enabled
  147. # middle_emulation enabled
  148. # }
  149. include ~/.config/sway/config.d/*
  150. # start sway session in systemd to intialize services
  151. exec_always "systemctl --user import-environment; systemctl --user start sway-session.target"