herbstluftwm: panel: change volume bar style

This commit is contained in:
Thomas Preisner 2016-12-13 10:22:43 +01:00
parent 3d35ce3108
commit f3a88d4b06

View file

@ -111,9 +111,9 @@ function battery() {
function volume() {
vol=$(amixer get Master | grep "%" | head -n1 | awk -F"[][]" '{if($6~"off"){print "0%";} else {print $2;}}' | tr -d '%')
if [[ $vol -le 0 ]]; then
echo -n $(icon volume_off grey) $(echo $vol | dzen2-gdbar -nonl)
echo -n $(icon volume_off grey) $(echo $vol | dzen2-gdbar -s o -nonl)
else
echo -n $(icon volume_on white) $(echo $vol | dzen2-gdbar -nonl)
echo -n $(icon volume_on white) $(echo $vol | dzen2-gdbar -s o -nonl)
fi
}