lkubuntu
A listing of random software, tips, tweaks, hacks, and tutorials I made for Ubuntu
Using Openlux to help your sleep and/or relax your eyes
Posted by on August 23, 2015
If you are familiar with research suggesting that blue light affects your sleep, you might also be familiar with a (free!) software named f.lux. I use it on my iDevices (used to use it on my computers too), and it works great …. except for a few issues.
The first is CPU consumption. Seriously, this software takes up a lot of CPU. That was the main reason behind ditching xflux (the X11 edition of the software). It also doesn’t entirely block out blue light, even at the lowest color temperature it allows (this is true for the iOS version too). There were a number of other issues that became annoying over time (forced very long animations, a daemon that rarely ever works as intended, sometimes the software doesn’t even work at all, mouse cursor being left entirely out of the picture, etc.). These would (probably) all be simple to fix …. however, it’s free as in price, not as in freedom. The software is closed-source.
Openlux is a very simple open-source MIT-licensed clone I wrote that tries to address these issues (minus the mouse cursor issue, that one is a bit more complex). For now, it doesn’t contain as many features as xflux does, but it is only a first release. Animations and the lot will come later :)
I haven’t worked on packaging yet (if anyone wishes to spend some time doing this, that would be greatly appreciated!!), but for now, visit https://github.com/AnonymouMeerkat/openlux for download and compilation information (sorry for the mess in main.c, I will get to that later!).
Here are a few usage examples
openlux # Sets the screen color temperature to 3400K (the default) openlux -k 1000 # Sets the color temperature to 1000K openlux -k 2000 -b 0 # Sets color temperature to 2000K, but removes all blue light openlux -k 2000 -b 255 # Ditto, but blue is set to 255 (maximum value, gives the screen a magenta-ish tone) openlux -r 130 -g 150 -b 100 # Gives the screen a dark swamp green tint (Kelvin value is ignored) openlux -k 40000 # Sets the screen color temperature to 40000K openlux -i # Resets the screen color temperature
I personally like using openlux -k 10000 during the day (very relaxing for the eyes!), and openlux -k 2300 -b 40 during the night.
I hope this can be useful for you!! If you have any issues, suggestions, feedback, etc. (even if you just want to say thank-you — those are always appreciated ^^), feel free to write a comment or send me an email!
Advertisements
do you know redshift? it’s a good alternative
thanks for letting me know!! no, I haven’t heard of it until now — looks like as if I should have done a bit more research before working on this :P
I will still continue to work on this project though, since there are a few differences between this project and the other that I don’t wish to lose (namely, this one isn’t daemonized, and color temperatures are calculated on the fly, allowing for greater flexibility — at the cost of preciseness and speed).
Thank you very much. Build was easy. Works great!
you’re welcome, glad it works for you!!
Today I tried v.02 and the make failed. ‘XOpenDisplay’ and other links were not found. I installed a lot dev-files, but no success. Any hint for me?
Could you share the CMakeCache.txt file? I’m not quite sure what the issue is, but I think that the CMakeCache might have a hint as to where it relies (it contains the variables that CMake generated, such as if it found X11, where it found it, what libraries it links to, etc.)
How do I share a file? My inspection shows me, that both USE_IOS and USE_X11 are BOOL:ON.
The ‘cmake ..’ looks fine, but the ‘make’ gaves me some undefined references.
Ah, the user Tankypon has the same issues. I saw it in this moment :-) And yes, I did a ‘git pull’.
Could you try again? I just posted a new commit. If this doesn’t work, I think I know what the issue is.
Hi, I posted screenshots to your github-site.
Have you heard of redshift (, )? It’s GPL and supports Linux/X11, Windows and OS X.
(Links disappeared – because I put them in angle brackets?)
http://jonls.dk/redshift/
https://github.com/jonls/redshift
thanks for letting me know!! I replied to another comment about this here: https://lkubuntu.wordpress.com/2015/08/23/using-openlux-to-help-your-sleep-andor-relax-your-eyes-2/#comment-14095 (linking to avoid redundancy :) )
Pingback: OpenLux programa abierto que reduce el impacto de la luz de dispositivos electrónicos en nuestra vista
Pingback: Openlux 0.2 beta – Animations, iOS port | lkubuntu
Pingback: Why Openlux instead of Redshift? | lkubuntu
Since you use commandline arguments for altering the light values, you can also use crontab to make the changes at certain times, certain days and for daylight savings, if you have it, you can set different entries for different months. This reduce the cpu usage.
That was one of the ideas behind this, was to be able to use this with cron (or other) :D In order to not have it jar out of nowhere, you can also have a variable animation time (with a delay between “frames”, to lower CPU usage) :)
Pingback: Fun obfuscation in openlux | lkubuntu
Pingback: openlux 0.2.1 + roadmap | lkubuntu