blob: ee2509ec52c96bf9c822223f7a3960ac541b19b2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/bash
while true
do
string=$(pamixer --get-volume)
muted=$(pamixer --get-mute)
if [[ "$muted" == "true" ]]
then
icon="<fn=1></fn>"
elif [ $string -gt 49 ]
then
icon="<fn=1></fn>"
elif [ $string -eq 0 ]
then
icon="<fn=1></fn>"
elif [ $string -lt 50 ]
then
icon="<fn=1></fn>"
fi
echo "${string}% $icon" > $HOME/.config/xmobar/scripts/volume-pipe
done
|