volume multiline output error fixed

This commit is contained in:
Luke Smith 2020-03-23 12:21:25 -04:00
parent f6659aac33
commit c8eae342fe
No known key found for this signature in database
GPG key ID: 4C50B54A911F6252

View file

@ -14,7 +14,7 @@ volstat="$(amixer get Master)"
echo "$volstat" | grep "\[off\]" >/dev/null && printf "🔇\\n" && exit
vol=$(echo "$volstat" | grep -o "\[[0-9]\+%\]" | sed 's/[^0-9]*//g')
vol=$(echo "$volstat" | grep -o "\[[0-9]\+%\]" | sed "s/[^0-9]*//g;1q")
if [ "$vol" -gt "70" ]; then
icon="🔊"