summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/svol4
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