4 maxbright=$(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/max_brightness)
5 curbright=$(cat /sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness)
6 device=/sys/devices/platform/twl4030-pwm0-bl/backlight/twl4030-pwm0-bl/brightness
8 newbright=$(DISPLAY=0:0 zenity --scale --text "set brightness" --min-value=$minbright --max-value=$maxbright --value=$curbright --step 1)
12 if [ $newbright ]; then
13 if [ $newbright -le $minbright ]; then newbright=$minbright; fi
14 if [ $newbright -ge $maxbright ]; then newbright=$maxbright; fi
15 echo $newbright > $device