diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/svol | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/svol b/scripts/svol index 79251a2..18287fa 100755 --- a/scripts/svol +++ b/scripts/svol @@ -57,7 +57,8 @@ while getopts "i:d:s:pth" option; do "${0}: Failed to toggle volume" ;; p) - if ! pactl get-sink-volume @DEFAULT_SINK@ 2>/dev/null; then + 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 err "Failed to get current volume" else exit 0 |