From fb104be6cec2cea5130e7011a59acd9fa84a44df Mon Sep 17 00:00:00 2001 From: Suleyman Farajli Date: Wed, 4 Sep 2024 23:19:54 +0400 Subject: svol current volume works with bluetooth connections --- scripts/svol | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/svol b/scripts/svol index 18287fa..f885a57 100755 --- a/scripts/svol +++ b/scripts/svol @@ -57,8 +57,8 @@ while getopts "i:d:s:pth" option; do "${0}: Failed to toggle volume" ;; p) - if ! pactl list sinks | grep '^[[:space:]]Volume:' | \ - head -n $(( $SINK + 1 )) | tail -n 1 | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' 2>/dev/null; then + if ! pactl get-sink-volume @DEFAULT_SINK@ \ + | sed -e 's,.* \([0-9][0-9]*\)%.*,\1,' | head -n1 2>/dev/null; then err "Failed to get current volume" else exit 0 -- cgit v1.2.3