This commit is contained in:
ange 2025-01-30 13:55:36 +00:00
parent ddbc24a33f
commit ddd00d7844
Signed by: ange
GPG key ID: 9E0C4157BB7BEB1D
16 changed files with 121 additions and 91 deletions

View file

@ -19,8 +19,11 @@ function update_vol() {
case "$1" in
+*|-*)
CUR="$(($CUR + $1 - $CUR % $1 + $CUR % $1 * 10 / $1 / 5 * $1))"
[ "$CUR" -lt 0 ] && CUR=0
[ "$CUR" -gt 150 ] && CUR=150
if [ "$CUR" -lt 0 ]; then
CUR=0
elif [ "$CUR" -gt 300 ]; then
CUR=150
fi
;;
*)
CUR="$1"
@ -40,7 +43,9 @@ else
if [[ "$1" =~ [0-9] ]]; then
update_vol "$1"
fi
[ -n "$MUTE" ] && wpctl set-mute "$DEV" 0
if [ -n "$MUTE" ]; then
wpctl set-mute "$DEV" 0
fi
fi
kill "-$SIG" "$(cat "$HOME/.cache/pidofbar")"