You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

350 lines
13 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
3 years ago
2 years ago
2 years ago
2 years ago
  1. # Please see http://i3wm.org/docs/userguide.html for a complete reference!
  2. #xwayland disable
  3. set $mod Mod4
  4. set $alt Mod1
  5. font Vulf Mono, FontAwesome 12
  6. bindsym $mod+F7 exec --no-startup-id xset r rate 250 25 && xset b off && setxkbmap -option caps:escape
  7. # Use Mouse+$mod to drag floating windows to their wanted position
  8. floating_modifier $mod
  9. # start a terminal
  10. bindsym $mod+Return exec --no-startup-id foot
  11. # kill focused window
  12. bindsym $mod+q kill
  13. # lock screen
  14. bindsym $mod+$alt+s exec swaylock
  15. #exec swayidle -w \
  16. # timeout 600 'swaylock'
  17. exec swayidle -w \
  18. timeout 1200 'swaymsg "output * dpms off"'\
  19. resume 'swaymsg "output * dpms on"' \
  20. before-sleep 'swaylock --screenshots --clock --indicator --indicator-radius 100 --indicator-thickness 7 --effect-blur 7x5 --effect-vignette 0.5:0.5 --ring-color bb00cc --key-hl-color 880033 --line-color 00000000 --inside-color 00000088 --separator-color 00000000 --grace 2 --fade-in 0.2'
  21. # start rofi (a program launcher)
  22. bindsym XF86LaunchA exec --no-startup-id rofi -show run
  23. bindcode 225 exec --no-startup-id rofi -show run
  24. bindsym $mod+space exec --no-startup-id rofi -show run
  25. for_window [app_id="^launcher$"] floating enable, sticky enable, resize set 30 ppt 60 ppt, border pixel 10
  26. set $menu exec alacritty --class=launcher -e sway-launcher-desktop
  27. #bindsym $mod+space exec $menu
  28. # change focus
  29. bindsym $mod+j focus left
  30. bindsym $mod+k focus down
  31. bindsym $mod+l focus up
  32. bindsym $mod+semicolon focus right
  33. # alternatively, you can use the cursor keys:
  34. bindsym $mod+Left focus left
  35. bindsym $mod+Down focus down
  36. bindsym $mod+Up focus up
  37. bindsym $mod+Right focus right
  38. # move focused window
  39. bindsym $mod+Shift+j move left
  40. bindsym $mod+Shift+k move down
  41. bindsym $mod+Shift+l move up
  42. bindsym $mod+Shift+semicolon move right
  43. # alternatively, you can use the cursor keys:
  44. bindsym $mod+Shift+Left move left
  45. bindsym $mod+Shift+Down move down
  46. bindsym $mod+Shift+Up move up
  47. bindsym $mod+Shift+Right move right
  48. # split in horizontal orientation
  49. bindsym $mod+h split h
  50. # split in vertical orientation
  51. bindsym $mod+v split v
  52. # enter fullscreen mode for the focused container
  53. bindsym $mod+d fullscreen
  54. bindsym $mod+$alt+f fullscreen
  55. # change container layout (stacked, tabbed, toggle split)
  56. bindsym $mod+s layout stacking
  57. bindsym $mod+t layout tabbed
  58. bindsym $mod+e layout toggle split
  59. # toggle tiling / floating
  60. bindsym $mod+Shift+space floating toggle
  61. # change focus between tiling / floating windows
  62. bindsym $mod+$alt+space focus mode_toggle
  63. # focus the parent container
  64. bindsym $mod+p focus parent
  65. # focus the child container
  66. bindsym $mod+c focus child
  67. # reload the configuration file
  68. bindsym $mod+Shift+c reload
  69. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  70. bindsym $mod+Shift+r restart
  71. # exit i3 (logs you out of your X session)
  72. bindsym $mod+Shift+e exec "i3-nagbar -t warning -m 'You pressed the exit shortcut. Do you really want to exit i3? This will end your X session.' -b 'Yes, exit i3' 'i3-msg exit'"
  73. # switch to workspace
  74. bindsym $mod+1 workspace 1
  75. bindsym $mod+2 workspace 2
  76. bindsym $mod+3 workspace 3
  77. bindsym $mod+4 workspace 4
  78. bindsym $mod+5 workspace 5
  79. bindsym $mod+6 workspace 6
  80. bindsym $mod+7 workspace 7
  81. bindsym $mod+8 workspace 8
  82. bindsym $mod+9 workspace 9
  83. bindsym $mod+0 workspace 10
  84. bindsym Mod1+Control+Right workspace next
  85. bindsym Mod1+Control+Left workspace prev
  86. workspace_auto_back_and_forth yes
  87. bindsym $mod+z workspace back_and_forth
  88. bindsym $mod+Shift+z move container to workspace back_and_forth
  89. # move focused container to workspace
  90. bindsym $mod+Shift+1 move container to workspace 1
  91. bindsym $mod+Shift+2 move container to workspace 2
  92. bindsym $mod+Shift+3 move container to workspace 3
  93. bindsym $mod+Shift+4 move container to workspace 4
  94. bindsym $mod+Shift+5 move container to workspace number 5
  95. bindsym $mod+Shift+6 move container to workspace number 6
  96. bindsym $mod+Shift+7 move container to workspace number 7
  97. bindsym $mod+Shift+8 move container to workspace number 8
  98. bindsym $mod+Shift+9 move container to workspace number 9
  99. bindsym $mod+Shift+0 move container to workspace number 10
  100. ########################
  101. ## Custom Keybindings
  102. ########################
  103. bindsym $mod+f exec --no-startup-id alacrity -e ranger
  104. bindsym Print exec scrot -s -e 'mv $f ~/Downloads'
  105. bindsym $mod+m move scratchpad
  106. bindsym $mod+n scratchpad show
  107. bindsym $mod+Shift+s sticky toggle
  108. bindsym $mod+Shift+alt+Control+s screenshot
  109. bindsym alt+Shift+Control+s notify-send "test"
  110. # macros
  111. bindsym Control+F4 exec /usr/local/bin/screenshot
  112. bindsym Control+F5 exec /usr/bin/watson stop && exec notify-send "Clocked out!"
  113. bindsym Control+F6 exec notify-send "F6"
  114. bindsym Control+F7 exec notify-send "F7"
  115. bindsym Control+F8 exec notify-send "F8"
  116. bindsym Control+F9 exec notify-send "F9"
  117. bindsym Control+F10 exec notify-send "F10"
  118. bindsym Control+F11 exec notify-send "F11"
  119. bindsym Control+F12 exec notify-send "F12"
  120. # screenshare
  121. bindsym $mod+x exec dmenuscreenshare.sh
  122. #bindsym Control+k exec --no-startup-id echo "core.weechat */buffer_dmenu" >> $(find ~/.weechat -type p)
  123. # Notifications
  124. bindsym $mod+Control+Shift+space exec --no-startup-id makoctl dismiss -a
  125. bindsym $mod+Control+space exec --no-startup-id makoctl dismiss
  126. #########################
  127. ## Floating Windows
  128. #########################
  129. for_window [window_role = "pop-up"] floating enable
  130. for_window [window_role = "bubble"] floating enable
  131. for_window [window_role = "dialog"] floating enable
  132. for_window [window_type = "dialog"] floating enable
  133. for_window [window_role = "task_dialog"] floating enable
  134. for_window [window_type = "menu"] floating enable
  135. for_window [app_id = "floating"] floating enable
  136. for_window [class="Android SDK Manager" instance="Android SDK Manager"] floating enable
  137. for_window [class="Cb-exit" instance="cb-exit"] floating enable
  138. for_window [class="Cb-exit" instance="cb-exit"] border none
  139. for_window [class="^Pavucontrol$"] floating enable
  140. for_window [instance="crx_gaedmjdfmmahhbjefcbgaolhhanlaolb"] floating enable
  141. for_window [class="Google-chrome" instance="crx_nckgahadagoaajjgafhacjanaoiihapd"] floating enable
  142. for_window [class="chrome_app_list"] floating enable
  143. for_window [class="Plexamp"] floating enable
  144. for_window [class="blueman-manager"] floating enable
  145. for_window [class="^Bluetooth Devices"] floating enable
  146. # https://github.com/ValveSoftware/steam-for-linux/issues/1040
  147. for_window [class="^Steam$" title="^Friends$"] floating enable
  148. for_window [class="^Steam$" title="Steam - News"] floating enable
  149. for_window [class="^Steam$" title=".* - Chat"] floating enable
  150. for_window [class="^Steam$" title="^Settings$"] floating enable
  151. for_window [class="^Steam$" title=".* - event started"] floating enable
  152. for_window [class="^Steam$" title=".* CD key"] floating enable
  153. for_window [class="^Steam$" title="^Steam - Self Updater$"] floating enable
  154. for_window [class="^Steam$" title="^Screenshot Uploader$"] floating enable
  155. for_window [class="^Steam$" title="^Steam Guard - Computer Authorization Required$"] floating enable
  156. for_window [title="^Steam Keyboard$"] floating enable
  157. for_window [title="Qalculate!"] floating enable
  158. for_window [title="Origin"] floating enable
  159. #for_window [title="Zoom"] floating enable
  160. #for_window [title="Zoom Cloud Meetings"] floating enable
  161. # Zoom
  162. for_window [app_id="zoom"] floating enable
  163. for_window [app_id="zoom" title="Choose ONE of the audio conference options"] floating enable
  164. for_window [app_id="zoom" title="zoom"] floating enable
  165. for_window [app_id="zoom" title="Zoom Meeting"] floating disable
  166. for_window [app_id="zoom" title="Zoom - Free Account"] floating disable
  167. # Tag xwayland windows with [X]
  168. for_window [shell="xwayland"] title_format "<span>[X] %title゜</span>"
  169. for_window [app_id = "avizo-service"] border pixel 0, sticky toggle
  170. no_focus [app_id="avizo-service"]
  171. ###########################
  172. ## Assign Workspaces
  173. ##########################
  174. assign [class="Slack"] 3
  175. assign [class="Plexamp"] 3
  176. ##########################
  177. ## Gaps
  178. ##########################
  179. # new_window 1pixel
  180. default_border pixel 0
  181. #Hide border if 1 window
  182. hide_edge_borders both
  183. set $default_gaps_inner 15
  184. set $default_gaps_outer 15
  185. gaps inner $default_gaps_inner
  186. gaps outer $default_gaps_outer
  187. smart_gaps on
  188. # resize window (you can also use the mouse for that)
  189. mode "resize" {
  190. # These bindings trigger as soon as you enter the resize mode
  191. # Pressing left will shrink the window’s width.
  192. # Pressing right will grow the window’s width.
  193. # Pressing up will shrink the window’s height.
  194. # Pressing down will grow the window’s height.
  195. bindsym j resize shrink width 10 px or 10 ppt
  196. bindsym k resize grow height 10 px or 10 ppt
  197. bindsym l resize shrink height 10 px or 10 ppt
  198. bindsym semicolon resize grow width 10 px or 10 ppt
  199. # same bindings, but for the arrow keys
  200. bindsym Left resize shrink width 10 px or 10 ppt
  201. bindsym Down resize grow height 10 px or 10 ppt
  202. bindsym Up resize shrink height 10 px or 10 ppt
  203. bindsym Right resize grow width 10 px or 10 ppt
  204. # back to normal: Enter or Escape
  205. bindsym Return mode "default"
  206. bindsym Escape mode "default"
  207. }
  208. bindsym $mod+r mode "resize"
  209. # Resize Containers, Vim-style ($mod+Control+[hjkl])
  210. bindsym $mod+Control+j resize grow height 5 px or 5 ppt
  211. bindsym $mod+Control+k resize shrink height 5 px or 5 ppt
  212. bindsym $mod+Control+l resize grow width 5 px or 5 ppt
  213. bindsym $mod+Control+h resize shrink width 5 px or 5 ppt
  214. bindsym $mod+Control+Up resize grow height 5 px or 5 ppt
  215. bindsym $mod+Control+Down resize shrink height 5 px or 5 ppt
  216. bindsym $mod+Control+Right resize grow width 5 px or 5 ppt
  217. bindsym $mod+Control+Left resize shrink width 5 px or 5 ppt
  218. # Start i3bar to display a workspace bar (plus the system information i3status
  219. # finds out, if available)
  220. bar {
  221. swaybar_command waybar
  222. }
  223. #
  224. #bar {
  225. # position top
  226. # status_command i3blocks
  227. # font pango:Liberation 10, FontAwesome 12
  228. # strip_workspace_numbers yes
  229. #
  230. # colors {
  231. # separator #586e75
  232. # background #0c1014
  233. # statusline #aea79f
  234. # focused_workspace #091f2e #091f2e #ffffff
  235. # active_workspace #073642 #073642 #ffffff
  236. # inactive_workspace #0c1014 #0c1014 #aea79f
  237. # urgent_workspace #77216f #77216f #ffffff
  238. # }
  239. #}
  240. # class border backgr. text indicator child_border
  241. client.focused #FFFFFF #BF360C #fdf6e3 #FF0000 #FFFFFF
  242. client.focused_inactive #073642 #FF9800 #93a1a1 #002b36 #073642
  243. client.unfocused #002b36 #311B92 #586e75 #002b36 #002b36
  244. client.urgent #dc322f #b71c1c #fdf6e3 #dc322f #dc322f
  245. ############################
  246. ## Displays
  247. ############################
  248. #HOME
  249. output HDMI-A-1 pos 0 0 res 3440x1440
  250. output DP-1 pos 0 1440 res 3440x1440
  251. # background images
  252. #output * bg ~/Pictures/Wallpapers/calvin-hobbes-stars.jpg fill
  253. output * bg ~/Pictures/Wallpapers/phin-swing.jpg fill
  254. bindsym $mod+Shift+m exec --no-startup-id "sway output output DP-1 pos 2880 0 res 1920x1080 && sway ouput DP-2 res 1920x1080"
  255. ##############################
  256. ## Startup Things
  257. ##############################
  258. #exec --no-startup-id pcmanfm -d
  259. #exec --no-startup-id xset r rate 250 25
  260. #exec --no-startup-id xset b off
  261. #exec --no-startup-id setxkbmap -option caps:escape
  262. #exec --no-startup-id nightshift -l 39.0315533:-94.4954291 -d
  263. #exec --no-startup-id setxkbmap -model apple_laptop -layout us -variant dvp
  264. exec --no-startup-id mako
  265. exec --no-startup-id blueman-applet
  266. exec autotiling
  267. exec udiskie
  268. exec wl-paste -t text --watch clipman store
  269. exec avizo-service
  270. #############################
  271. ## Media Keys
  272. #############################
  273. #bindsym XF86AudioLowerVolume exec --no-startup-id "pulseaudio-ctl down ; pkill -RTMIN+1 i3blocks"
  274. #bindsym XF86AudioRaiseVolume exec --no-startup-id "pulseaudio-ctl up ; pkill -RTMIN+1 i3blocks"
  275. #bindsym XF86AudioMute exec --no-startup-id "pulseaudio-ctl mute ; pkill -RTMIN+1 i3blocks"
  276. bindsym XF86AudioRaiseVolume exec volumectl raise
  277. bindsym XF86AudioLowerVolume exec volumectl lower
  278. bindsym XF86AudioMute exec volumectl mute
  279. # bindsym XF86AudioPlay exec --no-startup-id playerctl play-pause
  280. # bindsym XF86AudioPause exec --no-startup-id playerctl play-pause
  281. # bindsym XF86AudioPlayPause exec --no-startup-id playerctl play-pause
  282. #bindsym $mod1+Shift+p exec --no-startup-id echo "cycle pause" > ~/.config/mpv/control
  283. bindsym XF86MonBrightnessUp exec --no-startup-id "brightnessctl s +10%; brightnessctl -d gmux_backlight s +10%"
  284. bindsym XF86MonBrightnessDown exec --no-startup-id "brightnessctl s 10%-; brightnessctl -d gmux_backlight s 10%-"
  285. set $gnome-schema org.gnome.desktop.interface
  286. exec_always {
  287. gsettings set $gnome-schema gtk-theme 'Flat-Remix-GTK-Green-Darkest'
  288. gsettings set $gnome-schema icon-theme 'Flat-Remix-Green-Dark'
  289. }
  290. # fix slow launch: exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
  291. exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
  292. exec hash dbus-update-activation-environment 2>/dev/null && \
  293. dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
  294. include /etc/sway/config.d/*