aboutsummaryrefslogtreecommitdiff
path: root/Scripts/.local/scripts/status/volume
blob: cbbafbe58987427e4872aec0d3e882463df04d0d (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/env bash
sinks="$(pactl list sinks)"
vol="$(echo "$sinks" | grep '[0-9]\+%' | sed "s,.* \([0-9]\+\)%.*,\1,;1q")"
mute="$(echo "$sinks" | grep "Mute: " | sed "s/.*Mute: //g")"
case "$mute" in
    "no")
        printf "";;
    "yes")
        printf "";;
esac
echo " $vol%"