pyra-keyboard-brightness-up.sh 417 Bytes
Newer Older
Askarus's avatar
Askarus committed
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/sh

maxbright="$(cat /sys/devices/platform/keyboard-backlight/backlight/keyboard-backlight/max_brightness)"
curbright="$(cat /sys/devices/platform/keyboard-backlight/backlight/keyboard-backlight/actual_brightness)"

if [ $curbright = $maxbright]; then
newbright=$maxbright
else
newbright=$(($curbright+1))
fi

echo $newbright > /sys/devices/platform/keyboard-backlight/backlight/keyboard-backlight/brightness