PrawnOS-nonfree/filesystem/resources/InstallResources/xfce-config/brightness/backlight_up.sh

14 lines
241 B
Bash
Raw Normal View History

#!/bin/bash
DEV=/sys/class/backlight/backlight
BL=$(cat $DEV/brightness)
MAX=$(cat $DEV/max_brightness)
if [ $BL -lt 5 ]; then
BL=$((BL + 1))
else
BL=$((BL + ( BL / 4 )))
fi
if [ $BL -gt $MAX ]; then
BL=$MAX
fi
echo $BL > $DEV/brightness