fix: set-{light,vol} calculations

This commit is contained in:
AngeD 2023-02-15 08:02:00 +01:00
parent 2c856d8606
commit fdba17e7ff
6 changed files with 6 additions and 7 deletions

View file

@ -18,14 +18,13 @@ set +e
CUR="$(cat "$CUR_FILE" || echo 50)"
set -e
CUR="$((CUR - CUR % "$1"))"
case "${1:0:1}" in
'')
exit 1
;;
'+'|'-')
NEW="$((CUR + "$1"))"
NEW="$((CUR - CUR % $1 + $1))"
;;
*)
NEW="$1"