Implemented volume toggle
This commit is contained in:
parent
5d56266be4
commit
c6ee0e032e
6
bin/togglemute.sh
Executable file
6
bin/togglemute.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
if [ "$(amixer get Master | cut -d$'\n' -f 5 | cut -d ' ' -f 8)" == "[on]" ]; then
|
||||
amixer set Master mute
|
||||
else
|
||||
amixer set Master unmute
|
||||
fi
|
@ -3,7 +3,7 @@ buildClock() {
|
||||
}
|
||||
|
||||
getVolume() {
|
||||
echo -n "$(amixer get Master | sed -n 's/^.*\[\([0-9]\+\)%.*$/\1/p' | uniq)%%"
|
||||
echo -n "$(amixer get Master | cut -d$'\n' -f 5 | cut -d ' ' -f 8) $(amixer get Master | sed -n 's/^.*\[\([0-9]\+\)%.*$/\1/p' | uniq)%%"
|
||||
}
|
||||
|
||||
getMPD(){
|
||||
|
Loading…
Reference in New Issue
Block a user