Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Clight, small C linux user daemon to turn webcam into light sensor (github.com/fededp)
14 points by nierro on April 25, 2017 | hide | past | favorite | 5 comments



I am glad to present you all my latest project: clight.

Clight will set your screen backlight level by capturing frames from webcam and computing ambient brightness; it can manage your screen gamma temperature too. It uses geoclue2 to retrieve user location, and will compute sunrise/sunset times to set gamma.

It depends on a Bus interface i developed together with it, Clightd. Clightd is responsible of setting/getting screen brightness, capture frames from webcam and returning their average brightness, and setting/getting gamma. As it uses libudev to get/set backlight/get video device, it is much less prone to mistakes than "fopen/fscanf/fprintf", and safer.

Both softwares are distributed with a GPL license.

For more informations, please refer to both projects READMEs. I hope someone will find them interesting and useful!


Neat project! I might just start using this.

One thing - does clight support ICC color profiles? My screen is harshly blue without the correct profile applied. Redshift normally simply overrides your profile; it recently added support for a "preserve" option, which applies the desired color temperature as a function of the current profile, but unfortunately this makes the transform relative, and also not symmetrical. Turning the temp down by 1000K and then up by 1000K causes a loss in brightness.


It does not, i'm sorry. Let me know if it feels better with clight compared to redshift though; may be different algorithms lead to different (hopefully better) results!


This is a beautiful thing.


I hope someone noticed the "see light" pun!




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: