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