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
|
||||
res=$(amixer -D pulse sget Master)
|
||||
enabled=$(echo $res | egrep -o "\[on\]" | wc -l)
|
||||
enabled=$(amixer -D pulse sget Master | egrep -o "\[on\]" | wc -l)
|
||||
if [[ $enabled == "0" ]]; then
|
||||
echo "off"
|
||||
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
|
||||
exit 0
|
||||
|
|
Loading…
Reference in a new issue