change volume script
This commit is contained in:
parent
9c0a9e39cc
commit
615f2cb5ac
2 changed files with 10 additions and 6 deletions
10
config/xmobar/scripts/pulsevol.sh
Executable file
10
config/xmobar/scripts/pulsevol.sh
Executable file
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
vol=$(pamixer --get-volume)
|
||||||
|
mute=$(pamixer --get-mute)
|
||||||
|
|
||||||
|
if [ $mute = 'true' ]; then
|
||||||
|
echo MUTED
|
||||||
|
else
|
||||||
|
echo Vol: $vol%
|
||||||
|
fi
|
|
@ -1,6 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
# Get the maximum volume of any pulseaudio sink channel
|
|
||||||
# amixer get Master | egrep -o "[0-9]+%"
|
|
||||||
vol=$(amixer get Master | awk -F'[]%[]' '/%/ {if ($7 == "off") { print "MM" } else { print $2 }}' | head -n 1)
|
|
||||||
|
|
||||||
echo Vol: $vol%
|
|
Loading…
Reference in a new issue