From c7b065eed92e504b888d8a66fbedb932a1c06992 Mon Sep 17 00:00:00 2001 From: Colin Date: Mon, 20 Nov 2023 06:57:51 +0000 Subject: [PATCH] sxmo_hook_inputhandler: set volume directly now that i'm using SXMO_NO_AUDIO, i can't use sxmo_audio.sh --- hosts/modules/gui/sxmo/default.nix | 2 +- .../gui/sxmo/hooks/sxmo_hook_inputhandler.sh | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) 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