[ ] Add a config file [ ] Use a better filter than a simple median, maybe a kalman filter [x] Add a way to customise the brightness curve Percieved brightness is not linear, on low light you need a slightly higher brightness and on high light you can get away with a lower brightness than the max, the goal is to find the right curve for the screen [ ] Automatically detect backlight device, or at least make it configurable [ ] Add signal handlers [ ] SIGUSR1 to reset the user offset [x] Handle kill by closing all file descriptors (every read is done by only keeping the file open for as long as it is needed) [ ] Handle suspend and resume, usually suspending means that the screen is turned off so do not apply user offset [ ] Account for DPMS and do not apply offset in that case