volume multiline output error fixed
This commit is contained in:
parent
f6659aac33
commit
c8eae342fe
1 changed files with 1 additions and 1 deletions
|
@ -14,7 +14,7 @@ volstat="$(amixer get Master)"
|
||||||
|
|
||||||
echo "$volstat" | grep "\[off\]" >/dev/null && printf "🔇\\n" && exit
|
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
|
if [ "$vol" -gt "70" ]; then
|
||||||
icon="🔊"
|
icon="🔊"
|
||||||
|
|
Loading…
Reference in a new issue