Skip to content

Commit 1b3124e

Browse files
committed
add option to disable color muted
1 parent a84e283 commit 1b3124e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pulseaudio-control.bash

+7-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,12 @@ function output() {
387387
if [ "$IS_MUTED" = "yes" ]; then
388388
# shellcheck disable=SC2034
389389
VOL_ICON=$ICON_MUTED
390-
echo "${COLOR_MUTED}$(eval echo "$FORMAT")${END_COLOR}"
390+
content="$(eval echo "$FORMAT")"
391+
if [ -n "$COLOR_MUTED" ]; then
392+
echo "${COLOR_MUTED}${content}${END_COLOR}"
393+
else
394+
echo "$content"
395+
fi
391396
else
392397
eval echo "$FORMAT"
393398
fi
@@ -406,6 +411,7 @@ Options:
406411
Default: \"$AUTOSYNC\"
407412
--color-muted <rrggbb>
408413
Color in which to format when muted.
414+
Pass empty string to disable.
409415
Default: \"${COLOR_MUTED:4:-1}\"
410416
--notifications | --no-notifications
411417
Whether to show notifications when changing nodes.

0 commit comments

Comments
 (0)