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() {
|
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(){
|
getMPD(){
|
||||||
|
2
sxhkdrc
2
sxhkdrc
@ -94,7 +94,7 @@ XF86AudioRaiseVolume
|
|||||||
XF86AudioLowerVolume
|
XF86AudioLowerVolume
|
||||||
amixer set Master 3- unmute
|
amixer set Master 3- unmute
|
||||||
XF86AudioMute
|
XF86AudioMute
|
||||||
amixer set Master mute
|
sh ~/bin/togglemute.sh
|
||||||
XF86AudioPlay
|
XF86AudioPlay
|
||||||
amixer set Master unmute
|
amixer set Master unmute
|
||||||
XF86HomePage
|
XF86HomePage
|
||||||
|
Loading…
Reference in New Issue
Block a user