feat: debian specific configuration

This commit is contained in:
AngeD 2022-08-17 09:51:27 +02:00
parent 36676206b8
commit bb1e2f21c1
6 changed files with 30 additions and 28 deletions

View file

@ -5,8 +5,10 @@ shopt -s extglob nullglob
set_brightness() {
MAX="$(cat "$1"/max_brightness)"
FILE="$1"/brightness
VAL="$(($2 * MAX / 100))"
VAL="$(($2 * MAX / 100 + 1))"
[ "$VAL" -lt 0 ] && VAL=0
[ "$VAL" -gt "$MAX" ] && VAL="$MAX"
echo "$VAL" > "$FILE"
}