hyprland.conf 12 KB

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