|
|
@ -1,7 +1,7 @@ |
|
|
|
#!/usr/bin/env sh |
|
|
|
#!/usr/bin/env sh |
|
|
|
notify() { |
|
|
|
notify() { |
|
|
|
VOL="$( |
|
|
|
VOL="$( |
|
|
|
amixer get "$(sxmo_audiocurrentdevice.sh)" | |
|
|
|
amixer get "$(sxmo_audiocurrentdevice.sh)" | |
|
|
|
grep -oE '([0-9]+)%' | |
|
|
|
grep -oE '([0-9]+)%' | |
|
|
|
tr -d ' %' | |
|
|
|
tr -d ' %' | |
|
|
|
awk '{ s += $1; c++ } END { print s/c }' | |
|
|
|
awk '{ s += $1; c++ } END { print s/c }' | |
|
|
@ -24,11 +24,12 @@ setvol() { |
|
|
|
notify |
|
|
|
notify |
|
|
|
} |
|
|
|
} |
|
|
|
mute() { |
|
|
|
mute() { |
|
|
|
amixer set "$(sxmo_audiocurrentdevice.sh)" mute |
|
|
|
echo "$(sxmo_audiocurrentdevice.sh)" > /tmp/muted-audio.dev |
|
|
|
|
|
|
|
amixer set "$(cat /tmp/muted-audio.dev)" mute |
|
|
|
notify |
|
|
|
notify |
|
|
|
} |
|
|
|
} |
|
|
|
unmute() { |
|
|
|
unmute() { |
|
|
|
amixer set "$(sxmo_audiocurrentdevice.sh)" unmute |
|
|
|
amixer set "$(cat /tmp/muted-audio.dev)" unmute |
|
|
|
notify |
|
|
|
notify |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|