summaryrefslogtreecommitdiff
path: root/echovol
blob: 9845a55f18cb451c334fda83a716b06728972979 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

volume=$(pactl list sinks | grep -A 15 'Sink #0' | grep 'Volume:' | awk '{print $5}' | tr -d '%' | head -1)
mute=$(pactl list sinks | grep -A 15 'Sink #0' | grep 'Mute' | awk '{print $2}')

if [ "$mute" = "yes" ]; then
    echo "mute"
else
    echo "$volume%"
fi