From 6aaca4b161dd4ef3663e680f9d287edadb945088 Mon Sep 17 00:00:00 2001 From: Dmytro Date: Mon, 17 Aug 2020 11:01:11 +0200 Subject: [PATCH] Unmute fix Signed-off-by: Maarten van Gompel --- scripts/core/sxmo_vol.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/core/sxmo_vol.sh b/scripts/core/sxmo_vol.sh index 63f407e..bffcb99 100755 --- a/scripts/core/sxmo_vol.sh +++ b/scripts/core/sxmo_vol.sh @@ -1,7 +1,7 @@ #!/usr/bin/env sh notify() { VOL="$( - amixer get "$(sxmo_audiocurrentdevice.sh)" | + amixer get "$(sxmo_audiocurrentdevice.sh)" | grep -oE '([0-9]+)%' | tr -d ' %' | awk '{ s += $1; c++ } END { print s/c }' | @@ -24,11 +24,12 @@ setvol() { notify } mute() { - amixer set "$(sxmo_audiocurrentdevice.sh)" mute + echo "$(sxmo_audiocurrentdevice.sh)" > /tmp/muted-audio.dev + amixer set "$(cat /tmp/muted-audio.dev)" mute notify } unmute() { - amixer set "$(sxmo_audiocurrentdevice.sh)" unmute + amixer set "$(cat /tmp/muted-audio.dev)" unmute notify }