config 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414
  1. # Read `man 5 sway` for a complete reference.
  2. ### Variables
  3. #
  4. set $resize_speed 25px
  5. # Logo key. Use Mod1 for Alt.
  6. set $mod Mod4
  7. # Menu.
  8. set $menucmd "sway_menu"
  9. set $rmenucmd $menucmd"_run"
  10. set $runcmd "$rmenucmd"
  11. for_window [app_id="launcher"] floating enable, resize set width 1000 px height 250 px
  12. # Bar.
  13. set $barcmd "i3blocks"
  14. # Terminal.
  15. set $termcmd "termite"
  16. # Home row direction keys, like vim.
  17. set $left h
  18. set $down j
  19. set $up k
  20. set $right l
  21. # Default.
  22. set $fg_c "#ffffff"
  23. set $bg_c "#000000"
  24. set $tb_c "#ffffff"
  25. set $wb_c $tb_c
  26. set $i_c "#00ffff"
  27. # Inactive.
  28. set $ifg_c $fg_c
  29. set $ibg_c "#881111"
  30. set $itb_c "#660000"
  31. set $iwb_c "$itb_c"
  32. set $ii_c $i_c
  33. # Focused.
  34. set $ffg_c $fg_c
  35. set $fbg_c "#CC2222"
  36. set $ftb_c "#FF0000"
  37. set $fwb_c $ftb_c
  38. set $fi_c $i_c
  39. # Unfocused.
  40. set $ufg_c "#bbbbbb"
  41. set $ubg_c "#484848"
  42. set $utb_c "#303030"
  43. set $uwb_c $utb_c
  44. set $ui_c $i_c
  45. # Indicator color.
  46. # Class TBorder Background Text Indicator WBorder
  47. client.focused $ftb_c $fbg_c $ffg_c $fi_c $fwb_c
  48. client.focused_inactive $itb_c $ibg_c $ifg_c $ii_c $iwb_c
  49. client.unfocused $utb_c $ubg_c $ufg_c $ui_c $uwb_c
  50. font pango:Consolas Mono 10
  51. ### Output configuration
  52. #
  53. # Default wallpaper (more resolutions are available in @datadir@/backgrounds/sway/)
  54. #output * bg @datadir@/backgrounds/sway/Sway_Wallpaper_Blue_1920x1080.png fill
  55. output * bg #000000 solid_color
  56. bar {
  57. position top
  58. # When the status_command prints a new line to stdout, swaybar updates.
  59. # The default just shows the current date and time.
  60. status_command $barcmd
  61. font pango:Consolas Mono 10
  62. colors {
  63. statusline #ffffff
  64. background $bg_c
  65. inactive_workspace $itb_c $ibg_c $ifg_c
  66. active_workspace $ftb_c $fbg_c $ffg_c
  67. focused_workspace #cc2222 #990000 #ffffff
  68. }
  69. }
  70. #
  71. ### Output configuration.
  72. #
  73. # Example configuration:
  74. #
  75. # output HDMI-A-1 resolution 1920x1080 position 1920,0
  76. #
  77. # You can get the names of your outputs by running: swaymsg -t get_outputs
  78. ### Idle configuration
  79. #
  80. # Example configuration:
  81. #
  82. # exec swayidle -w \
  83. # timeout 300 'swaylock -f -c 000000' \
  84. # timeout 600 'swaymsg "output * dpms off"' \
  85. # resume 'swaymsg "output * dpms on"' \
  86. # before-sleep 'swaylock -f -c 000000'
  87. #
  88. # This will lock your screen after 300 seconds of inactivity, then turn off
  89. # your displays after another 300 seconds, and turn your screens back on when
  90. # resumed. It will also lock your screen before your computer goes to sleep.
  91. ### Input configuration.
  92. #
  93. # Example configuration:
  94. #
  95. # input "2:14:SynPS/2_Synaptics_TouchPad" {
  96. # dwt enabled
  97. # tap enabled
  98. # natural_scroll enabled
  99. # middle_emulation enabled
  100. # }
  101. #
  102. input * {
  103. repeat_delay "300"
  104. repeat_rate "60"
  105. xkb_layout "us,ru"
  106. xkb_variant "dvorak,"
  107. xkb_options "caps:swapescape,grp:alt_space_toggle"
  108. }
  109. # You can get the names of your inputs by running: swaymsg -t get_inputs
  110. # Read `man 5 sway-input` for more information about this section.
  111. ### Key bindings
  112. floating_modifier $mod normal
  113. mode "default" {
  114. # Defaults.
  115. #
  116. # Start mode for any other mode.
  117. # Other modes:
  118. bindsym $mod+w mode "window"
  119. bindsym $mod+t mode "tag"
  120. bindsym $mod+e mode "execute"
  121. # Start a terminal.
  122. bindsym $mod+Shift+Return exec $termcmd
  123. # Start launcher.
  124. bindsym $mod+Shift+p exec $runcmd
  125. # Drag floating windows by holding down $mod and left mouse button.
  126. # Resize them with right mouse button + $mod.
  127. # Despite the name, also works for non-floating windows.
  128. # Change normal to inverse to use left mouse button for resizing and right
  129. # mouse button for dragging.
  130. # Reload the configuration file.
  131. bindsym $mod+Ctrl+Shift+r reload
  132. # Exit sway (logs you out of your Wayland session).
  133. bindsym $mod+Ctrl+Shift+q exec swaymsg exit
  134. # Lock the screen.
  135. bindsym $mod+Ctrl+Shift+l exec swaylock
  136. # Move focus to the parent container
  137. bindsym $mod+p focus parent
  138. # Move focus to the child.
  139. bindsym $mod+c focus child
  140. # Kill focused window.
  141. bindsym $mod+x kill
  142. # The most usable workspace bindings.
  143. bindsym $mod+1 workspace 1
  144. bindsym $mod+2 workspace 2
  145. bindsym $mod+3 workspace 3
  146. bindsym $mod+4 workspace 4
  147. bindsym $mod+5 workspace 5
  148. bindsym $mod+6 workspace 6
  149. bindsym $mod+7 workspace 7
  150. bindsym $mod+8 workspace 8
  151. bindsym $mod+9 workspace 9
  152. bindsym $mod+0 workspace 0
  153. bindsym $mod+Shift+1 move container to workspace 1
  154. bindsym $mod+Shift+2 move container to workspace 2
  155. bindsym $mod+Shift+3 move container to workspace 3
  156. bindsym $mod+Shift+4 move container to workspace 4
  157. bindsym $mod+Shift+5 move container to workspace 5
  158. bindsym $mod+Shift+6 move container to workspace 6
  159. bindsym $mod+Shift+7 move container to workspace 7
  160. bindsym $mod+Shift+8 move container to workspace 8
  161. bindsym $mod+Shift+9 move container to workspace 9
  162. bindsym $mod+Shift+0 move container to workspace 0
  163. bindsym $mod+comma focus left
  164. bindsym $mod+$left focus left
  165. bindsym $mod+$down focus down
  166. bindsym $mod+$up focus up
  167. bindsym $mod+$right focus right
  168. bindsym $mod+period focus right
  169. bindsym $mod+Ctrl+$left resize shrink width $resize_speed
  170. bindsym $mod+Ctrl+$down resize grow height $resize_speed
  171. bindsym $mod+Ctrl+$up resize shrink height $resize_speed
  172. bindsym $mod+Ctrl+$right resize grow width $resize_speed
  173. bindsym $mod+Shift+$left move left
  174. bindsym $mod+Shift+$down move down
  175. bindsym $mod+Shift+$up move up
  176. bindsym $mod+Shift+$right move right
  177. # Toggle the current focus between tiling and floating mode
  178. bindsym $mod+space floating toggle
  179. # Swap focus between the tiling area and the floating area
  180. bindsym $mod+shift+space focus mode_toggle
  181. # Toggle dvorak.
  182. set $empty_layout 'input * xkb_variant "," ; input * xkb_layout "us" ; '
  183. bindsym $mod+Tab exec swaymsg $empty_layout' input * xkb_layout "us,ru" ; input * xkb_variant "dvorak," '
  184. bindsym $mod+Return exec swaymsg $empty_layout' input * xkb_layout "us,ru" ; input * xkb_variant "dvp," '
  185. bindsym $mod+a exec swaymsg $empty_layout' input * xkb_layout "us,ru" ; input * xkb_variant "," '
  186. bindsym $mod+Backspace exec swaymsg $empty_layout' input * xkb_layout "ru,us" ; input * xkb_variant ",dvorak" '
  187. bindsym $mod+Shift+b splith
  188. bindsym $mod+Shift+v splitv
  189. bindsym $mod+minus move scratchpad
  190. bindsym $mod+Shift+minus scratchpad show
  191. bindsym $mod+Shift+s layout stacking
  192. bindsym $mod+Shift+t layout tabbed
  193. bindsym $mod+Shift+g layout toggle split
  194. bindsym $mod+Shift+f fullscreen
  195. }
  196. mode "window" {
  197. # You can "split" the current object of your focus with
  198. # $mod+b or $mod+v, for horizontal and vertical splits
  199. # respectively.
  200. bindsym b splith
  201. bindsym v splitv
  202. #
  203. # Scratchpad:
  204. #
  205. # Sway has a "scratchpad", which is a bag of holding for windows.
  206. # You can send windows there and get them back later.
  207. # Move the currently focused window to the scratchpad
  208. bindsym minus move scratchpad
  209. # Show the next scratchpad window or hide the focused scratchpad window.
  210. # If there are multiple scratchpad windows, this command cycles through them.
  211. bindsym Shift+minus scratchpad show
  212. # Switch the current container between different layout styles
  213. bindsym s layout stacking
  214. bindsym t layout tabbed
  215. bindsym g layout toggle split
  216. # Make the current focus fullscreen
  217. bindsym f fullscreen
  218. # Resize.
  219. bindsym Ctrl+$left resize shrink width $resize_speed
  220. bindsym Ctrl+$down resize grow height $resize_speed
  221. bindsym Ctrl+$up resize shrink height $resize_speed
  222. bindsym Ctrl+$right resize grow width $resize_speed
  223. # Move.
  224. bindsym Shift+$left move left
  225. bindsym Shift+$down move down
  226. bindsym Shift+$up move up
  227. bindsym Shift+$right move right
  228. # Kill focused window.
  229. bindsym x kill
  230. # Standard.
  231. # Move focus to the parent container
  232. bindsym p focus parent
  233. # Move focus to the child.
  234. bindsym c focus child
  235. bindsym space floating toggle
  236. bindsym shift+space focus mode_toggle
  237. bindsym $left focus left
  238. bindsym $down focus down
  239. bindsym $up focus up
  240. bindsym $right focus right
  241. #bindsym Space mode "default"
  242. bindsym Escape mode "default"
  243. bindsym $mod+a exec $XDG_CONFIG_HOME/sway/toggle_dvorak
  244. }
  245. mode "tag" {
  246. # Switch to workspace.
  247. bindsym 1 workspace 1
  248. bindsym 2 workspace 2
  249. bindsym 3 workspace 3
  250. bindsym 4 workspace 4
  251. bindsym 5 workspace 5
  252. bindsym 6 workspace 6
  253. bindsym 7 workspace 7
  254. bindsym 8 workspace 8
  255. bindsym 9 workspace 9
  256. bindsym 0 workspace 0
  257. bindsym q workspace q
  258. bindsym w workspace w
  259. bindsym e workspace e
  260. bindsym r workspace r
  261. bindsym t workspace t
  262. bindsym y workspace y
  263. bindsym minus workspace '-'
  264. bindsym u workspace u
  265. bindsym i workspace i
  266. bindsym o workspace o
  267. bindsym a workspace a
  268. bindsym s workspace s
  269. bindsym d workspace d
  270. bindsym f workspace f
  271. bindsym g workspace g
  272. # Move focused container to workspace.
  273. bindsym Shift+1 move container to workspace 1
  274. bindsym Shift+2 move container to workspace 2
  275. bindsym Shift+3 move container to workspace 3
  276. bindsym Shift+4 move container to workspace 4
  277. bindsym Shift+5 move container to workspace 5
  278. bindsym Shift+6 move container to workspace 6
  279. bindsym Shift+7 move container to workspace 7
  280. bindsym Shift+8 move container to workspace 8
  281. bindsym Shift+9 move container to workspace 9
  282. bindsym Shift+0 move container to workspace 0
  283. bindsym Shift+q move container to workspace q
  284. bindsym Shift+w move container to workspace w
  285. bindsym Shift+e move container to workspace e
  286. bindsym Shift+r move container to workspace r
  287. bindsym Shift+t move container to workspace t
  288. bindsym Shift+y move container to workspace y
  289. bindsym Shift+minus move container to workspace '-'
  290. bindsym Shift+u move container to workspace u
  291. bindsym Shift+i move container to workspace i
  292. bindsym Shift+o move container to workspace o
  293. bindsym Shift+p move container to workspace p
  294. bindsym Shift+a move container to workspace a
  295. bindsym Shift+s move container to workspace s
  296. bindsym Shift+d move container to workspace d
  297. bindsym Shift+f move container to workspace f
  298. bindsym Shift+g move container to workspace g
  299. # Any workspace name.
  300. bindsym Return exec $XDG_CONFIG_HOME/sway/workspace_by_menu $menucmd
  301. bindsym Shift+Return exec $XDG_CONFIG_HOME/sway/move_container_to_workspace_by_menu $menucmd
  302. #
  303. # Default.
  304. # Move focus to the parent container
  305. bindsym $mod+p focus parent
  306. # Move focus to the child.
  307. bindsym $mod+c focus child
  308. bindsym $mod+space floating toggle
  309. bindsym $mod+shift+space focus mode_toggle
  310. bindsym $mod+$left focus left
  311. bindsym $mod+$down focus down
  312. bindsym $mod+$up focus up
  313. bindsym $mod+$right focus right
  314. bindsym Space mode "default"
  315. bindsym Escape mode "default"
  316. bindsym $mod+a exec $XDG_CONFIG_HOME/sway/toggle_dvorak
  317. }
  318. mode "execute" {
  319. bindsym f exec 'firefox'
  320. bindsym Shift+f exec 'falkon'
  321. bindsym w exec 'waterfox'
  322. bindsym Ctrl+w exec 'wicd-gtk'
  323. bindsym Ctrl+Shift+w exec $termcmd' -e wicd-curses'
  324. bindsym c exec 'chromium'
  325. bindsym Ctrl+c exec 'cadence'
  326. bindsym Ctrl+p exec 'pavucontrol'
  327. bindsym Shift+c exec 'carla'
  328. bindsym o exec 'opera'
  329. bindsym g exec 'gimp'
  330. bindsym i exec 'inkscape'
  331. bindsym t exec $termcmd
  332. bindsym Shift+t exec "cool-retro-term"
  333. bindsym n exec 'non-session-manager'
  334. bindsym a exec "audacity"
  335. bindsym Shift+a exec 'ardour5'
  336. bindsym $mod+a exec 'amsynth'
  337. bindsym Shift+l exec 'lmms'
  338. bindsym l exec $termcmd' -e lf'
  339. bindsym x exec 'xfe'
  340. bindsym Ctrl+h exec $termcmd' -e htop'
  341. bindsym Ctrl+t exec $termcmd' -e top'
  342. bindsym Ctrl+s exec $termcmd' -e alsamixer'
  343. # Default.
  344. #
  345. # Move focus to the parent container
  346. bindsym $mod+p focus parent
  347. # Move focus to the child.
  348. bindsym $mod+c focus child
  349. bindsym $mod+space floating toggle
  350. bindsym $mod+$left focus left
  351. bindsym $mod+$down focus down
  352. bindsym $mod+$up focus up
  353. bindsym $mod+$right focus right
  354. bindsym Space mode "default"
  355. bindsym Escape mode "default"
  356. }
  357. mode "empty" {
  358. bindsym $mod+Space mode "default"
  359. bindsym $mod+a exec $XDG_CONFIG_HOME/sway/toggle_dvorak
  360. }
  361. #
  362. # Status Bar:
  363. #
  364. # Read `man 5 sway-bar` for more information about this section.
  365. include @sysconfdir@/sway/config.d/*