scripts: fix get volume script
This commit is contained in:
parent
0850b4fd02
commit
f3fae543a7
1 changed files with 2 additions and 3 deletions
|
@ -1,9 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
res=$(amixer -D pulse sget Master)
|
enabled=$(amixer -D pulse sget Master | egrep -o "\[on\]" | wc -l)
|
||||||
enabled=$(echo $res | egrep -o "\[on\]" | wc -l)
|
|
||||||
if [[ $enabled == "0" ]]; then
|
if [[ $enabled == "0" ]]; then
|
||||||
echo "off"
|
echo "off"
|
||||||
else
|
else
|
||||||
echo $(echo $res | egrep -o "[0-9]+%" | head -n 1)
|
echo $(amixer -D pulse sget Master | egrep -o "[0-9]+%" | head -n 1)
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
|
Loading…
Reference in a new issue