sway: add sound to sway_volume

This commit is contained in:
Konstantin Koslowski 2021-01-20 17:19:39 +01:00
parent 2d6c349b06
commit 78704fa1e4
2 changed files with 4 additions and 0 deletions

BIN
bin/drip.ogg Normal file

Binary file not shown.

View file

@ -2,6 +2,7 @@
source $HOME/.config/sway/bin/sway_helpers
SINK=$(pacmd list-sinks | grep "* index" | grep -oE '[0-9]*')
APP="pavucontrol"
SOUND=$HOME/.config/sway/bin/drip.ogg
## helpers
function _toggle() {
@ -22,12 +23,15 @@ fi
case $1 in
d*)
pactl set-sink-volume $SINK -5%
paplay $SOUND
;;
i*)
pactl set-sink-volume $SINK +5%
paplay $SOUND
;;
m*)
pactl set-sink-mute $SINK toggle
paplay $SOUND
;;
gui)
_check_app $APP