diff --git a/hosts/modules/gui/sxmo/default.nix b/hosts/modules/gui/sxmo/default.nix index cb90ba6c..cc5b0838 100644 --- a/hosts/modules/gui/sxmo/default.nix +++ b/hosts/modules/gui/sxmo/default.nix @@ -70,7 +70,7 @@ let hookPkgs = { inputhandler = pkgs.static-nix-shell.mkBash { pname = "sxmo_hook_inputhandler.sh"; - pkgs = [ "coreutils" ]; + pkgs = [ "coreutils" "pulseaudio" ]; src = ./hooks; }; postwake = pkgs.static-nix-shell.mkBash { diff --git a/hosts/modules/gui/sxmo/hooks/sxmo_hook_inputhandler.sh b/hosts/modules/gui/sxmo/hooks/sxmo_hook_inputhandler.sh index 04f66b08..852eeac6 100755 --- a/hosts/modules/gui/sxmo/hooks/sxmo_hook_inputhandler.sh +++ b/hosts/modules/gui/sxmo/hooks/sxmo_hook_inputhandler.sh @@ -1,5 +1,5 @@ #!/usr/bin/env nix-shell -#!nix-shell -i bash -p coreutils +#!nix-shell -i bash -p coreutils -p pulseaudio # input map considerations # - using compound actions causes delays. @@ -122,23 +122,23 @@ case "$ACTION" in # powerbutton_three: intentional no-op because overloading the kill-window handler is risky "volup_one") - handle_with sxmo_audio.sh vol up "$VOL_INCR_1" + handle_with pactl set-sink-volume @DEFAULT_SINK@ +"$VOL_INCR_1%" ;; "volup_two") - handle_with sxmo_audio.sh vol up "$VOL_INCR_2" + handle_with pactl set-sink-volume @DEFAULT_SINK@ +"$VOL_INCR_2%" ;; "volup_three") - handle_with sxmo_audio.sh vol up "$VOL_INCR_3" + handle_with pactl set-sink-volume @DEFAULT_SINK@ +"$VOL_INCR_3%" ;; "voldown_one") - handle_with sxmo_audio.sh vol down "$VOL_INCR_1" + handle_with pactl set-sink-volume @DEFAULT_SINK@ -"$VOL_INCR_1%" ;; "voldown_two") - handle_with sxmo_audio.sh vol down "$VOL_INCR_2" + handle_with pactl set-sink-volume @DEFAULT_SINK@ -"$VOL_INCR_2%" ;; "voldown_three") - handle_with sxmo_audio.sh vol down "$VOL_INCR_3" + handle_with pactl set-sink-volume @DEFAULT_SINK@ -"$VOL_INCR_3%" ;; esac