From 996b55c931f2610ff314643fccd965e91ad68891 Mon Sep 17 00:00:00 2001 From: Johannes Rothe Date: Wed, 19 Sep 2018 22:59:18 +0200 Subject: [PATCH] pulseaudio script: simplify sink query --- scripts/pulseaudio-tail.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pulseaudio-tail.sh b/scripts/pulseaudio-tail.sh index 107adf6..2325c31 100755 --- a/scripts/pulseaudio-tail.sh +++ b/scripts/pulseaudio-tail.sh @@ -1,6 +1,6 @@ #!/bin/sh -sink=$(pactl list sinks | grep -B 1 RUNNING | head -n1 | sed 's/[A-Za-z# ]*//') +sink=$(pactl list sinks short | grep RUNNING | cut -c1) volume_print() { @@ -9,7 +9,7 @@ volume_print() { if [ "$muted" = true ]; then echo "$sink --" else - echo "$sink $(~/src/pamixer/pamixer --sink $sink --get-volume)" + echo "$sink: $(~/src/pamixer/pamixer --sink $sink --get-volume)" fi }