make getvol use pamixer

This commit is contained in:
elkowar 2023-08-03 16:45:45 +02:00
parent dc3129aee2
commit 44fa18367e
No known key found for this signature in database
GPG Key ID: 50E76B4711E4C3E4

View File

@ -1,7 +1,12 @@
#!/bin/sh
if command -v pactl &>/dev/null; then
pactl get-sink-volume $(pactl get-default-sink) | awk -F '[^0-9]+' '/left:/{print $3}'
if command -v pamixer &>/dev/null; then
if [ true == $(pamixer --get-mute) ]; then
echo 0
exit
else
pamixer --get-volume
fi
else
amixer -D pulse sget Master | awk -F '[^0-9]+' '/Left:/{print $3}'
fi