chore: update hyprland keybinds to match sway's

This commit is contained in:
nydragon 2025-03-03 16:44:13 +01:00
parent df9a38e03d
commit 9be6eef517
Signed by: nydragon
SSH key fingerprint: SHA256:WcjW5NJPQ8Dx4uQDmoIlVPLWE27Od3fxoe0IUvuoPHE

View file

@ -7,7 +7,7 @@
}: }:
let let
inherit (lib) mapAttrsToList mkIf hasAttr; inherit (lib) mapAttrsToList mkIf hasAttr;
inherit (lib.my) getExe; inherit (lib.my) getExe getExe';
in in
mkIf osConfig.programs.hyprland.enable { mkIf osConfig.programs.hyprland.enable {
home.sessionVariables.ELECTRON_OZONE_PLATFORM_HINT = "auto"; home.sessionVariables.ELECTRON_OZONE_PLATFORM_HINT = "auto";
@ -146,17 +146,24 @@ mkIf osConfig.programs.hyprland.enable {
disable_hyprland_logo = false; disable_hyprland_logo = false;
focus_on_activate = false; # Open windows without focusing them focus_on_activate = false; # Open windows without focusing them
new_window_takes_over_fullscreen = 2; # When a new window opens, the current fullscreen window returns to its tiled state new_window_takes_over_fullscreen = 2; # When a new window opens, the current fullscreen window returns to its tiled state
key_press_enables_dpms = true;
mouse_move_enables_dpms = true;
disable_autoreload = true;
}; };
bindm = [ "$mod,mouse:272,movewindow" ]; bindm = [ "$mod,mouse:272,movewindow" ];
bind = [ bind =
let
copy = getExe' pkgs.wl-clipboard "wl-copy";
in
[
"$mod, D, exec, ${getExe osConfig.modules.system.roles.desktop.runner.package}" "$mod, D, exec, ${getExe osConfig.modules.system.roles.desktop.runner.package}"
"$mod, E, exec, ${getExe osConfig.modules.system.roles.desktop.filemanager}" "$mod, E, exec, ${getExe osConfig.modules.system.roles.desktop.filemanager}"
"$mod, Return, exec, ${getExe osConfig.modules.system.roles.desktop.terminal}" "$mod, Return, exec, ${getExe osConfig.modules.system.roles.desktop.terminal}"
"$mod SHIFT, Q, killactive," "$mod SHIFT, Q, killactive,"
"$mod, V, togglefloating" "$mod, V, togglefloating"
"$mod SHIFT, P, exec, ${config.programs.rofi.package}/bin/rofi -show p -modi p:${pkgs.rofi-power-menu}/bin/rofi-power-menu" "$mod SHIFT, P, exec, ${getExe pkgs.scripts.powerMenu}"
"$mod, P, exec, ${getExe pkgs.cliphist} wipe & ${getExe pkgs.hyprlock}" "$mod, P, exec, ${getExe pkgs.cliphist} wipe & ${getExe pkgs.hyprlock}"
"$mod SHIFT, C, exec, hyprctl reload" "$mod SHIFT, C, exec, hyprctl reload"
"$mod SHIFT, space, togglefloating" "$mod SHIFT, space, togglefloating"
@ -171,14 +178,14 @@ mkIf osConfig.programs.hyprland.enable {
"$mod, X, fullscreen, 1" "$mod, X, fullscreen, 1"
"$mod, F, fullscreen, 0" "$mod, F, fullscreen, 0"
"$mod, N, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t" "$mod, N, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t"
"$mod, U, exec, ${pkgs.hyprshot}/bin/hyprshot -z -o $XDG_PICTURES_DIR/screenshots -m region" "$mod, U, exec, ${pkgs.hyprshot}/bin/hyprshot -o ${config.xdg.userDirs.pictures}/screenshots -m region"
"$mod SHIFT, U, exec, ${pkgs.hyprshot}/bin/hyprshot -z --raw -m region | ${pkgs.satty}/bin/satty -f - --fullscreen" "$mod SHIFT, U, exec, ${pkgs.hyprshot}/bin/hyprshot --raw -m region | ${getExe pkgs.satty} -f - --fullscreen --copy-command ${copy}"
#: Brightness and Media {{{ #: Brightness and Media {{{
",XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +10%" ",XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl s +10%"
",XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 10%-" ",XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl s 10%-"
",XF86AudioRaiseVolume, exec, ${pkgs.pamixer}/bin/pamixer -i 5" ",XF86AudioRaiseVolume, exec, ${getExe pkgs.pamixer} -u && ${pkgs.pamixer}/bin/pamixer -i 5"
",XF86AudioLowerVolume, exec, ${pkgs.pamixer}/bin/pamixer -d 5" ",XF86AudioLowerVolume, exec, ${getExe pkgs.pamixer} -u && ${pkgs.pamixer}/bin/pamixer -d 5"
",XF86AudioMicMute, exec, ${pkgs.pamixer}/bin/pamixer --default-source -m" ",XF86AudioMicMute, exec, ${pkgs.pamixer}/bin/pamixer --default-source -m"
",XF86AudioMute, exec, ${pkgs.pamixer}/bin/pamixer -t" ",XF86AudioMute, exec, ${pkgs.pamixer}/bin/pamixer -t"
",XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause" ",XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause"