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 #!/bin/bash
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=$(pactl info | grep "Default Sink" | cut -d ' ' -f 3)
APP="pavucontrol" APP="pavucontrol"
SOUND=$HOME/.config/sway/bin/drip.ogg SOUND=$HOME/.config/sway/bin/drip.ogg
@ -23,15 +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 paplay $SOUND &
;; ;;
i*) i*)
pactl set-sink-volume $SINK +5% pactl set-sink-volume $SINK +5%
paplay $SOUND paplay $SOUND &
;; ;;
m*) m*)
pactl set-sink-mute $SINK toggle pactl set-sink-mute $SINK toggle
paplay $SOUND paplay $SOUND &
;; ;;
gui) gui)
_check_app $APP _check_app $APP