How about a status bar widget that already does this task? (simple brightness applet)
just click on the brightness bar applet icon (next to the brightness update bars ) in your status window, you will get the option pycage talks about.