diff options
author | Suleyman Farajli <suleyman@farajli.net> | 2024-09-04 23:19:54 +0400 |
---|---|---|
committer | Suleyman Farajli <suleyman@farajli.net> | 2024-09-04 23:19:54 +0400 |
commit | fb104be6cec2cea5130e7011a59acd9fa84a44df (patch) | |
tree | 083ba298703b6c5a43d5d77005d312f5dd87e8b2 | |
parent | a0a334da9e6fa95adbd2946eb9ff01cb395bb16a (diff) |
svol current volume works with bluetooth connections
-rwxr-xr-x | scripts/svol | 4 |
1 files 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 |