Skip to content

Commit e046f9b

Browse files
Temporary fix to high CPU load
1 parent 399b7e8 commit e046f9b

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pulseaudio-control.bash

+1-7
Original file line numberDiff line numberDiff line change
@@ -338,15 +338,9 @@ function listen() {
338338
# an event occurs.
339339
output
340340

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-
347341
# Listen for changes and immediately create new output for the bar.
348342
# This is faster than having the script on an interval.
349-
pactl subscribe 2>/dev/null | grep --line-buffered -e "$events_regex" | {
343+
pactl subscribe 2>/dev/null | grep --line-buffered -e "on \(card\|s${SINK_OR_SOURCE}\|server\)" | {
350344
while read -r; do
351345
# Output the new state
352346
output

0 commit comments

Comments
 (0)