From ab737ad7ceaed5650c17d483fc4d6aa511286dfc Mon Sep 17 00:00:00 2001 From: Thomas Preisner Date: Tue, 13 Dec 2016 00:02:39 +0100 Subject: [PATCH] herbstluftwm: panel: volume: ensure compatibility --- config/herbstluftwm/panel.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/herbstluftwm/panel.sh b/config/herbstluftwm/panel.sh index 58ea0bc..b8d91ff 100755 --- a/config/herbstluftwm/panel.sh +++ b/config/herbstluftwm/panel.sh @@ -109,7 +109,7 @@ function battery() { # VOLUME function volume() { - vol=$(amixer get Master | awk -F"[][]" '/dB/ {if($6~"off"){print "0%";} else {print $2;}}' | tr -d '%') + 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) else