sway_volume: drop pacmd, only use pactl

This commit is contained in:
Konstantin Koslowski 2021-02-03 12:16:47 +01:00
parent 20e10bb5b8
commit bcccd1cb0b

View file

@ -1,6 +1,6 @@
#!/bin/bash
source $HOME/.config/sway/bin/sway_helpers
SINK=$(pacmd list-sinks | grep "* index" | grep -oE '[0-9]*')
SINK=$(pactl info | grep "Default Sink" | cut -d ' ' -f 3)
APP="pavucontrol"
SOUND=$HOME/.config/sway/bin/drip.ogg
@ -23,15 +23,15 @@ fi
case $1 in
d*)
pactl set-sink-volume $SINK -5%
paplay $SOUND
paplay $SOUND &
;;
i*)
pactl set-sink-volume $SINK +5%
paplay $SOUND
paplay $SOUND &
;;
m*)
pactl set-sink-mute $SINK toggle
paplay $SOUND
paplay $SOUND &
;;
gui)
_check_app $APP