Merge remote-tracking branch 'origin/nixos' into nixos

This commit is contained in:
Moritz Böhme 2023-02-26 12:22:05 +01:00
commit ea59147fcd
31 changed files with 1449 additions and 369 deletions

View file

@ -6,6 +6,10 @@
with lib;
let
cfg = config.my.programs.hyprland;
boolToYesNo = bool: if bool then "yes" else "no";
mkRule = rule: windowRegexes: "windowrulev2 = ${rule},${concatStringsSep "," windowRegexes}";
mkRules = rules: windowRegexes: concatStringsSep "\n" (map (flip mkRule windowRegexes) rules);
in
@ -55,12 +59,12 @@ in
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 3
blur = yes
blur = ${boolToYesNo cfg.blur}
blur_size = 3
blur_passes = 3
blur_new_optimizations = on
drop_shadow = yes
drop_shadow = ${boolToYesNo cfg.shadows}
shadow_range = 10
shadow_render_power = 2
@ -72,13 +76,21 @@ in
# Some default Lanimations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.45, 0, 0.55, 1
bezier = sine, 0.445, 0.05, 0.55, 0.95
bezier = quad, 0.455, 0.03, 0.515, 0.955
bezier = cubic, 0.68, -0.55, 0.265, 1.55
bezier = quart, 0.77, 0, 0.175, 1
bezier = quint, 0.86, 0, 0.07, 1
bezier = expo, 1, 0, 0, 1
bezier = circ, 0.785, 0.135, 0.15, 0.86
bezier = back, 0.68, -0.55, 0.265, 1.55
animation = windows, 1, 3, myBezier
animation = windowsOut, 1, 3, myBezier
animation = border, 1, 3, myBezier
animation = fade, 1, 3, myBezier
animation = workspaces, 1, 3, myBezier
animation = windows, 1, 3, circ
animation = windowsOut, 1, 2, quint
animation = border, 1, 2, sine
animation = fade, 1, 2, sine
animation = workspaces, 1, 5, circ
}
dwindle {
@ -109,17 +121,19 @@ in
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
${optionalString cfg.blur ''
# Kitty
windowrulev2 = opacity 0.95 0.95, class:^kitty$
windowrulev2 = opacity 0.85 0.85, floating:1
# Firefox Sharing Indicator
${mkRules ["float" "move 49% 40" "noborder"] ["title:^(.*Sharing Indicator)$"]}
# Rofi
${mkRules ["float" "opacity 0.85 0.85" "noborder"] ["class:^([rR]ofi)$"]}
windowrulev2 = opacity 0.85 0.85, floating:1
''}
# Firefox Sharing Indicator
${mkRules ["float" "move 49% 40" "noborder" "nofullscreenrequest"] ["title:^(.*Sharing Indicator)$"]}
# Emacs
windowrulev2 = opaque, class:^emacs$
@ -134,26 +148,32 @@ in
$windowMod = ALT
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, D, exec, hyprctl keyword general:layout dwindle
bind = $mainMod, E, exec, emacsclient -c -a emacs
bind = $mainMod, F, togglefloating,
bind = $mainMod SHIFT, F, fullscreen,
bind = $mainMod, M, exec, hyprctl keyword general:layout master
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, Q, killactive,
bind = $mainMod, R, exec, rofi -x11 -show combi
bind = $mainMod, C, exec, rofi -x11 -show calc -modi calc -no-show-match -no-sort | wl-copy
bind = $mainMod, B, exec, rofi-bluetooth
bind = $mainMod, RETURN, exec, kitty
bind = $mainMod, T, togglesplit, # dwindle
bind = , XF86AudioLowerVolume, exec, pamixer -d 5
bind = , XF86AudioMute, exec, pamixer -t
bind = , XF86AudioNext, exec, playerctl -p "spotifyd,firefox" next
bind = , XF86AudioPlay, exec, playerctl -p "spotifyd,firefox" play-pause
bind = , XF86AudioPrev, exec, playerctl -p "spotifyd,firefox" previous
bind = , XF86AudioRaiseVolume, exec, pamixer -i 5
bind = , XF86MonBrightnessDown, exec, brightnessctl s 10%-
bind = , XF86MonBrightnessUp, exec, brightnessctl s 10%+
# Window binds
bind = $mainMod , F , togglefloating ,
bind = $mainMod , P , pseudo ,
bind = $mainMod , Q , killactive ,
bind = $mainMod , T , togglesplit ,
bind = $mainMod SHIFT , F , fullscreen ,
# Program binds
bind = $mainMod , B , exec , rofi-bluetooth
bind = $mainMod , C , exec , rofi -show calc -modi calc -no-show-match -no-sort | wl-copy
bind = $mainMod , D , exec , hyprctl keyword general:layout dwindle
bind = $mainMod , E , exec , emacsclient -c -a emacs
bind = $mainMod , M , exec , hyprctl keyword general:layout master
bind = $mainMod , R , exec , rofi -show combi
bind = $mainMod , RETURN , exec , kitty
# XF86 keys
bind = , XF86AudioLowerVolume , exec , pamixer -d 5
bind = , XF86AudioRaiseVolume , exec , pamixer -i 5
bind = , XF86AudioMute , exec , pamixer -t
bind = , XF86AudioNext , exec , playerctl -p "spotifyd,firefox" next
bind = , XF86AudioPlay , exec , playerctl -p "spotifyd,firefox" play-pause
bind = , XF86AudioPrev , exec , playerctl -p "spotifyd,firefox" previous
bind = , XF86MonBrightnessDown , exec , brightnessctl s 10%-
bind = , XF86MonBrightnessUp , exec , brightnessctl s 10%+
# Move focus with mainMod + hjkl
bind = $mainMod, H, movefocus, l
@ -161,11 +181,17 @@ in
bind = $mainMod, K, movefocus, u
bind = $mainMod, J, movefocus, d
# Change current active window size with mainMod + hjkl
# Change current active window size with mainMod + SHIFT + hjkl
bind = $mainMod SHIFT, H, resizeactive, -10 0
bind = $mainMod SHIFT, L, resizeactive, 10 0
bind = $mainMod SHIFT, K, resizeactive, 0 -10
bind = $mainMod SHIFT, J, resizeactive, 0 10
bind = $mainMod SHIFT, K, resizeactive, 0 -10
bind = $mainMod SHIFT, L, resizeactive, 10 0
# Move current active window with mainMod + ALT + hjkl
bind = $mainMod ALT, H, movewindow, l
bind = $mainMod ALT, J, movewindow, d
bind = $mainMod ALT, K, movewindow, u
bind = $mainMod ALT, L, movewindow, r
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
@ -200,4 +226,5 @@ in
bindm = $mainMod, mouse:273, resizewindow
exec-once=synology-drive
exec-once=randomWallpaper
''