Change backlight according to session's idle time
commite610dd8dca03ef817499632dacd855d1962a8dfc
authorCarlos R. Mafra <crmafra@gmail.com>
Sun, 13 Jan 2013 22:13:25 +0000 (13 22:13 +0000)
committerCarlos R. Mafra <crmafra@gmail.com>
Mon, 14 Jan 2013 00:24:45 +0000 (14 00:24 +0000)
tree048de3ff8bbacb3539d1f62c492963e3185df8e9
parentefed065e581d762a640e14989b2172b96ebce354
Change backlight according to session's idle time

This patch introduces the command line option --session-idle=
which sets the session idle time in seconds.

If X is idle for more than 'session-idle' seconds and the laptop
is running on battery, use xbacklight to set brightness to 20%,
and to 100% otherwise.

The idea and some code added with this patch comes from the GPL'ed
program 'lightum'.

Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
Makefile
src/event.c
src/main.c
src/main.h