hyprland.nix 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  1. {
  2. colorscheme,
  3. pkgs,
  4. lib,
  5. config,
  6. ...
  7. }:
  8. with colorscheme.colors; ''
  9. # name , resolution ,offset , scale
  10. monitor = eDP-1, 1366x768@60 , 0x0 , 1
  11. $HYPR_FOLDER = /home/$(whoami)/.config/hypr
  12. input {
  13. kb_layout = us
  14. kb_options = ctrl:nocaps
  15. follow_mouse = 1
  16. repeat_rate = 30
  17. repeat_delay = 300
  18. touchpad {
  19. natural_scroll = true
  20. disable_while_typing = true
  21. }
  22. }
  23. general {
  24. sensitivity = 0.9
  25. gaps_in = 3
  26. gaps_out = 3
  27. border_size = 3
  28. col.active_border = rgb(${blue}) rgb(${pink}) rgb(${yellow}) 45deg
  29. col.inactive_border = rgb(${gray})
  30. layout = dwindle
  31. col.group_border_active = rgb(${base0B})
  32. col.group_border = rgb(${base00})
  33. }
  34. dwindle {
  35. force_split = 2 # new = right or bottom
  36. pseudotile = yes # enable pseudotiling on dwindle
  37. preserve_split = yes # you probably want this
  38. }
  39. decoration {
  40. # See https://wiki.hyprland.org/Configuring/Variables/ for more
  41. rounding = 5
  42. blur = no
  43. blur_size = 5
  44. blur_passes = 2
  45. blur_new_optimizations = on
  46. drop_shadow = no
  47. shadow_range = 8
  48. shadow_render_power = 3
  49. shadow_offset = 2 2
  50. col.shadow = rgb(${pink})
  51. }
  52. animations {
  53. enabled = true
  54. bezier = myBezier , 0.05, 0.9, 0.1, 1.05
  55. bezier = overshot , 0.7 , 0.6, 0.1, 1.1
  56. bezier = linear , 0.0 , 0.0, 1.0, 1.0
  57. # animation = NAME,ONOFF,SPEED,CURVE,STYLE
  58. animation = windows , 1, 7, myBezier
  59. animation = windowsOut , 1, 7, myBezier
  60. animation = border , 1, 10, default
  61. animation = borderangle , 1, 100, linear, loop
  62. animation = fade , 1, 7, default
  63. animation = workspaces , 1, 6, default
  64. }
  65. misc {
  66. disable_hyprland_logo = true
  67. disable_splash_rendering = true
  68. vfr = true
  69. vrr = 1 # 0 - off, 1 - on, 2 - fullscreen only
  70. disable_autoreload = false
  71. render_titles_in_groupbar = false
  72. }
  73. gestures {
  74. workspace_swipe = true
  75. }
  76. # v2
  77. windowrulev2 = workspace 9, class:^(Mailspring)$
  78. windowrulev2 = workspace 6, class:^(Steam)$
  79. windowrulev2 = workspace 5, class:^(Spotify)$
  80. windowrulev2 = workspace 4, class:^(org.telegram.desktop)$
  81. windowrulev2 = workspace 3, class:^(discord)$
  82. windowrulev2 = workspace 3, title:^(WebCord)$
  83. windowrulev2 = workspace 2, class:^(firefox)$
  84. windowrulev2 = workspace 2, class:^(Chromium-browser)$ # xwayland
  85. windowrulev2 = workspace 2, class:^(chromium-browser)$ # wayland
  86. windowrulev2 = workspace 1, class:^(jetbrains-goland)$
  87. windowrulev2 = workspace 1, class:^(jetbrains-clion)$
  88. windowrulev2 = workspace 1, class:^(Albion-Online)$
  89. windowrulev2 = float, class:^(DiscordCanary)$ # Discord File Picker
  90. windowrulev2 = float, title:^(Steam - News)$
  91. windowrulev2 = noblur, class:^(waybar)$
  92. windowrulev2 = noblur, class:^(firefox)$
  93. windowrulev2 = noblur, class:^(Chromium-browser)$ # xwayland
  94. windowrulev2 = noblur, class:^(chromium-browser)$ # wayland
  95. windowrulev2 = noblur, class:^(discordcanary)$
  96. windowrulev2 = noblur, title:^(WebCord)$
  97. windowrulev2 = noblur, title:^(Open File)$
  98. windowrulev2 = noshadow, class:^(firefox)$
  99. windowrulev2 = noshadow, class:^(Chromium-browser)$ # xwayland
  100. windowrulev2 = noshadow, class:^(chromium-browser)$ # wayland
  101. windowrulev2 = noshadow, class:^(discordcanary)$
  102. windowrulev2 = noanim, class:^(wlogout)$
  103. windowrulev2 = noanim, class:^(Albion-Online)$
  104. windowrulev2 = fullscreen, class:^(Albion-Online)$
  105. # Variables
  106. $discordOption = --enable-features=UseOzonePlatform --ozone-platform=wayland --enable-accelerated-mjpeg-decode --enable-accelerated-video --ignore-gpu-blacklist --enable-native-gpu-memory-buffers --enable-gpu-rasterization --enable-gpu --enable-features=WebRTCPipeWireCapturer
  107. $discord = ${lib.getExe pkgs.discord-canary} $discordOption
  108. $webcord = ${lib.getExe pkgs.webcord-vencord} $discordOption
  109. # Binds Keyboard
  110. bind = SUPER , C , exit ,
  111. bind = SUPER , Q, togglespecialworkspace
  112. bind = SUPERSHIFT , Q, movetoworkspace, special
  113. bind = SUPER , D , exec , $discord
  114. bind = SUPERSHIFT , D , exec , $webcord
  115. bind = SUPERSHIFT , E , exec , [float] ${lib.getExe pkgs.xfce.thunar}
  116. bind = SUPER , F , fullscreen , 0
  117. # bind = SUPERSHIFT , G , exec , ${lib.getExe config.programs.chromium.package};
  118. bind = SUPER , G , exec , ${lib.getExe pkgs.firefox}
  119. bind = SUPER , M , exec , [workspace 5 silent;tile] ${lib.getExe pkgs.mailspring}
  120. bind = SUPER , P , exec , run-as-service ${lib.getExe pkgs.fuzzel}
  121. bind = SUPER , T , togglefloating ,
  122. bind = SUPER , R , togglegroup ,
  123. bind = SUPERSHIFT , J , changegroupactive, f
  124. bind = SUPERSHIFT , K , changegroupactive, b
  125. bind = SUPER , S , exec , [workspace 5 silent;tile] ${lib.getExe config.programs.spicetify.spotifyPackage}
  126. bind = SUPER , W , killactive ,
  127. bind = SUPER , X , exec , ${lib.getExe pkgs.wlogout}
  128. bind = SUPER , Return , exec , run-as-service ${lib.getExe pkgs.wezterm}
  129. # Binds Mouse
  130. bindm = SUPER , mouse:272 , movewindow
  131. bindm = SUPER , mouse:273 , resizewindow
  132. # Screenshot
  133. bind = , Print , exec , sharenix --selection
  134. # bind = CTRL , Print , exec , grimblast --notify copy area
  135. bind = CTRL , Print , exec , grimblast save area - | ${lib.getExe pkgs.swappy} -f -
  136. bind = SUPER , Print , exec , grimblast --notify --cursor copysave output ~/Pictures/Screenshots/$(date +'%s.png')
  137. bind = SUPERSHIFT , Print , exec , wl-ocr
  138. bind = SUPER , h , resizeactive , -20 0
  139. bind = SUPER , l , resizeactive , 20 0
  140. bind = SUPER , k , movefocus , u
  141. bind = SUPER , j , movefocus , d
  142. bind = SUPER , left , movewindow , l
  143. bind = SUPER , right , movewindow , r
  144. bind = SUPER , up , movewindow , u
  145. bind = SUPER , down , movewindow , d
  146. bind = SUPER , 1 , workspace , 1
  147. bind = SUPER , 2 , workspace , 2
  148. bind = SUPER , 3 , workspace , 3
  149. bind = SUPER , 4 , workspace , 4
  150. bind = SUPER , 5 , workspace , 5
  151. bind = SUPER , 6 , workspace , 6
  152. bind = SUPER , 7 , workspace , 7
  153. bind = SUPER , 8 , workspace , 8
  154. bind = SUPER , 9 , workspace , 9
  155. bind = SUPER , 0 , workspace , 10
  156. bind = SUPERSHIFT , 1 , movetoworkspacesilent , 1
  157. bind = SUPERSHIFT , 2 , movetoworkspacesilent , 2
  158. bind = SUPERSHIFT , 3 , movetoworkspacesilent , 3
  159. bind = SUPERSHIFT , 4 , movetoworkspacesilent , 4
  160. bind = SUPERSHIFT , 5 , movetoworkspacesilent , 5
  161. bind = SUPERSHIFT , 6 , movetoworkspacesilent , 6
  162. bind = SUPERSHIFT , 7 , movetoworkspacesilent , 7
  163. bind = SUPERSHIFT , 8 , movetoworkspacesilent , 8
  164. bind = SUPERSHIFT , 9 , movetoworkspacesilent , 9
  165. bind = SUPERSHIFT , 0 , movetoworkspacesilent , 10
  166. # Media Keys
  167. bind = , XF86AudioNext , exec , playerctl next
  168. bind = , XF86AudioPrev , exec , playerctl previous
  169. bind = , XF86AudioPlay , exec , playerctl play-pause
  170. bind = , XF86AudioPause , exec , playerctl pause
  171. bind = , XF86AudioStop , exec , playerctl stop
  172. binde = , XF86AudioRaiseVolume , exec , amixer -q set Master 5%+
  173. binde = , XF86AudioLowerVolume , exec , amixer -q set Master 5%-
  174. # Brightness Keys
  175. binde = , XF86MonBrightnessUp , exec , brightnessctl set 5%+
  176. binde = , XF86MonBrightnessDown , exec , brightnessctl set 5%-
  177. exec-once = gBar bar 0
  178. # exec-once = waybar
  179. # exec-once = [workspace 3 silent] $discord
  180. # exec-once = [workspace 4 silent] ${lib.getExe pkgs.tdesktop}
  181. # exec-once = [workspace 9 silent] ${lib.getExe pkgs.mailspring}
  182. exec-once = systemctl --user restart xdg-desktop-portal xdg-desktop-portal-hyprland xdg-desktop-portal-gtk
  183. ''