From 4df40b21242821854b4d7717abc770f323a99325 Mon Sep 17 00:00:00 2001 From: Nydragon Date: Fri, 31 Jan 2025 22:05:40 +0100 Subject: [PATCH] feat: use pw-volume for volume control, unmutes on volume change! --- home/sway/default.nix | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/home/sway/default.nix b/home/sway/default.nix index 6a5642e..504076e 100644 --- a/home/sway/default.nix +++ b/home/sway/default.nix @@ -86,14 +86,13 @@ lib.mkIf osConfig.programs.sway.enable { "${mod}+n" = "exec nysh msg dash toggle"; "--locked XF86MonBrightnessUp" = "exec --no-startup-id ${getExe pkgs.brightnessctl} s +10%"; "--locked XF86MonBrightnessDown" = "exec --no-startup-id ${getExe pkgs.brightnessctl} s 10%-"; - "--locked XF86AudioRaiseVolume" = "exec --no-startup-id ${getExe pkgs.pamixer} -i 5"; - "--locked XF86AudioLowerVolume" = "exec --no-startup-id ${getExe pkgs.pamixer} -d 5"; - "--locked XF86AudioMicMute" = "exec --no-startup-id ${getExe pkgs.pamixer} --default-source -m"; - "--locked XF86AudioMute" = "exec --no-startup-id ${pkgs.pamixer}/bin/pamixer -t"; - "--locked XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause"; - "--locked XF86AudioPause" = "exec ${pkgs.playerctl}/bin/playerctl play-pause"; - "--locked XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next"; - "--locked XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous"; + "--locked XF86AudioRaiseVolume" = "exec --no-startup-id ${getExe pkgs.pw-volume} change +5%"; + "--locked XF86AudioLowerVolume" = "exec --no-startup-id ${getExe pkgs.pw-volume} change -5%"; + "--locked XF86AudioMute" = "exec --no-startup-id ${getExe pkgs.pw-volume} mute toggle"; + "--locked XF86AudioPlay" = "exec ${getExe pkgs.playerctl} play-pause"; + "--locked XF86AudioPause" = "exec ${getExe pkgs.playerctl} play-pause"; + "--locked XF86AudioNext" = "exec ${getExe pkgs.playerctl} next"; + "--locked XF86AudioPrev" = "exec ${getExe pkgs.playerctl} previous"; "${mod}+u" = "exec ${getExe pkgs.hyprshot} -o ${config.xdg.userDirs.pictures}/screenshots -m region"; "${mod}+Shift+u" =