logo

dotfiles

My dotfiles, one branch per machine, rebased on base git clone https://anongit.hacktivis.me/git/dotfiles.git/

config (5402B)


  1. # Default config for sway
  2. # See sway(5)
  3. set $mod Mod4
  4. set $left h
  5. set $down j
  6. set $up k
  7. set $right l
  8. set $term svte
  9. set $menu dmenu_path | bemenu | xargs swaymsg exec
  10. exec swayidle -w \
  11. timeout 30 'swaymsg output "*" dpms off' \
  12. resume 'swaymsg output "*" dpms on' \
  13. timeout 60 locker \
  14. timeout 80 memsys
  15. exec wlsunset -l 47.6 -L -1.8
  16. # Keybindings
  17. # Based on XMonad
  18. bindsym --to-code $mod+1 workspace 1
  19. bindsym --to-code $mod+2 workspace 2
  20. bindsym --to-code $mod+3 workspace 3
  21. bindsym --to-code $mod+4 workspace 4
  22. bindsym --to-code $mod+5 workspace 5
  23. bindsym --to-code $mod+6 workspace 6
  24. bindsym --to-code $mod+7 workspace 7
  25. bindsym --to-code $mod+8 workspace 8
  26. bindsym --to-code $mod+9 workspace 9
  27. bindsym --to-code $mod+0 workspace 10
  28. bindsym --to-code $mod+Shift+1 move window to workspace 1
  29. bindsym --to-code $mod+Shift+2 move window to workspace 2
  30. bindsym --to-code $mod+Shift+3 move window to workspace 3
  31. bindsym --to-code $mod+Shift+4 move window to workspace 4
  32. bindsym --to-code $mod+Shift+5 move window to workspace 5
  33. bindsym --to-code $mod+Shift+6 move window to workspace 6
  34. bindsym --to-code $mod+Shift+7 move window to workspace 7
  35. bindsym --to-code $mod+Shift+8 move window to workspace 8
  36. bindsym --to-code $mod+Shift+9 move window to workspace 9
  37. bindsym --to-code $mod+Shift+0 move window to workspace 10
  38. bindsym --to-code $mod+q reload
  39. bindsym --to-code $mod+Shift+q exit
  40. bindsym --to-code $mod+w focus output left
  41. bindsym --to-code $mod+Shift+w move window to output left
  42. bindsym --to-code $mod+e focus output right
  43. bindsym --to-code $mod+Shift+e move window to output right
  44. input "2:10:TPPS/2_Elan_TrackPoint" {
  45. scroll_factor 2
  46. pointer_accel 0.5
  47. }
  48. input "2:7:SynPS/2_Synaptics_TouchPad" {
  49. accel_profile flat
  50. natural_scroll enabled
  51. scroll_factor 2
  52. }
  53. input "1149:4130:Kensington_USB_Orbit" {
  54. middle_emulation enabled
  55. scroll_button button2
  56. }
  57. # Fucks with games
  58. input * dwt disabled
  59. bindsym --to-code $mod+Shift+p exec exec hiq-prompt
  60. bindsym --to-code $mod+p exec $menu
  61. bindsym $mod+Return exec $term
  62. bindsym --to-code $mod+Shift+c kill
  63. bindsym $mod+space layout toggle all
  64. bindsym $mod+Shift+space layout stacking
  65. floating_modifier $mod normal
  66. tiling_drag enable
  67. # Move your focus around
  68. bindsym --to-code $mod+$left focus left
  69. bindsym --to-code $mod+$down focus down
  70. bindsym --to-code $mod+$up focus up
  71. bindsym --to-code $mod+$right focus right
  72. # _move_ the focused window with the same, but add Shift
  73. bindsym --to-code $mod+Shift+$left move left
  74. bindsym --to-code $mod+Shift+$down move down
  75. bindsym --to-code $mod+Shift+$up move up
  76. bindsym --to-code $mod+Shift+$right move right
  77. bindsym --to-code $mod+f fullscreen
  78. bindsym --to-code $mod+s layout stacking
  79. bindsym --to-code $mod+a focus parent
  80. #
  81. # Scratchpad:
  82. #
  83. # Sway has a "scratchpad", which is a bag of holding for windows.
  84. # You can send windows there and get them back later.
  85. # Move the currently focused window to the scratchpad
  86. bindsym $mod+Shift+minus move scratchpad
  87. # Show the next scratchpad window or hide the focused scratchpad window.
  88. # If there are multiple scratchpad windows, this command cycles through them.
  89. bindsym --to-code $mod+minus scratchpad show
  90. bindsym --to-code $mod+t floating disable
  91. bindsym --to-code $mod+Shift+t floating enable
  92. #
  93. # Resizing containers:
  94. #
  95. mode "resize" {
  96. # left will shrink the containers width
  97. # right will grow the containers width
  98. # up will shrink the containers height
  99. # down will grow the containers height
  100. bindsym --to-code $left resize shrink width 10px
  101. bindsym --to-code $down resize grow height 10px
  102. bindsym --to-code $up resize shrink height 10px
  103. bindsym --to-code $right resize grow width 10px
  104. # ditto, with arrow keys
  105. bindsym Left resize shrink width 10px
  106. bindsym Down resize grow height 10px
  107. bindsym Up resize shrink height 10px
  108. bindsym Right resize grow width 10px
  109. # return to default mode
  110. bindsym Return mode "default"
  111. bindsym Escape mode "default"
  112. }
  113. bindsym --to-code $mod+r mode "resize"
  114. bar {
  115. swaybar_command waybar
  116. }
  117. focus_follows_mouse no
  118. focus_on_window_activation none
  119. focus_wrapping no
  120. mouse_warping none
  121. workspace_layout stacking
  122. default_border pixel 1
  123. default_floating_border pixel 1
  124. smart_borders on
  125. # No titlebar ever
  126. exec_always swaymsg font "monospace 0"
  127. titlebar_border_thickness 0
  128. titlebar_padding 0
  129. for_window [title=".*"] title_format %title [%pid] (%class, %instance, %shell)
  130. for_window [app_id="mpv"] move workspace 3
  131. # Make sure XKB_DEFAULT_* stuff is used
  132. exec_always swaymsg 'input * xkb_layout "'${XKB_DEFAULT_LAYOUT}'"'
  133. exec_always swaymsg 'input * xkb_variant "'${XKB_DEFAULT_VARIANT}'"'
  134. exec_always swaymsg 'input * xkb_options "'${XKB_DEFAULT_OPTIONS}'"'
  135. bindsym Print exec 'slurp | grim -g - /tmp/screen.png'
  136. exec_always swaymsg 'output * bg "'${MY_WALLPAPER}'" "'${MY_WALLPAPER_MODE}'"'
  137. #bindsym --to-code $mod+b bar hidden_state toggle
  138. bindsym --to-code $mod+b exec killall -SIGUSR1 waybar
  139. bindsym XF86AudioMute exec amixer set Master playback toggle
  140. bindsym XF86AudioRaiseVolume exec amixer set Master playback 1%+
  141. bindsym XF86AudioLowerVolume exec amixer set Master playback 1%-
  142. bindsym XF86AudioMicMute exec amixer set Capture capture toggle
  143. bindsym XF86AudioPlay exec mpc toggle
  144. bindsym XF86AudioStop exec mpc stop
  145. bindsym XF86AudioPrev exec mpv prev
  146. bindsym XF86AudioNext exec mpv next
  147. exec $term