Skip to content
MacBook automatic light sensor daemon
C Perl
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


lightum - MacBook automatic keyboard brightness daemon
(c)2011 Pau Oliva Fora - pof[at]eslack(.)org

This program implements automatic keyboard brightness on MacBookAir4 by reading
the light sensor value and adjusting the keyboard brightness accordingly.

Usage:  lightum [-m value] [-p value] [-i value] [-x] [-s] [-f] [-v]
        -m 1..255 : maximum brightness value in auto mode (default=255)
        -p num    : number of miliseconds between light sensor polls (default=800)
        -i num    : power off keyboard light on session idle seconds (default=10, 0 to disable)
        -x        : manual mode (will honor the brightness value set with Fn keys)
        -s        : power off keyboard light when screen saver is active
        -f        : run in foreground (do not daemonize)
        -v        : verbose mode, useful for debugging with -f

By default lightum will run in auto mode and will turn off the keyboard
backlight after 10 seconds when the computer is idle. In auto mode, the keyboard
backlight value is calculated automatically based on the ambient light sensor.

If you run it in manual mode (-x flag on the command line), it will not query
the light sensor, instead it will use the brightness value you set manually
using the function keys (F5/F6).

If you want the keyboard backlight always on use the '-i 0' command line flag.

Enjoy! :)
Something went wrong with that request. Please try again.