Skip to content

Commit

Permalink
added glob matching for blacklist
Browse files Browse the repository at this point in the history
  • Loading branch information
SPFabGerman committed Dec 28, 2021
1 parent 234d814 commit 9cb2659
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ Options:
Step size when inc/decrementing volume.
Default: 2
--sink-blacklist <name>[,<name>...]
Sinks to ignore when switching.
Sinks to ignore when switching. You can use globs. Don't forget to
quote the string when using globs, to avoid unwanted shell glob
extension.
Default: none
--sink-nicknames-from <prop>
pactl property to use for sink names, unless overriden by
Expand Down
7 changes: 5 additions & 2 deletions pulseaudio-control.bash
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,8 @@ function nextSink() {
# If it's in the blacklist, continue the main loop. Otherwise, add
# it to the list.
for sink in "${SINK_BLACKLIST[@]}"; do
if [ "$sink" = "$name" ]; then
# shellcheck disable=SC2053 # Disable Shellcheck warning for Glob-Matching
if [[ "$name" == $sink ]]; then
continue 2
fi
done
Expand Down Expand Up @@ -388,7 +389,9 @@ Options:
Step size when inc/decrementing volume.
Default: \"$VOLUME_STEP\"
--sink-blacklist <name>[,<name>...]
Sinks to ignore when switching.
Sinks to ignore when switching. You can use globs. Don't forget to
quote the string when using globs, to avoid unwanted shell glob
extension.
Default: none
--sink-nicknames-from <prop>
pactl property to use for sink names, unless overriden by
Expand Down

0 comments on commit 9cb2659

Please sign in to comment.