hyprland.conf 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435
  1. monitor=,preferred,auto,auto
  2. $mainMod = SUPER
  3. ###################
  4. ### MY PROGRAMS ###
  5. ###################
  6. # See https://wiki.hypr.land/Configuring/Keywords/
  7. # source=~/.config/hypr/keybind.conf
  8. # Set programs that you use
  9. $terminal = kitty
  10. $fileManager = nautilus
  11. $menu = fuzzel
  12. $browser = chromium
  13. #################
  14. ### AUTOSTART ###
  15. #################
  16. # Autostart necessary processes (like notifications daemons, status bars, etc.)
  17. # Or execute your favorite apps at launch like this:
  18. exec-once = awww-daemon
  19. exec-once = waybar
  20. exec-once = swaync
  21. exec-once = syncthing
  22. exec-once = hypridle
  23. exec-once = xwaylandvideobridge
  24. # exec-once = $terminal
  25. # exec-once = nm-applet &
  26. # exec-once = waybar & hyprpaper & firefox
  27. #############################
  28. ### ENVIRONMENT VARIABLES ###
  29. #############################
  30. env = XCURSOR_SIZE,24
  31. env = HYPRCURSOR_SIZE,24
  32. ###################
  33. ### PERMISSIONS ###
  34. ###################
  35. ecosystem {
  36. enforce_permissions = true
  37. }
  38. permission = /usr/bin/grim, screencopy, allow
  39. permission = /usr/bin/hyprpicker, screencopy, allow
  40. permission = /usr/bin/hyprlock, screencopy, allow
  41. permission = /usr/lib/xdg-desktop-portal-hyprland, screencopy, allow
  42. #####################
  43. ### LOOK AND FEEL ###
  44. #####################
  45. # Refer to https://wiki.hypr.land/Configuring/Variables/
  46. # https://wiki.hypr.land/Configuring/Variables/#general
  47. general {
  48. gaps_in = 5
  49. gaps_out = 15
  50. border_size = 2
  51. # https://wiki.hypr.land/Configuring/Variables/#variable-types for info about colors
  52. col.active_border = rgba(33ccffee)
  53. col.inactive_border = rgba(595959aa)
  54. # Set to true enable resizing windows by clicking and dragging on borders and gaps
  55. resize_on_border = false
  56. allow_tearing = false
  57. layout = master
  58. }
  59. cursor {
  60. inactive_timeout = 4
  61. }
  62. # https://wiki.hypr.land/Configuring/Variables/#decoration
  63. decoration {
  64. rounding = 10
  65. rounding_power = 2
  66. # Change transparency of focused and unfocused windows
  67. active_opacity = 0.95
  68. inactive_opacity = 0.95
  69. shadow {
  70. enabled = true
  71. range = 4
  72. render_power = 3
  73. color = rgba(1a1a1aee)
  74. }
  75. # https://wiki.hypr.land/Configuring/Variables/#blur
  76. blur {
  77. enabled = true
  78. size = 3
  79. passes = 1
  80. vibrancy = 0.1696
  81. }
  82. }
  83. # https://wiki.hypr.land/Configuring/Variables/#animations
  84. animations {
  85. enabled = yes, please :)
  86. # Default curves, see https://wiki.hypr.land/Configuring/Animations/#curves
  87. # NAME, X0, Y0, X1, Y1
  88. bezier = easeOutQuint, 0.23, 1, 0.32, 1
  89. bezier = easeInOutCubic, 0.65, 0.05, 0.36, 1
  90. bezier = linear, 0, 0, 1, 1
  91. bezier = almostLinear, 0.5, 0.5, 0.75, 1
  92. bezier = quick, 0.15, 0, 0.1, 1
  93. # Default animations, see https://wiki.hypr.land/Configuring/Animations/
  94. # NAME, ONOFF, SPEED, CURVE, [STYLE]
  95. animation = global, 1, 10, default
  96. animation = border, 1, 5.39, easeOutQuint
  97. animation = windows, 1, 4.79, easeOutQuint
  98. animation = windowsIn, 1, 4.1, easeOutQuint, popin 87%
  99. animation = windowsOut, 1, 1.49, linear, popin 87%
  100. animation = fadeIn, 1, 1.73, almostLinear
  101. animation = fadeOut, 1, 1.46, almostLinear
  102. animation = fade, 1, 3.03, quick
  103. animation = layers, 1, 3.81, easeOutQuint
  104. animation = layersIn, 1, 4, easeOutQuint, fade
  105. animation = layersOut, 1, 1.5, linear, fade
  106. animation = fadeLayersIn, 1, 1.79, almostLinear
  107. animation = fadeLayersOut, 1, 1.39, almostLinear
  108. animation = workspaces, 1, 1.94, almostLinear, fade
  109. animation = workspacesIn, 1, 1.21, almostLinear, fade
  110. animation = workspacesOut, 1, 1.94, almostLinear, fade
  111. animation = zoomFactor, 1, 7, quick
  112. }
  113. # Ref https://wiki.hypr.land/Configuring/Workspace-Rules/
  114. # "Smart gaps" / "No gaps when only"
  115. # uncomment all if you wish to use that.
  116. # workspace = w[tv1], gapsout:0, gapsin:0
  117. # workspace = f[1], gapsout:0, gapsin:0
  118. # windowrule {
  119. # name = no-gaps-wtv1
  120. # match:float = false
  121. # match:workspace = w[tv1]
  122. #
  123. # border_size = 0
  124. # rounding = 0
  125. # }
  126. #
  127. # windowrule {
  128. # name = no-gaps-f1
  129. # match:float = false
  130. # match:workspace = f[1]
  131. #
  132. # border_size = 0
  133. # rounding = 0
  134. # }
  135. # See https://wiki.hypr.land/Configuring/Dwindle-Layout/ for more
  136. dwindle {
  137. pseudotile = true # Master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
  138. preserve_split = true # You probably want this
  139. }
  140. # See https://wiki.hypr.land/Configuring/Master-Layout/ for more
  141. master {
  142. new_status = master
  143. }
  144. # https://wiki.hypr.land/Configuring/Variables/#misc
  145. misc {
  146. force_default_wallpaper = -1 # Set to 0 or 1 to disable the anime mascot wallpapers
  147. disable_hyprland_logo = false # If true disables the random hyprland logo / anime girl background. :(
  148. }
  149. #############
  150. ### INPUT ###
  151. #############
  152. # https://wiki.hypr.land/Configuring/Variables/#input
  153. input {
  154. kb_layout = ch
  155. kb_options = caps:swapescape,altwin:swap_lalt_lwin
  156. follow_mouse = 1
  157. sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
  158. touchpad {
  159. natural_scroll = true
  160. disable_while_typing = true
  161. clickfinger_behavior = true
  162. }
  163. }
  164. # See https://wiki.hypr.land/Configuring/Gestures
  165. gesture = 3, horizontal, workspace
  166. # Example per-device config
  167. # See https://wiki.hypr.land/Configuring/Keywords/#per-device-input-configs for more
  168. device {
  169. name = epic-mouse-v1
  170. sensitivity = -0.5
  171. }
  172. # ca 2015 Macbook Keyboard
  173. device {
  174. name = apple-inc.-apple-internal-keyboard-/-trackpad
  175. kb_options = caps:swapescape,lv3:rwin_switch
  176. bindr = $mainMod, ALT_L, exec, fuzzel
  177. }
  178. # M1 Keyboard
  179. device {
  180. name = apple-spi-keyboard
  181. kb_options = caps:swapescape,lv3:rwin_switch
  182. bindr = $mainMod, ALT_L, exec, fuzzel
  183. }
  184. ###################
  185. ### KEYBINDINGS ###
  186. ###################
  187. # See https://wiki.hypr.land/Configuring/Keywords/
  188. bindr = $mainMod, SUPER_L, exec, fuzzel
  189. # Example binds, see https://wiki.hypr.land/Configuring/Binds/ for more
  190. bind = $mainMod, Return, exec, $terminal
  191. bind = $mainMod, Q, killactive,
  192. bind = $mainMod SHIFT, Q, exec, killall Hyprland
  193. bind = $mainMod, M, exec, command -v hyprshutdown >/dev/null 2>&1 && hyprshutdown || hyprctl dispatch exit
  194. bind = $mainMod, E, exec, $fileManager --new-window
  195. bind = $mainMod SHIFT, F, togglefloating,
  196. bind = $mainMod, P, pseudo, # dwindle
  197. bind = $mainMod, V, exec, $browser
  198. # bind = $mainMod, J, layoutmsg, togglesplit # dwindle
  199. bind = $mainMod SHIFT, T, exec, ~/.config/hypr/scripts/toggle-theme.sh
  200. # Screenshots
  201. bind = , Print, exec, ~/.config/hypr/scripts/screenshot.sh area
  202. bind = $mainMod CTRL, Print, exec, ~/.config/hypr/scripts/screenshot.sh monitor
  203. bind = $mainMod SHIFT, Print, exec, ~/.config/hypr/scripts/screenshot.sh window
  204. bind = , XF86LaunchA, exec, ~/.config/hypr/scripts/screenshot.sh area
  205. bind = $mainMod CTRL, XF86LaunchA, exec, ~/.config/hypr/scripts/screenshot.sh monitor
  206. bind = $mainMod SHIFT, XF86LaunchA, exec, ~/.config/hypr/scripts/screenshot.sh window
  207. bind = $mainMod ALT, Space, togglefloating,
  208. # Move focus with mainMod + arrow keys
  209. bind = $mainMod, left, movefocus, l
  210. bind = $mainMod, right, movefocus, r
  211. bind = $mainMod, up, movefocus, u
  212. bind = $mainMod, down, movefocus, d
  213. # Swap windows
  214. bind = $mainMod SHIFT, left, movewindow, l
  215. bind = $mainMod SHIFT, right, movewindow, r
  216. bind = $mainMod SHIFT, up, movewindow, u
  217. bind = $mainMod SHIFT, down, movewindow, d
  218. binde = $mainMod, H, layoutmsg, mfact -0.05
  219. binde = $mainMod, L, layoutmsg, mfact +0.05
  220. bind = $mainMod SHIFT, L, exec, systemctl suspend
  221. bind = $mainMod, F, fullscreen, 0
  222. # Master Layout Control
  223. bind = $mainMod, Z, exec, ~/.config/hypr/scripts/toggle-layout.sh
  224. bind = $mainMod SHIFT, Return, layoutmsg, swapwithmaster
  225. bind = $mainMod, J, layoutmsg, cyclenext
  226. bind = $mainMod, K, layoutmsg, cycleprev
  227. bind = $mainMod, I, layoutmsg, addmaster
  228. bind = $mainMod, D, layoutmsg, removemaster
  229. # Sets the layout to "Stacked" (Horizontal Split)
  230. bind = $mainMod SHIFT, H, layoutmsg, orientationtop
  231. # Sets the layout to "Side-by-Side" (Vertical Split)
  232. bind = $mainMod SHIFT, V, layoutmsg, orientationleft
  233. # Switch workspaces with mainMod + [0-9]
  234. bind = $mainMod, Tab, workspace, previous
  235. bind = $mainMod, 1, workspace, 1
  236. bind = $mainMod, 2, workspace, 2
  237. bind = $mainMod, 3, workspace, 3
  238. bind = $mainMod, 4, workspace, 4
  239. bind = $mainMod, 5, workspace, 5
  240. bind = $mainMod, 6, workspace, 6
  241. bind = $mainMod, 7, workspace, 7
  242. bind = $mainMod, 8, workspace, 8
  243. bind = $mainMod, 9, workspace, 9
  244. bind = $mainMod, 0, workspace, 10
  245. # Move active window to a workspace with mainMod + SHIFT + [0-9]
  246. bind = $mainMod SHIFT, 1, movetoworkspace, 1
  247. bind = $mainMod SHIFT, 2, movetoworkspace, 2
  248. bind = $mainMod SHIFT, 3, movetoworkspace, 3
  249. bind = $mainMod SHIFT, 4, movetoworkspace, 4
  250. bind = $mainMod SHIFT, 5, movetoworkspace, 5
  251. bind = $mainMod SHIFT, 6, movetoworkspace, 6
  252. bind = $mainMod SHIFT, 7, movetoworkspace, 7
  253. bind = $mainMod SHIFT, 8, movetoworkspace, 8
  254. bind = $mainMod SHIFT, 9, movetoworkspace, 9
  255. bind = $mainMod SHIFT, 0, movetoworkspace, 10
  256. # Example special workspace (scratchpad)
  257. bind = $mainMod, S, togglespecialworkspace, magic
  258. bind = $mainMod SHIFT, S, movetoworkspace, special:magic
  259. # Scroll through existing workspaces with mainMod + scroll
  260. bind = $mainMod, mouse_down, workspace, e+1
  261. bind = $mainMod, mouse_up, workspace, e-1
  262. # Move/resize windows with mainMod + LMB/RMB and dragging
  263. bindm = $mainMod, mouse:272, movewindow
  264. bindm = $mainMod, mouse:273, resizewindow
  265. # Resize submap
  266. bind = $mainMod, R, submap, resize
  267. submap = resize
  268. binde = , right, resizeactive, 10 0
  269. binde = , left, resizeactive, -10 0
  270. binde = , up, resizeactive, 0 -10
  271. binde = , down, resizeactive, 0 10
  272. bind = , escape, submap, reset
  273. submap = reset
  274. # Laptop multimedia keys for volume and LCD brightness
  275. bindel = ,XF86AudioRaiseVolume, exec, wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+
  276. bindel = ,XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
  277. bindel = ,XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
  278. bindel = ,XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle
  279. bindel = ,XF86MonBrightnessUp, exec, ~/.config/hypr/scripts/display-brightness.sh 5%+
  280. bindel = ,XF86MonBrightnessDown, exec, ~/.config/hypr/scripts/display-brightness.sh 5%-
  281. bindel = $mainMod, XF86MonBrightnessUp, exec, ~/.config/hypr/scripts/keyboard-brightness.sh 5%+
  282. bindel = $mainMod, XF86MonBrightnessDown, exec, ~/.config/hypr/scripts/keyboard-brightness.sh 5%-
  283. # Requires playerctl
  284. bindl = , XF86AudioNext, exec, playerctl next
  285. bindl = , XF86AudioPause, exec, playerctl play-pause
  286. bindl = , XF86AudioPlay, exec, playerctl play-pause
  287. bindl = , XF86AudioPrev, exec, playerctl previous
  288. ##############################
  289. ### WINDOWS AND WORKSPACES ###
  290. ##############################
  291. # See https://wiki.hypr.land/Configuring/Window-Rules/ for more
  292. # See https://wiki.hypr.land/Configuring/Workspace-Rules/ for workspace rules
  293. windowrule {
  294. name = opaque-floating
  295. match:float = true
  296. opacity = 1.0 override 1.0 override
  297. }
  298. windowrule {
  299. # Ignore maximize requests from all apps. You'll probably like this.
  300. name = suppress-maximize-events
  301. match:class = .*
  302. suppress_event = maximize
  303. }
  304. # Fix some dragging issues with XWayland
  305. windowrule {
  306. name = fix-xwayland-drags
  307. match:class = ^$
  308. match:title = ^$
  309. match:xwayland = true
  310. match:float = true
  311. match:fullscreen = false
  312. match:pin = false
  313. no_focus = true
  314. }
  315. # Hyprland-run windowrule
  316. windowrule {
  317. name = move-hyprland-run
  318. match:class = hyprland-run
  319. move = 20 monitor_h-120
  320. float = yes
  321. }
  322. windowrule {
  323. name = browser-opacity-and-workspace
  324. match:class = ^($browser)$
  325. opacity = 1.0 override 1.0 override
  326. opaque = true
  327. workspace = 2
  328. }
  329. windowrule {
  330. name = xwayland-video-bridge
  331. match:class = ^(xwaylandvideobridge)$
  332. opacity = 0.0 override 0.0 override
  333. workspace = 9
  334. no_initial_focus = true
  335. max_size = 1 1
  336. no_blur = true
  337. }
  338. windowrule{
  339. name = keepassxc-workspace
  340. match:class = ^(org.keepassxc.KeePassXC)$
  341. workspace = 5
  342. }
  343. windowrule{
  344. name = localsend-workspace
  345. match:class = ^(localsend)$
  346. workspace = 10
  347. }
  348. windowrule{
  349. name = logseq-workspace
  350. match:class = ^(Logseq)$
  351. workspace = 6
  352. }