Based on my experiments with the Calendar Icon Hack, this takes the concept one step further and provides a "Widget" for your Harmattan (N950/N9) application screen that shows your current IP address(es). If you click on it, it will automatically update itself (it takes about two seconds), but that's still easier than firing up the Terminal and typing
Feel free to improve upon this concept - the source is open for you to grab, it's very (like, very very) trivial to adapt it to other use cases.
This is very lightweight: When idle, this "widget" doesn't take up any more resources than a normal app icon would (it it just that, after all).
This widget is proudly powered by Python and PIL. If you have problems installing the .deb, please install the packages
python-imaging (both are in the Nokia Repos) using:
$ devel-su (enter the root password, usually "rootme") # apt-get update # apt-get install python python-imaging
If you are installing from the command line (with
dpkg -i), you can use
apt-get -f install after it to fulfill missing dependencies.
In addition to changing the icon itself, one could also change the .desktop file (if it's in
/home/user/.local/share/applications/, you can read/write it easily from your code without permission problems) and changing e.g. the text below the "widget" to something useful.
Combined with the Event Feed library, one could make even more flexible widgets.
Also, one could combine this image-generating technique with the fact that the N9 supports an operator logo (used by e.g. Frals' LPM Customizer) and come up with some fancy low power mode display "widget"...
postinst script could make sure that if the icon does not exist, it will be created (make sure to chown it to user, though). Right now, the user has to click the widget after install to load it.
And last but not least you don't have to have user interaction to update the widget - just let something run in the background and update the icon file and it will automatically be reloaded.
Source The Io