From ba80e37475dd7103b741986583e202ad43a45134 Mon Sep 17 00:00:00 2001 From: GabubuAvailable Date: Wed, 20 Apr 2022 00:11:51 +0300 Subject: [PATCH] for vol module it shows when is muted --- modules.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules.sh b/modules.sh index 64e0271..1f2d4fd 100755 --- a/modules.sh +++ b/modules.sh @@ -23,11 +23,11 @@ module_user() { } module_vol_pa() { - export bar="${bar}${1}$(echo "`pamixer --get-volume`%")${2}" + export bar="${bar}${1}$(if pamixer --sink 0 --get-mute | grep -q 'false'; then echo "`pamixer --sink 0 --get-volume`%"; else echo "OFF"; fi)${2}" } module_vol_alsa() { - export bar="${bar}${1}$(echo "`amixer sget Master | tail -n1 | sed -r "s/.*\[(.*)%\].*/\1/"`%")${2}" #Thanks speedie for the command + export bar="${bar}${1}$(if amixer sget Master | grep -q 'on'; then echo "`amixer sget Master | tail -n1 | sed -r "s/.*\[(.*)%\].*/\1/"`%"; else echo "OFF"; fi)${2}" #Thanks speedie for the command } module_mic_pa() {