The chromebook hacker’s fav, the Acer C720, is neat in that it comes with a little grey plastic lens at the top corner of its keyboard. What is neat about it is that this lens houses a combination light/infra-red/proximity sensor. What is not so neat is that this sensor is enabled in the kernel, but does not have any software which uses it – the screen does not have any automatic brightness adjustment, for instance.
I would have really liked it if my Chromebook came out of the box with auto-dimming screen, but I decided to do the next best thing and get this working myself. I wrote a quick script that I call AutoLight that polls the sensor, and adjusts the screen to the brightness level. You can check it out here on Github.
The script is intended to make brightness transitions soft, and I tried to minimize some of the expense of polling on CPU load. Bundled with AutoLight is an init script, so it can be run as a service on startup. Tested and working on the Acer C720 / C720P; crude but effective backlight auto-adjustment!