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.

384 lines
14 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
1 year ago
2 years ago
3 years ago
1 year 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. set $term foot
  6. font Vulf Mono, FontAwesome 12
  7. bindsym $mod+F7 exec --no-startup-id xset r rate 250 25 && xset b off && setxkbmap -option caps:escape
  8. # Use Mouse+$mod to drag floating windows to their wanted position
  9. floating_modifier $mod
  10. # start a terminal
  11. bindsym $mod+Return exec --no-startup-id foot
  12. # kill focused window
  13. bindsym $mod+q kill
  14. # lock screen
  15. bindsym $mod+$alt+s exec swaylock
  16. #exec swayidle -w \
  17. # timeout 600 'swaylock'
  18. exec swayidle -w \
  19. timeout 1200 'swaymsg "output * dpms off"'\
  20. resume 'swaymsg "output * dpms on"' \
  21. 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'
  22. # start rofi (a program launcher)
  23. bindsym XF86LaunchA exec --no-startup-id rofi -show run
  24. bindcode 225 exec --no-startup-id rofi -show run
  25. #bindsym $mod+space exec --no-startup-id rofi -show run
  26. for_window [app_id="^launcher$"] floating enable, sticky enable, resize set 30 ppt 60 ppt, border pixel 10
  27. #set $menu exec alacritty --class=launcher -e sway-launcher-desktop
  28. set $menu rofi -combi-modi drun\,run\,ssh\,emoji\,calc -show combi -modi combi\,run\,ssh\,emoji\,calc -sidebar-mode -show-icons -normal-window
  29. #bindsym $mod+space exec $menu
  30. #
  31. # App launcher mode
  32. #
  33. # This mode let's you quickly lunch an app, bound to a hotkey or the $menu app
  34. # launcher. Default mode switch is $mod+space.
  35. # - pressing $mod+space twice quickly launches $menu
  36. # - pressing $mod+space, then one of the app 'shortcuts' launches the app
  37. # After any actions, the mode resets to default within $appmode_timeout seconds
  38. set $appmode_timeout 1
  39. mode "app" {
  40. bindsym $mod+space exec $menu
  41. bindsym --release $mod+space mode "default"
  42. # Mnemonic: [b]rowser
  43. bindsym b exec MOZ_ENABLE_WAYLAND=1 waterfox-g4
  44. # Mnemonic: [f]ile explorer
  45. bindsym f exec 'io.elementary.files'
  46. # Mnemonic: [F]ile explorer, GUI
  47. bindsym shift+f exec thunar
  48. # Mnemonic: [m]usic
  49. bindsym m exec $term -e bash -ci 'ncmpcpp'
  50. # Mnemonic: [n]otes
  51. bindsym n exec $term -e bash -ci 'notes'
  52. # Mnemonic: [h]ome
  53. bindsym h exec $term -e bash -ci 'home'
  54. # Mnemonic: [o]pen. Opens a quick browser with ripgrep's result
  55. bindsym o exec xdg-open "$(rg --files | rofi -normal-window -dmenu -i)"
  56. # Mnemonic: [p]assword
  57. bindsym p exec bwmenu --auto-lock 604800 -- -normal-window
  58. # Mnemonic: [v]irtual machine
  59. bindsym v exec env QT_QPA_PLATFORM=xcb virtualbox
  60. # Mnemonic: [w]indows 10
  61. bindsym w exec env QT_QPA_PLATFORM=xcb vboxmanage startvm Windows10
  62. # Mnemonic: [a]rch linux
  63. bindsym a exec env QT_QPA_PLATFORM=xcb vboxmanage startvm Arch
  64. # Mnemonix: tmu[x]
  65. bindsym x exec $term -e bash -ci 'tmux-session'
  66. bindsym c exec vscodium --enable-features=UseOzonePlatform --ozone-platform=wayland
  67. #bindsym c exec vscodium
  68. bindsym s exec slack --enable-features=UseOzonePlatform --ozone-platform=wayland
  69. #bindsym s exec slack
  70. bindsym d exec discord
  71. bindsym t exec fluffychat
  72. bindsym Escape mode "default"
  73. }
  74. bindsym $mod+space exec swaymsg mode "app" && sleep $appmode_timeout && swaymsg mode "default"
  75. # change focus
  76. bindsym $mod+j focus left
  77. bindsym $mod+k focus down
  78. bindsym $mod+l focus up
  79. bindsym $mod+semicolon focus right
  80. # alternatively, you can use the cursor keys:
  81. bindsym $mod+Left focus left
  82. bindsym $mod+Down focus down
  83. bindsym $mod+Up focus up
  84. bindsym $mod+Right focus right
  85. # move focused window
  86. bindsym $mod+Shift+j move left
  87. bindsym $mod+Shift+k move down
  88. bindsym $mod+Shift+l move up
  89. bindsym $mod+Shift+semicolon move right
  90. # alternatively, you can use the cursor keys:
  91. bindsym $mod+Shift+Left move left
  92. bindsym $mod+Shift+Down move down
  93. bindsym $mod+Shift+Up move up
  94. bindsym $mod+Shift+Right move right
  95. # split in horizontal orientation
  96. bindsym $mod+h split h
  97. # split in vertical orientation
  98. bindsym $mod+v split v
  99. # enter fullscreen mode for the focused container
  100. bindsym $mod+d fullscreen
  101. bindsym $mod+$alt+f fullscreen
  102. # change container layout (stacked, tabbed, toggle split)
  103. bindsym $mod+s layout stacking
  104. bindsym $mod+t layout tabbed
  105. bindsym $mod+e layout toggle split
  106. # toggle tiling / floating
  107. bindsym $mod+Shift+space floating toggle
  108. # change focus between tiling / floating windows
  109. bindsym $mod+$alt+space focus mode_toggle
  110. # focus the parent container
  111. bindsym $mod+p focus parent
  112. # focus the child container
  113. bindsym $mod+c focus child
  114. # reload the configuration file
  115. bindsym $mod+Shift+c reload
  116. # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)
  117. bindsym $mod+Shift+r restart
  118. # exit i3 (logs you out of your X session)
  119. 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'"
  120. # switch to workspace
  121. bindsym $mod+1 workspace 1
  122. bindsym $mod+2 workspace 2
  123. bindsym $mod+3 workspace 3
  124. bindsym $mod+4 workspace 4
  125. bindsym $mod+5 workspace 5
  126. bindsym $mod+6 workspace 6
  127. bindsym $mod+7 workspace 7
  128. bindsym $mod+8 workspace 8
  129. bindsym $mod+9 workspace 9
  130. bindsym $mod+0 workspace 10
  131. bindsym Mod1+Control+Right workspace next
  132. bindsym Mod1+Control+Left workspace prev
  133. workspace_auto_back_and_forth yes
  134. bindsym $mod+z workspace back_and_forth
  135. bindsym $mod+Shift+z move container to workspace back_and_forth
  136. # move focused container to workspace
  137. bindsym $mod+Shift+1 move container to workspace 1
  138. bindsym $mod+Shift+2 move container to workspace 2
  139. bindsym $mod+Shift+3 move container to workspace 3
  140. bindsym $mod+Shift+4 move container to workspace 4
  141. bindsym $mod+Shift+5 move container to workspace number 5
  142. bindsym $mod+Shift+6 move container to workspace number 6
  143. bindsym $mod+Shift+7 move container to workspace number 7
  144. bindsym $mod+Shift+8 move container to workspace number 8
  145. bindsym $mod+Shift+9 move container to workspace number 9
  146. bindsym $mod+Shift+0 move container to workspace number 10
  147. ########################
  148. ## Custom Keybindings
  149. ########################
  150. bindsym $mod+f exec --no-startup-id alacrity -e ranger
  151. bindsym Print exec scrot -s -e 'mv $f ~/Downloads'
  152. bindsym $mod+m move scratchpad
  153. bindsym $mod+n scratchpad show
  154. bindsym $mod+Shift+s sticky toggle
  155. bindsym $mod+Shift+alt+Control+s screenshot
  156. bindsym alt+Shift+Control+s notify-send "test"
  157. # macros
  158. bindsym Control+F4 exec /usr/local/bin/screenshot
  159. bindsym Control+F5 exec /usr/bin/watson stop && exec notify-send "Clocked out!"
  160. bindsym Control+F6 exec notify-send "F6"
  161. bindsym Control+F7 exec notify-send "F7"
  162. bindsym Control+F8 exec notify-send "F8"
  163. bindsym Control+F9 exec notify-send "F9"
  164. bindsym Control+F10 exec notify-send "F10"
  165. bindsym Control+F11 exec notify-send "F11"
  166. bindsym Control+F12 exec notify-send "F12"
  167. # screenshare
  168. bindsym $mod+x exec dmenuscreenshare.sh
  169. #bindsym Control+k exec --no-startup-id echo "core.weechat */buffer_dmenu" >> $(find ~/.weechat -type p)
  170. # Notifications
  171. bindsym $mod+Control+Shift+space exec --no-startup-id makoctl dismiss -a
  172. bindsym $mod+Control+space exec --no-startup-id makoctl dismiss
  173. #########################
  174. ## Floating Windows
  175. #########################
  176. for_window [window_role = "pop-up"] floating enable
  177. for_window [window_role = "bubble"] floating enable
  178. for_window [window_role = "dialog"] floating enable
  179. for_window [window_type = "dialog"] floating enable
  180. for_window [window_role = "task_dialog"] floating enable
  181. for_window [window_type = "menu"] floating enable
  182. for_window [app_id = "floating"] floating enable
  183. for_window [class="Android SDK Manager" instance="Android SDK Manager"] floating enable
  184. for_window [class="Cb-exit" instance="cb-exit"] floating enable
  185. for_window [class="Cb-exit" instance="cb-exit"] border none
  186. for_window [class="^Pavucontrol$"] floating enable
  187. for_window [instance="crx_gaedmjdfmmahhbjefcbgaolhhanlaolb"] floating enable
  188. for_window [class="Google-chrome" instance="crx_nckgahadagoaajjgafhacjanaoiihapd"] floating enable
  189. for_window [class="chrome_app_list"] floating enable
  190. for_window [class="Plexamp"] floating enable
  191. for_window [class="blueman-manager"] floating enable
  192. for_window [class="^Bluetooth Devices"] floating enable
  193. # https://github.com/ValveSoftware/steam-for-linux/issues/1040
  194. for_window [class="^Steam$" title="^Friends$"] floating enable
  195. for_window [class="^Steam$" title="Steam - News"] floating enable
  196. for_window [class="^Steam$" title=".* - Chat"] floating enable
  197. for_window [class="^Steam$" title="^Settings$"] floating enable
  198. for_window [class="^Steam$" title=".* - event started"] floating enable
  199. for_window [class="^Steam$" title=".* CD key"] floating enable
  200. for_window [class="^Steam$" title="^Steam - Self Updater$"] floating enable
  201. for_window [class="^Steam$" title="^Screenshot Uploader$"] floating enable
  202. for_window [class="^Steam$" title="^Steam Guard - Computer Authorization Required$"] floating enable
  203. for_window [title="^Steam Keyboard$"] floating enable
  204. for_window [title="Qalculate!"] floating enable
  205. for_window [title="Origin"] floating enable
  206. for_window [title="Firefox Developer Edition - Sharing Indicator"] floating enable
  207. for_window [class="Rofi"] floating enable
  208. # Zoom
  209. for_window [app_id="zoom"] floating enable
  210. for_window [class="^Zoom$"] floating enable
  211. for_window [class="zoom"] floating enable
  212. for_window [class="zoom.real"] floating enable
  213. for_window [class="^zoom$"] floating enable
  214. for_window [app_id="zoom" title="Choose ONE of the audio conference options"] floating enable
  215. for_window [app_id="zoom" title="zoom"] floating enable
  216. for_window [app_id="zoom" title="Zoom Meeting"] floating disable
  217. for_window [title="KJAX_loop.gif - mpv"] floating enable
  218. # Tag xwayland windows with [X]
  219. for_window [shell="xwayland"] title_format "<span>[X] %title゜</span>"
  220. for_window [app_id = "avizo-service"] border pixel 0, sticky toggle
  221. no_focus [app_id="avizo-service"]
  222. ###########################
  223. ## Assign Workspaces
  224. ##########################
  225. assign [class="Slack"] 3
  226. assign [class="Plexamp"] 3
  227. assign [class="Discord"] 3
  228. assign [class="Fluffychat"] 3
  229. assign [class="Telegram"] 3
  230. ##########################
  231. ## Gaps
  232. ##########################
  233. # new_window 1pixel
  234. default_border pixel 0
  235. #Hide border if 1 window
  236. hide_edge_borders both
  237. set $default_gaps_inner 15
  238. set $default_gaps_outer 15
  239. gaps inner $default_gaps_inner
  240. gaps outer $default_gaps_outer
  241. smart_gaps on
  242. # resize window (you can also use the mouse for that)
  243. mode "resize" {
  244. # These bindings trigger as soon as you enter the resize mode
  245. # Pressing left will shrink the window’s width.
  246. # Pressing right will grow the window’s width.
  247. # Pressing up will shrink the window’s height.
  248. # Pressing down will grow the window’s height.
  249. bindsym j resize shrink width 10 px or 10 ppt
  250. bindsym k resize grow height 10 px or 10 ppt
  251. bindsym l resize shrink height 10 px or 10 ppt
  252. bindsym semicolon resize grow width 10 px or 10 ppt
  253. # same bindings, but for the arrow keys
  254. bindsym Left resize shrink width 10 px or 10 ppt
  255. bindsym Down resize grow height 10 px or 10 ppt
  256. bindsym Up resize shrink height 10 px or 10 ppt
  257. bindsym Right resize grow width 10 px or 10 ppt
  258. # back to normal: Enter or Escape
  259. bindsym Return mode "default"
  260. bindsym Escape mode "default"
  261. }
  262. bindsym $mod+r mode "resize"
  263. # Resize Containers, Vim-style ($mod+Control+[hjkl])
  264. bindsym $mod+Control+j resize grow height 5 px or 5 ppt
  265. bindsym $mod+Control+k resize shrink height 5 px or 5 ppt
  266. bindsym $mod+Control+l resize grow width 5 px or 5 ppt
  267. bindsym $mod+Control+h resize shrink width 5 px or 5 ppt
  268. bindsym $mod+Control+Up resize grow height 5 px or 5 ppt
  269. bindsym $mod+Control+Down resize shrink height 5 px or 5 ppt
  270. bindsym $mod+Control+Right resize grow width 5 px or 5 ppt
  271. bindsym $mod+Control+Left resize shrink width 5 px or 5 ppt
  272. # Start i3bar to display a workspace bar (plus the system information i3status
  273. # finds out, if available)
  274. bar {
  275. swaybar_command waybar
  276. }
  277. # class border backgr. text indicator child_border
  278. client.focused #FFFFFF #BF360C #fdf6e3 #FF0000 #FFFFFF
  279. client.focused_inactive #073642 #FF9800 #93a1a1 #002b36 #073642
  280. client.unfocused #002b36 #311B92 #586e75 #002b36 #002b36
  281. client.urgent #dc322f #b71c1c #fdf6e3 #dc322f #dc322f
  282. ############################
  283. ## Displays
  284. ############################
  285. #HOME
  286. output HDMI-A-1 pos 0 0 res 3440x1440
  287. output DP-1 pos 0 1440 res 3440x1440@59.999Hz
  288. output DP-2 pos 0 1440 res 3440x1440@59.999Hz
  289. # background images
  290. #output * bg ~/Pictures/Wallpapers/calvin-hobbes-stars.jpg fill
  291. output * bg ~/Pictures/Wallpapers/beach.jpg fill
  292. #bindsym $mod+Shift+m exec --no-startup-id "sway output output DP-1 pos 2880 0 res 1920x1080 && sway ouput DP-2 res 1920x1080"
  293. ##############################
  294. ## Startup Things
  295. ##############################
  296. #exec --no-startup-id pcmanfm -d
  297. #exec --no-startup-id xset r rate 250 25
  298. #exec --no-startup-id xset b off
  299. #exec --no-startup-id setxkbmap -option caps:escape
  300. #exec --no-startup-id nightshift -l 39.0315533:-94.4954291 -d
  301. #exec --no-startup-id setxkbmap -model apple_laptop -layout us -variant dvp
  302. exec --no-startup-id mako
  303. exec --no-startup-id blueman-applet
  304. exec autotiling
  305. exec udiskie
  306. exec wl-paste -t text --watch clipman store
  307. exec avizo-service
  308. #############################
  309. ## Media Keys
  310. #############################
  311. bindsym XF86AudioRaiseVolume exec volumectl raise
  312. bindsym XF86AudioLowerVolume exec volumectl lower
  313. bindsym XF86AudioMute exec volumectl mute
  314. bindsym XF86MonBrightnessUp exec --no-startup-id "brightnessctl s +10%; brightnessctl -d gmux_backlight s +10%"
  315. bindsym XF86MonBrightnessDown exec --no-startup-id "brightnessctl s 10%-; brightnessctl -d gmux_backlight s 10%-"
  316. set $gnome-schema org.gnome.desktop.interface
  317. exec_always {
  318. gsettings set $gnome-schema gtk-theme 'Flat-Remix-GTK-Green-Darkest'
  319. gsettings set $gnome-schema icon-theme 'Flat-Remix-Green-Dark'
  320. }
  321. # fix slow launch: exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
  322. exec systemctl --user import-environment DISPLAY WAYLAND_DISPLAY SWAYSOCK
  323. exec hash dbus-update-activation-environment 2>/dev/null && \
  324. dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK
  325. include /etc/sway/config.d/*