feat: cleaner light/vol rounds
This commit is contained in:
parent
202436aafa
commit
7b202de6cc
5 changed files with 8 additions and 17 deletions
|
@ -5,7 +5,7 @@ NOTIFY=(notify-send -t 1000 -a "$(basename "$0")" -u low)
|
|||
|
||||
function update_vol() {
|
||||
if [[ "$1" =~ ^(-|\+)* ]]; then
|
||||
CUR="$((CUR - CUR % $1 + $1))"
|
||||
CUR="$(($CUR + $1 - $CUR % $1 + $CUR % $1 * 10 / $1 / 5 * $1))"
|
||||
[ "$CUR" -lt 0 ] && CUR=0
|
||||
[ "$CUR" -gt 150 ] && CUR=150
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue