From bcccd1cb0bf8ca99ab77e84760147422d1a8164e Mon Sep 17 00:00:00 2001 From: Konstantin Koslowski Date: Wed, 3 Feb 2021 12:16:47 +0100 Subject: [PATCH] sway_volume: drop pacmd, only use pactl --- bin/sway_volume | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/sway_volume b/bin/sway_volume index 3ef4acf..ccb59b3 100755 --- a/bin/sway_volume +++ b/bin/sway_volume @@ -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