sway-default-config 6.7 KB

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