Change volume mute display, add max-volume
This commit is contained in:
@@ -43,9 +43,9 @@ EOF
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
u*) pulsemixer --change-volume +"$NUM" ; $RELOAD ;;
|
u*) pulsemixer --change-volume +"$NUM" --max-volume 100 ; $RELOAD ;;
|
||||||
d*) pulsemixer --change-volume -"$NUM" ; $RELOAD ;;
|
d*) pulsemixer --change-volume -"$NUM" --max-volume 100 ; $RELOAD ;;
|
||||||
s*) pulsemixer --set-volume "$NUM" ; $RELOAD ;;
|
s*) pulsemixer --set-volume "$NUM" --max-volume 100 ; $RELOAD ;;
|
||||||
t*) pulsemixer --toggle-mute ; $RELOAD ;;
|
t*) pulsemixer --toggle-mute ; $RELOAD ;;
|
||||||
m*) pulsemixer --mute ; $RELOAD ;;
|
m*) pulsemixer --mute ; $RELOAD ;;
|
||||||
n*) pulsemixer --unmute ; $RELOAD ;;
|
n*) pulsemixer --unmute ; $RELOAD ;;
|
||||||
|
|||||||
@@ -10,13 +10,14 @@ case $BLOCK_BUTTON in
|
|||||||
5) $MEDIACONTROL down 5 ;; # Scroll down
|
5) $MEDIACONTROL down 5 ;; # Scroll down
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
VOLUME="$($MEDIACONTROL getvolume)%"
|
||||||
|
|
||||||
if [ "$($MEDIACONTROL getmute)" = "1" ]; then
|
if [ "$($MEDIACONTROL getmute)" = "1" ]; then
|
||||||
COLOR="$COLOR7"
|
COLOR="$COLOR7"
|
||||||
VOLUME="MUTE"
|
|
||||||
SYMBOL=""
|
SYMBOL=""
|
||||||
else
|
else
|
||||||
COLOR="$COLOR15"
|
COLOR="$COLOR15"
|
||||||
VOLUME="$($MEDIACONTROL getvolume)%"
|
|
||||||
|
|
||||||
if [ "${VOLUME%?}" -ge "50" ]; then
|
if [ "${VOLUME%?}" -ge "50" ]; then
|
||||||
SYMBOL=""
|
SYMBOL=""
|
||||||
|
|||||||
Reference in New Issue
Block a user