pulseaudio script: simplify sink query

This commit is contained in:
Johannes Rothe 2018-09-19 22:59:18 +02:00
parent 455f00bba2
commit 996b55c931

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/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() { volume_print() {
@ -9,7 +9,7 @@ volume_print() {
if [ "$muted" = true ]; then if [ "$muted" = true ]; then
echo "$sink --" echo "$sink --"
else else
echo "$sink $(~/src/pamixer/pamixer --sink $sink --get-volume)" echo "$sink: $(~/src/pamixer/pamixer --sink $sink --get-volume)"
fi fi
} }