We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f5ace77 commit 330c8d6Copy full SHA for 330c8d6
pulseaudio-control.bash
@@ -338,9 +338,15 @@ function listen() {
338
# an event occurs.
339
output
340
341
+ if [[ "$NODE_TYPE" == "output" ]]; then
342
+ events_regex="on \(card\|sink\|server\|client\)"
343
+ else
344
+ events_regex="on \(card\|source\|server\|client\)"
345
+ fi
346
+
347
# Listen for changes and immediately create new output for the bar.
348
# This is faster than having the script on an interval.
- pactl subscribe 2>/dev/null | grep --line-buffered -e "on card" -e "on s${SINK_OR_SOURCE}" -e "on server" | {
349
+ pactl subscribe 2>/dev/null | grep --line-buffered -e "$events_regex" | {
350
while read -r; do
351
# Output the new state
352
0 commit comments