config 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. # Default config for sway
  2. #
  3. # Copy this to ~/.config/sway/config and edit it to your liking.
  4. #
  5. # Read `man 5 sway` for a complete reference.
  6. font pango:monospace 6
  7. titlebar_padding 1
  8. ### Variables
  9. #
  10. # Logo key. Use Mod1 for Alt.
  11. set $mod Mod4
  12. # Home row direction keys, like vim
  13. set $left h
  14. set $down j
  15. set $up k
  16. set $right l
  17. # Your preferred terminal emulator
  18. set $term foot
  19. # Your preferred application launcher
  20. # Note: pass the final command to swaymsg so that the resulting window can be opened
  21. # on the original workspace that the command was run on.
  22. set $menu tofi-drun | xargs swaymsg exec --
  23. include /etc/sway/config-vars.d/*
  24. ### Output configuration
  25. #
  26. # Default wallpaper (more resolutions are available in /usr/share/backgrounds/sway/)
  27. #output * bg /usr/share/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
  28. #
  29. # Example configuration:
  30. #
  31. # output HDMI-A-1 resolution 1920x1080 position 1920,0
  32. #
  33. # You can get the names of your outputs by running: swaymsg -t get_outputs
  34. ### Idle configuration
  35. #
  36. # Example configuration:
  37. #
  38. # exec swayidle -w \
  39. # timeout 300 'swaylock -f -c 000000' \
  40. # timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' \
  41. # before-sleep 'swaylock -f -c 000000'
  42. #
  43. # This will lock your screen after 300 seconds of inactivity, then turn off
  44. # your displays after another 300 seconds, and turn your screens back on when
  45. # resumed. It will also lock your screen before your computer goes to sleep.
  46. ### Input configuration
  47. #
  48. # Example configuration:
  49. #
  50. # input "2:14:SynPS/2_Synaptics_TouchPad" {
  51. # dwt enabled
  52. # tap enabled
  53. # natural_scroll enabled
  54. # middle_emulation enabled
  55. # }
  56. #
  57. # You can get the names of your inputs by running: swaymsg -t get_inputs
  58. # Read `man 5 sway-input` for more information about this section.
  59. ### Key bindings
  60. #
  61. # Basics:
  62. #
  63. # Start a terminal
  64. bindsym $mod+Return exec $term
  65. # Kill focused window
  66. bindsym $mod+Shift+q kill
  67. # Start your launcher
  68. bindsym $mod+d exec $menu
  69. # Drag floating windows by holding down $mod and left mouse button.
  70. # Resize them with right mouse button + $mod.
  71. # Despite the name, also works for non-floating windows.
  72. # Change normal to inverse to use left mouse button for resizing and right
  73. # mouse button for dragging.
  74. floating_modifier $mod normal
  75. # Reload the configuration file
  76. bindsym $mod+Shift+c reload
  77. # Exit sway (logs you out of your Wayland session)
  78. 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'
  79. #
  80. # Moving around:
  81. #
  82. # Move your focus around
  83. bindsym $mod+$left focus left
  84. bindsym $mod+$down focus down
  85. bindsym $mod+$up focus up
  86. bindsym $mod+$right focus right
  87. # Or use $mod+[up|down|left|right]
  88. bindsym $mod+Left focus left
  89. bindsym $mod+Down focus down
  90. bindsym $mod+Up focus up
  91. bindsym $mod+Right focus right
  92. # Move the focused window with the same, but add Shift
  93. bindsym $mod+Shift+$left move left
  94. bindsym $mod+Shift+$down move down
  95. bindsym $mod+Shift+$up move up
  96. bindsym $mod+Shift+$right move right
  97. # Ditto, with arrow keys
  98. bindsym $mod+Shift+Left move left
  99. bindsym $mod+Shift+Down move down
  100. bindsym $mod+Shift+Up move up
  101. bindsym $mod+Shift+Right move right
  102. #
  103. # Workspaces:
  104. #
  105. # Switch to workspace
  106. bindsym $mod+1 workspace number 1
  107. bindsym $mod+2 workspace number 2
  108. bindsym $mod+3 workspace number 3
  109. bindsym $mod+4 workspace number 4
  110. bindsym $mod+5 workspace number 5
  111. bindsym $mod+6 workspace number 6
  112. bindsym $mod+7 workspace number 7
  113. bindsym $mod+8 workspace number 8
  114. bindsym $mod+9 workspace number 9
  115. bindsym $mod+0 workspace number 10
  116. # Move focused container to workspace
  117. bindsym $mod+Shift+1 move container to workspace number 1
  118. bindsym $mod+Shift+2 move container to workspace number 2
  119. bindsym $mod+Shift+3 move container to workspace number 3
  120. bindsym $mod+Shift+4 move container to workspace number 4
  121. bindsym $mod+Shift+5 move container to workspace number 5
  122. bindsym $mod+Shift+6 move container to workspace number 6
  123. bindsym $mod+Shift+7 move container to workspace number 7
  124. bindsym $mod+Shift+8 move container to workspace number 8
  125. bindsym $mod+Shift+9 move container to workspace number 9
  126. bindsym $mod+Shift+0 move container to workspace number 10
  127. # Note: workspaces can have any name you want, not just numbers.
  128. # We just use 1-10 as the default.
  129. #
  130. # Layout stuff:
  131. #
  132. # You can "split" the current object of your focus with
  133. # $mod+b or $mod+v, for horizontal and vertical splits
  134. # respectively.
  135. bindsym $mod+b splith
  136. bindsym $mod+v splitv
  137. # Switch the current container between different layout styles
  138. bindsym $mod+s layout stacking
  139. bindsym $mod+w layout tabbed
  140. bindsym $mod+e layout toggle split
  141. # Make the current focus fullscreen
  142. bindsym $mod+f fullscreen
  143. # Toggle the current focus between tiling and floating mode
  144. bindsym $mod+Shift+space floating toggle
  145. # Swap focus between the tiling area and the floating area
  146. bindsym $mod+space focus mode_toggle
  147. # Move focus to the parent container
  148. bindsym $mod+a focus parent
  149. #
  150. # Scratchpad:
  151. #
  152. # Sway has a "scratchpad", which is a bag of holding for windows.
  153. # You can send windows there and get them back later.
  154. # Move the currently focused window to the scratchpad
  155. bindsym $mod+Shift+minus move scratchpad
  156. # Show the next scratchpad window or hide the focused scratchpad window.
  157. # If there are multiple scratchpad windows, this command cycles through them.
  158. bindsym $mod+minus scratchpad show
  159. #
  160. # Resizing containers:
  161. #
  162. mode "resize" {
  163. # left will shrink the containers width
  164. # right will grow the containers width
  165. # up will shrink the containers height
  166. # down will grow the containers height
  167. bindsym $left resize shrink width 10px
  168. bindsym $down resize grow height 10px
  169. bindsym $up resize shrink height 10px
  170. bindsym $right resize grow width 10px
  171. # Ditto, with arrow keys
  172. bindsym Left resize shrink width 10px
  173. bindsym Down resize grow height 10px
  174. bindsym Up resize shrink height 10px
  175. bindsym Right resize grow width 10px
  176. # Return to default mode
  177. bindsym Return mode "default"
  178. bindsym Escape mode "default"
  179. }
  180. bindsym $mod+r mode "resize"
  181. #
  182. # Status Bar:
  183. #
  184. # Read `man 5 sway-bar` for more information about this section.
  185. bar {
  186. position bottom
  187. # When the status_command prints a new line to stdout, swaybar updates.
  188. # The default just shows the current date and time.
  189. status_command while date +'%Y-%m-%d %I:%M:%S %p'; do sleep 1; done
  190. colors {
  191. statusline #ffffff
  192. background #323232
  193. inactive_workspace #32323200 #32323200 #5c5c5c
  194. }
  195. }
  196. include /etc/sway/config.d/*