cleanup
This commit is contained in:
parent
ddbc24a33f
commit
ddd00d7844
16 changed files with 121 additions and 91 deletions
|
@ -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")"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue