Notifications

May 25, 2009

I've been experimenting with the python bindings to libnotify - the interface to the cross-platform notification daemon. The API is quite simple (although there's more when you start adding buttons and things to the notifications):

        import pynotify
        import sys

        if not pynotify.init("Test Notification"):
            sys.exit(1)

        n = pynotify.Notification("Test", "testing")
        if not n.show():
            print "Failed to send notification"

Then I put these notifications into a simple XMPP bot, so that I could send it Jabber messages and they would get displayed as a notice.

I'm not sure where I'm going with this. :)

One problem I have with e.g. Facebook is that it requires me to go to their website and check a page to see what's been happening to my friends. Similarly BBC News.

One traditional answer to the news problem is the use of RSS (and similar) feeds in a reader such as liferea. But for information that comes from the Facebook API, Twitter, XMPP or email, I'll have to use a different app. Why should the user interface depend on the underlying technology?

I found 'yarssr' while thinking about this - it's an RSS reader in the form of a notification area icon. I like the way it tries to integrate with the desktop more than, say, liferea does - but I would prefer a list of new entries when I click on the icon rather than a list of feeds to hunt through. I suppose I could change it, it's in Perl. :)

Something like a drop-down notification icon list of recent 'events', with pluggable sources of information and libnotify notifications, might make an interesting diversion.

Nifty tech tag lists fromĀ Wouter Beeftink