feat(prog/xmobar): add support muted
This commit is contained in:
parent
dcc2f3d23a
commit
2cb468f9a5
1 changed files with 7 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
#!/bin/bash
|
||||
echo $(amixer -D pulse sget Master | egrep -o "[0-9]+%" | head -n 1)
|
||||
res=$(amixer -D pulse sget Master)
|
||||
enabled=$(echo $res | egrep -o "\[on\]" | wc -l)
|
||||
if [[ $enabled == "0" ]]; then
|
||||
echo "off"
|
||||
else
|
||||
echo $(echo $res | egrep -o "[0-9]+%" | head -n 1)
|
||||
fi
|
||||
exit 0
|
||||
|
|
Loading…
Reference in a new issue