To adjust brightness of laptop screen, without help of keyboard.

Thanks to my puppy Linux, which provides nice little scripts "brightness-up" and "brightness-down" to do the job.

Once we peep into it, we see what is going on under the hood.

To adjust brightness of laptop screen, we do this:

Current brightness is provided by file /sys/class/backlight/acpi_video0/actual_brightness.
Collect current brightness.
Max brightness is provided by file /sys/class/backlight/acpi_video0/max_brightness.
Now write a number, from 0 to MAX, to the file /sys/class/backlight/acpi_video0/brightness using echo.
Done.

So simple!!

No comments: