From ad9777d39430cfa385206396fe3f4ea1b6e35cd3 Mon Sep 17 00:00:00 2001 From: Ahurac Date: Tue, 5 Nov 2024 10:51:50 +0100 Subject: [PATCH] fix(niri): shortcuts with swayosd --- ahrc-laptop/home.nix | 20 -------------------- common/home.nix | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/ahrc-laptop/home.nix b/ahrc-laptop/home.nix index 4751aec..f69f5e0 100644 --- a/ahrc-laptop/home.nix +++ b/ahrc-laptop/home.nix @@ -25,26 +25,6 @@ outputs."eDP-1".scale = 1; layout.border.active.color = "#35f835e5"; binds = with config.lib.niri.actions; { - "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"; - }; - "XF86MonBrightnessDown" = { - allow-when-locked = true; - action = spawn "brightnessctl" "set" "10-"; - }; - "XF86MonBrightnessUp" = { - allow-when-locked = true; - action = spawn "brightnessctl" "set" "+10"; - }; "Alt+TouchpadScrollDown".action = spawn "brightnessctl" "set" "10-"; "Alt+TouchpadScrollUp".action = spawn "brightnessctl" "set" "+10"; "XF86Display".action = power-off-monitors; diff --git a/common/home.nix b/common/home.nix index e4954b5..46e202c 100644 --- a/common/home.nix +++ b/common/home.nix @@ -374,6 +374,26 @@ "Mod+Shift+Backspace" = { action = quit { skip-confirmation = true; }; }; + "XF86MonBrightnessDown" = { + allow-when-locked = true; + action = spawn "swayosd-client" "--brightness=lower"; + }; + "XF86MonBrightnessUp" = { + allow-when-locked = true; + action = spawn "swayosd-client" "--brightness=raise"; + }; + "XF86AudioRaiseVolume" = { + allow-when-locked = true; + action = spawn "swayosd-client" "--output-volume=raise"; + }; + "XF86AudioLowerVolume" = { + allow-when-locked = true; + action = spawn "swayosd-client" "--output-volume=lower"; + }; + "XF86AudioMute" = { + allow-when-locked = true; + action = spawn "swayosd-client" "--output-volume=mute-toggle"; + }; }; }; };