f.lux Makes For Sweet Dreams
by admin on Jan.26, 2013, under Linux
Last year a Hackerspace colleague turned me on to this nifty tool. (Thanks Andy!) It’s just the kind of thing I like: A super-simple, lightweight, “just works” applet that does something exceedingly useful – it red shifts your monitor as you enter evening.
http://stereopsis.com/flux/
It makes the color of your computer’s display adapt to the time of day, warm at night and like sunlight during the day.
It’s even possible that you’re staying up too late because of your computer. You could use f.lux because it makes you sleep better, or you could just use it just because it makes your computer look better.
Now, that that might sound boring or “not very useful” – but I encourage you to test drive it. True, you can manually adjust your monitor, have different color profiles, etc. but the beauty of this is it will color shift automatically – which is exactly what I needed.
I can’t tell you how nice it isĀ as I’m coding away at night (when I probably shouldn’t be) to have the screen dim to a nice rose tint. I swear I breath a sigh of relief every time. (And it even works with X when I’m playing a game, Diablo 3 looks pretty cool when it happens.)
In the morning, it is equally nice. Rather than be blinded when I turn on the monitor, it is far more soothing and acceptable.
It might indeed even help you sleep better by reducingĀ stimulation received from blue wavelength light during evening. Check out the research links at the site for further reading.
You can simply download the binary and run it:
wget http://secure.herf.org/flux/xflux.tgz
By providing your zip code (United States only) or lat+long it will be better able to time the transitions. Gnome / Ubuntu users can have a little control panel too – though it does not seem to play well with Unity. No matter though, you don’t really need it. You can add a symlink to the binary from your Desktop Environments startup folder, or be fancy and make a script that starts it every time you boot. A bash script follows which checks for a previously started instance. Sweet dreams.
#!/bin/bash
#!/bin/bash
# Script to automatically start xflux
# http://stereopsis.com/flux/
# wget http://secure.herf.org/flux/xflux.tgz
# To have it start automatically on user login:
# KDE: Place binary or this script in /home/$USER/.kde4/Autostart
# Gnome / Ubuntu: Run gnome-session-properties in terminal and add xflux (or this script) to the startup program list
# See: http://askubuntu.com/questions/48321/how-to-start-applications-at-startup-automatically
# Other: Create a symlink to the binary, or place it in your environments startup folder, etc.
# Usage: /usr/local/bin/xflux [-z zipcode | -l latitude] [-g longitude] [-k colortemp (default 3400)] [-nofork]
# protip: Say where you are (use -z or -l).
instance=`pidof xflux`
if [ -z $instance ]
then
/usr/local/bin/xflux -z yourZipCode
else
echo "xflux is already running with pid $instance."
echo "You may kill it with: kill $instance or pkill xflux"
fi
Leave a Reply
You must be logged in to post a comment.