Posts Tagged 'desktop'

Reinventing Human-Computer Interaction

Many of you probably remember “Minority Report”, a mediocre science fiction film inspired by a short story of good old Philip K. Dick. The only thing I really remember well about this movie is the huge multi-touch computer used by the police force (or something). Although such sci-fi devices look great they are a total nightmare for every day use. Just imagine you have to lift your arms every time you try to switch to another tab page of your browser. That is not really a solution. But how can we use awesome looking multi-touch devices in combination with our other hardware? Here is a small video which came up with some cool and fresh ideas:

reinventing desktop human-computer interaction: 10/GUI


Adding a Pidgin Trayicon to DWM

I am using dwm as a window manager for a long time. I hacked a few things into it which I felt were missing back then when I started to use dwm and got used to it so much that I hesitate to switch to awesome or even a newer version of dwm.

Tiled window managing is really a great idea but conflicts with programs which are design to be used in a more “traditional” desktop environment. One of those application is my instant messenger. I gave up using ncurses based messengers due to their lack of drag’n’drop capabilities, so I started using pidgin.

What I always wanted to have is some kind of tray icon which informs me about new incoming messages. The cool thing about pidgin and the whole underlying purple library is their great support for dbus. So instead of ripping off code from awesome to get full freedesktop compliant tray icons I wrote a small python script to add an icon to my dwm status bar.

The dwm status bar reads a string from stdin (passed to it by xinit) and displays it in the upper right corner of the screen. To do that it uses a loop in .xinitrc like this:

while true
	date=`date +'%d.%m.%Y %H:%M'`
	echo $date ``
	sleep 3
done | dwm

OK, so I need a script named which is just looking for an incoming message on the libpurple dbus interface, prints out a small notification and then terminates.

Here is how I connect to the purple dbus:

bus = dbus.SessionBus()
purple_service = bus.get_object("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject")
purple = dbus.Interface(purple_service, "im.pidgin.purple.PurpleInterface")

Asking for an incoming message is not possible without installing a callback to a ReceivingChatMessage signal. But there is the option to ask for all active conversations which includes open chat windows and newly received messages.

def incomingMessageExists(purple):
    convs = purple.PurpleGetConversations()
    return len(convs) > 0

This function can be used to print [ ] to the screen when no message was received or [M] otherwise.

Of course much more is possible, nearly all important features can be used via dbus. See the developer documentation to find out about the other calls and signals.
I also added a notification which informs me about specific people going online (like my girlfriend ^^), here is the code example (that’s the simple version without error handling):

purple = dbus.Interface...
myid = # my ICQ/Jabber/... account id
contactid = # contact's ICQ/Jabber/... account id
myaccount = purple.PurpleAccountsFind(myid, '')
buddy = purple.PurpleFindBuddies(myaccount, contactid):
if purple.PurpleBuddyIsOnline(buddy[0]) == 1:
    print contactid, "is online"

The Death of the Desktop?

Do we need applications? Is the desktop metaphor dead? Here is an interesting Google TechTalk video about the alternative:

Away with Applications: The Death of the Desktop