From 5a7593a793758f429dcf31fb2c721e83f9d63b07 Mon Sep 17 00:00:00 2001 From: alexion Date: Wed, 22 Jul 2026 15:25:50 -0400 Subject: [PATCH] feat(desktop): bind the hardware volume and media keys --- modules/desktop/hyprland/hyprland.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/modules/desktop/hyprland/hyprland.nix b/modules/desktop/hyprland/hyprland.nix index 108ea24..8908aad 100644 --- a/modules/desktop/hyprland/hyprland.nix +++ b/modules/desktop/hyprland/hyprland.nix @@ -137,6 +137,20 @@ in "$mod CTRL, Q, forcekillactive," ] ++ workspaceBinds; + + # Volume keys repeat while held, capped at 150 percent. + binde = [ + ", XF86AudioRaiseVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume -l 1.5 @DEFAULT_AUDIO_SINK@ 5%+" + ", XF86AudioLowerVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" + ]; + + # Mute and media transport still fire while the session is locked. + bindl = [ + ", XF86AudioMute, exec, ${pkgs.wireplumber}/bin/wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle" + ", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause" + ", XF86AudioNext, exec, ${pkgs.playerctl}/bin/playerctl next" + ", XF86AudioPrev, exec, ${pkgs.playerctl}/bin/playerctl previous" + ]; }; }; };