Add volume control script
Sometimes the built-in keys stop controlling the active volume source (they're probably bound to the internal speakers?). This script+cwm configuration fixes that.
This commit is contained in:
parent
12a06b4781
commit
b743440e1b
4
.cwmrc
4
.cwmrc
|
@ -34,6 +34,10 @@ bind-key XF86AudioPlay "playerctl play-pause"
|
|||
bind-key XF86AudioNext "playerctl previous"
|
||||
bind-key XF86AudioPrev "playerctl next"
|
||||
|
||||
bind-key XF86AudioRaiseVolume "volctl raise"
|
||||
bind-key XF86AudioLowerVolume "volctl lower"
|
||||
bind-key XF86AudioMute "volctl toggle-mute"
|
||||
|
||||
bind-mouse 4-1 window-move
|
||||
bind-mouse 4-2 window-close
|
||||
bind-mouse 4-3 window-resize
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
action=$1
|
||||
|
||||
if [ "$action" = "raise" ]; then
|
||||
sndioctl output.level=+0.05
|
||||
elif [ "$action" = "lower" ]; then
|
||||
sndioctl output.level=-0.05
|
||||
elif [ "$action" = "toggle-mute" ]; then
|
||||
sndioctl output.mute=!
|
||||
else
|
||||
echo "volctl: unknown action: $1"
|
||||
fi
|
Loading…
Reference in New Issue