The Electron App framework makes it really easy to build cross-platform applications. I know this, because I’ve made a bunch. But how do you find out if people are using the features in your application? You could ask them or wait for them to tell you, but you can also use Google Analytics’ event tracking […]
F.lux for Ubuntu
F.lux is a small but very useful application: It fades your screens to a warmer color temperature in the evening. This is pleasant for your eyes and won’t leave you wide awake at 2am because your computer monitors are so bright. There are mac and windows versions, but only a commandline app for Linux. Together with Michael Herf, the author of F.lux, I made a version for Ubuntu.
F.lux for Ubuntu is an indicator applet (like the new Messaging Menu), so it works very nicely on Ubuntu 10.04 and 10.10. Michael improved the commandline application by leaps and bounds. There are a bunch of new configuration options (all available in the GUI), the night/daytime cycle is now much more accurate, and it even takes daylight savings into account.
The F.lux indicator applet automatically manages the color temperature of your screen based on your latitude and longitude, or if you are in the US, your zipcode. In the preferences panel, you can set your preferred nighttime colortemperature and see a preview, as well as seeing the current color temperature.
Installation is easily done by adding the PPA for f.lux, simply type the following into your terminal:
sudo add-apt-repository ppa:nathan-renniewaldock/flux
sudo apt-get update
sudo apt-get install fluxgui
When you first launch the application (via ‘accessories’ in the menu, or by pressing alt+f2 and opening “fluxgui”) you will be asked to fill in either your latitude and langitude, or your zipcode. If you want f.lux to autostart at the next startup, select the “autostart” option. Close the preferences panel and you’re all set!
There is a bug in the current version of Fluxgui that’s preventing it from running correctly the first time it’s started. I wrote a fix that’ll be available in the PPA shortly (version 1.1.4). If you can’t start because fluxgui claims it’s already running, remove “fluxgui.pid” from the /tmp folder. After the update, it should work as advertised!
On developing F.lux for Ubuntu
As I mentioned, F.lux for Ubuntu is built using GTK+. This isn’t by choice, but needed because I wanted to built an indicator applet.
Coming from Python + Qt (for Trimage) , GTK+ feels like a serious step back. The Glade interface builder is clunky and quirky, and surprisingly, modules such as python-gconf and python-appindicator are virtually undocumented. There is a massive amount of time spent on figuring out what-goes-where-and-how.
Michael posted an official announcement on the F.lux website with these instructions as well: f.lux for linux, so be sure to go there and leave nice comments for us and tell us what we can improve! :)
The currently released version is 1.1.1, For version 1.2 we will be adding a “pause for an hour” function, as well as an indication of how long until sunset/sunrise. Feel free to suggest other new features or fork the project on Github. It’s build using Python and GTK+, and the GUI is MIT licenced.
I’m quite proud of the result so far, and I hope it’ll be as useful to others as it already has been to me! Please leave suggestions for new features in the replies :)