From 2a7059eabababbaace0ae48810cfa0cda1acd6cc Mon Sep 17 00:00:00 2001 From: cronidea Date: Sun, 28 Nov 2021 14:09:00 +0000 Subject: [PATCH] Added muteinputs and modified sb-volume --- .local/bin/statusbar/sb-volume | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.local/bin/statusbar/sb-volume b/.local/bin/statusbar/sb-volume index 3cfdc457..08d12052 100755 --- a/.local/bin/statusbar/sb-volume +++ b/.local/bin/statusbar/sb-volume @@ -13,8 +13,6 @@ case $BLOCK_BUTTON in 6) "$TERMINAL" -e "$EDITOR" "$0" ;; esac -[ $(pamixer --get-mute) = true ] && echo 🔇 && exit - vol="$(pamixer --get-volume)" if [ "$vol" -gt "70" ]; then @@ -27,4 +25,11 @@ else echo 🔇 && exit fi -echo "$icon$vol%" +source="$(pamixer --list-sources | awk '!/Built/{ if (NR==2) {print $1} }')" +if [ "$(pamixer --source $source --get-mute)" = "true" ]; then + mute="❌🎙️" +else + mute="✔️🎙️" +fi + +echo "$icon$vol% $mute"