config 8.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. include /etc/sway/config.d/*
  2. # Sway Window Manager Configuration
  3. # ================================
  4. # 1. Variables and General Settings
  5. # --------------------------------
  6. set {
  7. $mod Mod4
  8. # $term kitty
  9. $term kitty
  10. $menu fuzzel
  11. $left h
  12. $down j
  13. $up k
  14. $right l
  15. # Monitor outputs
  16. $out1 DP-1
  17. $out2 HDMI-A-1
  18. # Original Colors
  19. $focused_border #19141D
  20. $focused_text #CACACA
  21. }
  22. # Font configuration
  23. font pango:monospace 12
  24. # Use Mouse+$mod to drag floating windows
  25. floating_modifier $mod
  26. # 2. Appearance
  27. # ------------
  28. # Window Decoration
  29. default_border pixel 1
  30. default_floating_border pixel 1
  31. smart_borders on
  32. # Window Colors (Preserved from original config)
  33. client.focused #19141D #19141D #CACACA #19141D #CACACA
  34. # Gaps Configuration
  35. gaps inner 5
  36. gaps outer 5
  37. xwayland enable
  38. # Optional SwayFX Settings
  39. smart_corner_radius on
  40. corner_radius 10
  41. default_dim_inactive 0.05
  42. blur enable
  43. blur_passes 1
  44. blur_radius 1
  45. layer_effects "waybar" "blur enable"; shadows enable
  46. shadows on
  47. shadow_blur_radius 20
  48. # 3. Workspaces
  49. # ------------
  50. set {
  51. $ws1 "1"
  52. $ws2 "2"
  53. $ws3 "3"
  54. $ws4 "4"
  55. $ws5 "5"
  56. $ws6 "6"
  57. $ws7 "7"
  58. $ws8 "8"
  59. $ws9 "9"
  60. $ws10 "10"
  61. }
  62. # Workspace Monitor Assignments
  63. workspace {
  64. 1 output $out1
  65. 3 output $out1
  66. 5 output $out1
  67. 7 output $out1
  68. 9 output $out1
  69. 2 output $out2
  70. 4 output $out2
  71. 6 output $out2
  72. 8 output $out2
  73. 10 output $out2
  74. }
  75. # 4. Key Bindings
  76. # --------------
  77. # System Controls
  78. bindsym {
  79. $mod+Shift+r exec swaymsg reload && notify-send "Reloaded sway config"
  80. $mod+Shift+e exec --no-startup-id wlogout
  81. }
  82. bindgesture swipe:right focus right
  83. bindgesture swipe:left focus left
  84. bindgesture swipe:up workspace next
  85. bindgesture swipe:down workspace prev
  86. # Application Launchers
  87. bindsym {
  88. $mod+Return exec $term
  89. # $mod+d exec fuzzel
  90. $mod+d exec rofi -show combi -combi-modi "window,drun" -modi combi
  91. $mod+t exec ~/.bin/code.sh -s ~/.bin/fuzzel.lua
  92. $mod+shift+t exec ~/.bin/present
  93. $mod+n exec ~/.bin/sdm-ui.sh dmenu
  94. # $mod+o exec ~/.bin/obsidian-launcher
  95. # luanch kitty + neovim at ~/Documents/Vault
  96. $mod+o exec bash -c "cd /home/forbi/Documents/Vault && $term nvim"
  97. $mod+e exec nemo
  98. }
  99. # Window Management
  100. bindsym {
  101. $mod+c kill
  102. $mod+f fullscreen toggle
  103. $mod+space floating toggle
  104. $mod+a focus parent
  105. # Layout
  106. $mod+s layout stacking
  107. $mod+w layout toggle tabbed split
  108. $mod+semicolon split h
  109. # Focus
  110. $mod+$left focus left
  111. $mod+$down focus down
  112. $mod+$up focus up
  113. $mod+$right focus right
  114. $mod+Left focus left
  115. $mod+Down focus down
  116. $mod+Up focus up
  117. $mod+Right focus right
  118. # Move
  119. $mod+Shift+$left move left
  120. $mod+Shift+$down move down
  121. $mod+Shift+$up move up
  122. $mod+Shift+$right move right
  123. $mod+Shift+Left move left
  124. $mod+Shift+Down move down
  125. $mod+Shift+Up move up
  126. $mod+Shift+Right move right
  127. }
  128. # Workspace Management
  129. bindsym {
  130. $mod+1 workspace $ws1
  131. $mod+2 workspace $ws2
  132. $mod+3 workspace $ws3
  133. $mod+4 workspace $ws4
  134. $mod+5 workspace $ws5
  135. $mod+6 workspace $ws6
  136. $mod+7 workspace $ws7
  137. $mod+8 workspace $ws8
  138. $mod+9 workspace $ws9
  139. $mod+0 workspace $ws10
  140. $mod+Shift+1 move container to workspace $ws1
  141. $mod+Shift+2 move container to workspace $ws2
  142. $mod+Shift+3 move container to workspace $ws3
  143. $mod+Shift+4 move container to workspace $ws4
  144. $mod+Shift+5 move container to workspace $ws5
  145. $mod+Shift+6 move container to workspace $ws6
  146. $mod+Shift+7 move container to workspace $ws7
  147. $mod+Shift+8 move container to workspace $ws8
  148. $mod+Shift+9 move container to workspace $ws9
  149. $mod+Shift+0 move container to workspace $ws10
  150. $mod+bracketright move workspace to output right
  151. $mod+bracketleft move workspace to output left
  152. }
  153. # Scratchpad
  154. bindsym {
  155. $mod+Shift+minus move scratchpad
  156. $mod+minus scratchpad show
  157. $mod+u [app_id="uy.com.mzunino"] scratchpad show, move position center, fullscreen disable, resize set 1366 768
  158. }
  159. # Floating Terminal
  160. bindsym $mod+Shift+u exec --no-startup-id $term --class="uy.com.mzunino"
  161. # Other Special Bindings
  162. bindsym {
  163. $mod+g exec --no-startup-id gromit-mpx -t 0
  164. F4 exec switch-windows
  165. $mod+r exec --no-startup-id ~/.bin/wlrecord.sh
  166. $mod+p exec --no-startup-id grim -g "$(slurp -d)" - | swappy -f -
  167. $mod+shift+p exec --no-startup-id ~/.bin/screenshot-upload
  168. $mod+F5 exec --no-startup-id ~/.bin/pause-notifications
  169. $mod+Escape exec ~/.bin/lock.sh
  170. }
  171. # 5. Multimedia Keys
  172. bindsym {
  173. XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +2%
  174. XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -2%
  175. XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle
  176. XF86MonBrightnessUp exec --no-startup-id brightnessctl set +5%
  177. XF86MonBrightnessDown exec --no-startup-id brightnessctl set 5%-
  178. }
  179. # Mouse Bindings
  180. bindsym {
  181. --border button2 kill
  182. --whole-window $mod+button2 kill
  183. button3 floating toggle
  184. $mod+button3 floating toggle
  185. }
  186. # 6. Window Rules (Preserving original detailed rules)
  187. for_window [app_id="uy.com.mzunino"] floating enable, move scratchpad
  188. for_window [app_id="Evolution-alarm-notify"] floating enable
  189. for_window [app_id="sm"] move to workspace 4, workspace --no-auto-back-and-forth 4
  190. for_window [title="JetBrains Toolbox"] floating enable
  191. for_window [app_id="Spotify"] move to workspace 5, workspace --no-auto-back-and-forth 5
  192. for_window [title="Espanso Sync Tool"] floating enable, move to workspace 10
  193. for_window [app_id="yad"] floating enable
  194. for_window [class="Pinentry-gtk"] floating enable
  195. for_window [app_id="com.github.hluk.copyq"] floating enable
  196. for_window [app_id="com.github.hluk.copyq"] resize set 1366 768
  197. for_window [app_id="authenticator"] floating enable
  198. for_window [app_id="authenticator"] resize set 400 800
  199. for_window [title="File Operation Progress"] floating enable
  200. for_window [title="Do Not Panic"] floating enable
  201. for_window [title="Unlock Keyring"] floating enable
  202. for_window [title="Confirm to replace files"] floating enable
  203. for_window [title="Extension: (Bitwarden Password Manager) - Bitwarden — Mozilla Firefox"] floating enable
  204. for_window [title="Bitwarden - Vivaldi"] floating enable
  205. for_window [title="Write: .*" app_id="eu.betterbird.Betterbird"] floating enable
  206. for_window [app_id="eu.betterbird.Betterbird"] floating disable
  207. for_window [title="win0"] floating enable border none
  208. for_window [class=".*"] border pixel 0
  209. for_window [app_id="org.pulseaudio.pavucontrol"] floating enable, resize set 700 800
  210. for_window [app_id="pdf_float"] floating enable, resize set width 1366 px height 900 px
  211. # 7. Workspace Assignments (Preserving original detailed assignments)
  212. assign [class="^discord$"] 10
  213. assign [app_id="^de.shorsh.discord-screenaudio$"] 10
  214. assign [class="^WebCord$"] 10
  215. assign [class="^vesktop$"] 10
  216. assign [app_id="vesktop"] 10
  217. assign [app_id="thunderbird"] 7
  218. assign [app_id="eu.betterbird.Betterbird"] 7
  219. assign [class="DBeaver"] 4
  220. assign [app_id="sublime_merge"] 4
  221. assign [app_id="^jetbrains-idea$"] 3
  222. assign [title="^win0$"] 3
  223. assign [title=".*Visual Studio Code*."] 3
  224. assign [app_id="^nvim ~ "] 3
  225. assign [title="^nvim ~ "] 3
  226. assign [app_id="firefox-nightly"] 2
  227. assign [app_id="firefox"] 2
  228. assign [app_id="zen"] 2
  229. assign [instance="vivaldi-stable"] 2
  230. assign [class="Vivaldi-stable"] 2
  231. assign [class="Slack"] 1
  232. assign [app_id="^Chromium"] 1
  233. # 8. Workspace Layouts
  234. for_window [workspace=$ws1] layout tabbed
  235. # 9. Input Configuration
  236. input type:keyboard {
  237. xkb_layout us
  238. xkb_variant altgr-intl
  239. xkb_options caps:escape
  240. }
  241. input type:touchpad {
  242. dwt enabled
  243. tap enabled
  244. accel_profile adaptive
  245. pointer_accel 0.5
  246. }
  247. input "2:10:TPPS/2_Elan_TrackPoint" {
  248. accel_profile "flat"
  249. pointer_accel 0.7
  250. }
  251. # # 10. Output Configuration
  252. output $out1 {
  253. resolution 1920x1080
  254. position 0 0
  255. }
  256. output $out2 {
  257. resolution 1920x1080
  258. position 1920 0
  259. }
  260. output * adaptive_sync off
  261. # 11. Autostart Applications
  262. exec {
  263. ~/.bin/randwall
  264. ~/.bin/waybar.sh
  265. # System services - lxsession includes polkit
  266. lxsession
  267. # System tray applets
  268. blueman-applet
  269. nm-applet
  270. # Background services
  271. easyeffects --gapplication-service
  272. swaync
  273. wlsunset -l -34.9 -L -56.2 -t 4500 -g 0.9
  274. # Applications
  275. $term --class="uy.com.mzunino"
  276. slack
  277. davmail
  278. betterbird
  279. legcord
  280. # Browser - using gtk-launch instead of BROWSER variable
  281. zen-browser
  282. # Commented out for reference
  283. # gtk-launch correo
  284. swayidle -w
  285. }