Dotfiles/.config/eww/scripts/getvol

13 lines
250 B
Plaintext
Raw Normal View History

2024-03-17 14:59:22 +00:00
#!/bin/sh
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