From 135c68597313f487bd6948e9582bcee3220386b6 Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Fri, 19 Sep 2025 22:54:35 -0400 Subject: [PATCH] added volume controls --- dot_config/flake/home/niri.nix | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/dot_config/flake/home/niri.nix b/dot_config/flake/home/niri.nix index 2138ab7..89d1adc 100644 --- a/dot_config/flake/home/niri.nix +++ b/dot_config/flake/home/niri.nix @@ -416,10 +416,22 @@ in { # Example volume keys mappings for PipeWire & WirePlumber. # The allow-when-locked=true property makes them work even when the session is locked. - # XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; } - # XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; } - # XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; } - # XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; } + "XF86AudioRaiseVolume" = { + allow-when-locked = true; + action = spawn ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"]; + }; + "XF86AudioLowerVolume" = { + allow-when-locked = true; + action = spawn ["wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"]; + }; + "XF86AudioMute" = { + allow-when-locked = true; + action = spawn ["wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"]; + }; + XF86AudioMicMute = { + allow-when-locked = true; + action = spawn ["wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"]; + }; # Open/close the Overview: a zoomed-out view of workspaces and windows. # You can also move the mouse into the top-left hot corner,