hyprland.conf 11 KB

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