From bffd6d997270b993f2685850b29508b70e4448d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hannes=20K=C3=B6rber?= Date: Tue, 12 Apr 2016 19:40:12 +0200 Subject: [PATCH] i3: Fix audio script. --- i3/i3/scripts/pa-volume | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i3/i3/scripts/pa-volume b/i3/i3/scripts/pa-volume index 7e0c553..413c83e 100755 --- a/i3/i3/scripts/pa-volume +++ b/i3/i3/scripts/pa-volume @@ -4,7 +4,7 @@ SINKNAME="alsa_output.pci-0000_00_1b.0.analog-stereo" # this is the worst -SINK=$(( $(pactl list sinks | grep "Name: " | grep -n "${SINKNAME}" | grep -o "^[[:digit:]]*") -1)) +SINK=$(( $(pactl list sinks | grep "Name: " | grep -n "${SINKNAME}"$ | grep -o "^[[:digit:]]*") -1)) getvol() { echo $(pactl list sinks | grep "^[[:space:]]*Volume" | head -n $(( $SINK + 1 )) | tail -n 1 | grep -o "[[:digit:]]*%" | head -n 1 | cut -d "%" -f 1)