From e29157351aa1544e4bf6861363001db83a7542ca Mon Sep 17 00:00:00 2001 From: Riyyi Date: Tue, 19 Mar 2019 13:27:24 +0100 Subject: [PATCH] Change volume mute display, add max-volume --- .scripts/mediacontrol.sh | 6 +++--- .scripts/wm/volume.sh | 5 +++-- packages | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.scripts/mediacontrol.sh b/.scripts/mediacontrol.sh index b33f7f1..801db5f 100755 --- a/.scripts/mediacontrol.sh +++ b/.scripts/mediacontrol.sh @@ -43,9 +43,9 @@ EOF } case "$1" in - u*) pulsemixer --change-volume +"$NUM" ; $RELOAD ;; - d*) pulsemixer --change-volume -"$NUM" ; $RELOAD ;; - s*) pulsemixer --set-volume "$NUM" ; $RELOAD ;; + u*) pulsemixer --change-volume +"$NUM" --max-volume 100 ; $RELOAD ;; + d*) pulsemixer --change-volume -"$NUM" --max-volume 100 ; $RELOAD ;; + s*) pulsemixer --set-volume "$NUM" --max-volume 100 ; $RELOAD ;; t*) pulsemixer --toggle-mute ; $RELOAD ;; m*) pulsemixer --mute ; $RELOAD ;; n*) pulsemixer --unmute ; $RELOAD ;; diff --git a/.scripts/wm/volume.sh b/.scripts/wm/volume.sh index b28b629..f27cf9c 100755 --- a/.scripts/wm/volume.sh +++ b/.scripts/wm/volume.sh @@ -10,13 +10,14 @@ case $BLOCK_BUTTON in 5) $MEDIACONTROL down 5 ;; # Scroll down esac +VOLUME="$($MEDIACONTROL getvolume)%" + if [ "$($MEDIACONTROL getmute)" = "1" ]; then COLOR="$COLOR7" - VOLUME="MUTE" + SYMBOL="" else COLOR="$COLOR15" - VOLUME="$($MEDIACONTROL getvolume)%" if [ "${VOLUME%?}" -ge "50" ]; then SYMBOL="" diff --git a/packages b/packages index b0f622c..c59fef2 100644 --- a/packages +++ b/packages @@ -72,7 +72,7 @@ playerctl poppler-glib pulseaudio pulseaudio-alsa -pulsemixer +pulsemixer-git pwgen python2-click-5.1 python2-setuptools