diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2022-08-01 22:29:48 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2022-08-01 22:29:48 +0200 |
| commit | f5bdcf3edce94023fd34ee64e3da51a231ef5749 (patch) | |
| tree | 809686b3804ad699493e616866dea037ea644cd4 | |
| parent | b222c2857fde743ed5bb2568d972b51ee915e834 (diff) | |
| download | dotfiles-f5bdcf3edce94023fd34ee64e3da51a231ef5749.tar.gz dotfiles-f5bdcf3edce94023fd34ee64e3da51a231ef5749.zip | |
[status] fix mute detection
pamixer apparently no longer reports the mute status via an exit
code but rather prints true or false to stdout.
| -rwxr-xr-x | scripts/audio_status.sh | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/audio_status.sh b/scripts/audio_status.sh index 93fe840..2a8b28f 100755 --- a/scripts/audio_status.sh +++ b/scripts/audio_status.sh @@ -10,11 +10,12 @@ function print_unmute { if type pamixer &>/dev/null then - if pamixer --get-mute &> /dev/null + muted="$(pamixer --get-mute)" + if test ! $? || test "$muted" == "true" then print_mute else - print_unmute + print_unmute fi if type pacmd &>/dev/null |
