Home Application – IP Address Widget for Nokia N9/N950 – MeeGo Harmattan

Application – IP Address Widget for Nokia N9/N950 – MeeGo Harmattan

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 /sbin/ifconfig 😉
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.

The concept

  1. Let the .desktop file point to an icon in /home/user/
  2. The code can now update this icon using PIL
  3. The icon is automatically reloaded when it changes
  4. Profit!

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).

Get it

  • Package: ipaddr-widget_1.0.0_all.deb
  • Source package: ipaddr-widget_1.0.0.dsc and ipaddr-widget_1.0.0.tar.gz
  • Git repository: https://github.com/thp/ipaddr-widget

This widget is proudly powered by Python and PIL. If you have problems installing the .deb, please install the packages python and 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.

Further work / ideas

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”…
The 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

About ReadWrite’s Editorial Process

The ReadWrite Editorial policy involves closely monitoring the tech industry for major developments, new product launches, AI breakthroughs, video game releases and other newsworthy events. Editors assign relevant stories to staff writers or freelance contributors with expertise in each particular topic area. Before publication, articles go through a rigorous round of editing for accuracy, clarity, and to ensure adherence to ReadWrite's style guidelines.

Get the biggest tech headlines of the day delivered to your inbox

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.

    Tech News

    Explore the latest in tech with our Tech News. We cut through the noise for concise, relevant updates, keeping you informed about the rapidly evolving tech landscape with curated content that separates signal from noise.

    In-Depth Tech Stories

    Explore tech impact in In-Depth Stories. Narrative data journalism offers comprehensive analyses, revealing stories behind data. Understand industry trends for a deeper perspective on tech's intricate relationships with society.

    Expert Reviews

    Empower decisions with Expert Reviews, merging industry expertise and insightful analysis. Delve into tech intricacies, get the best deals, and stay ahead with our trustworthy guide to navigating the ever-changing tech market.