a Telepathy blinkenlights "plugin"

A request that people occasionally make is that they would like a “blinkenlights” plugin for Empathy, similar to the one for Pidgin. The nice thing about using Telepathy, is that for any case where we simply want to observe the state of a conversation (or file transfer, or video call, etc.), we don't need to write a plugin per chat client, instead we can write what in Telepathy parlance we call an Observer.

An Observer does just that, it observes. The new logging service is an Observer that records all of the messages coming to and from the chat clients. Soon Zeitgeist will observe Telepathy channels to record when you started and finished conversation and VoIP calls for your activity journal (this is really awesome, I'm really looking forward to this). It's possible for an Observer to list currently ongoing conversations (Meego does this) and to count how many unread messages a conversation has (so long as you have a well-behaved client, that only acknowledges messages once it's sure the user has seen them).

And so with that in mind, I present all the Telepathy bits of a blinkenlights Observer. I say all the Telepathy bits, because it doesn't actually do any light blinking, and instead prints out TOTAL UNREAD MESSAGES: 2. Basically I'm hoping that someone else writes the light-blinking bit. If you do that, I'll package this up as a real program, that registers with Mission Control and everything and can be installed to make your lights blink to your heart's content.

For reference, it depends on tp-glib 0.11, cause I like using API I wrote last week. If someone wants to extend this example further (e.g. to listing the name of the sender on your LCD panel on your keyboard), jump on irc.freenode.net/#telepathy and we can help you do that too.

Finally, for the Python-people, here's an example Observer in Python. This Observer doesn't count unread messages (instead it tracks the lifetime of a conversation, like Zeitgeist will do), but it could be easily modified to count unread messages instead.

One thought on “a Telepathy blinkenlights "plugin"”

Leave a Reply

Your email address will not be published. Required fields are marked *

Creative Commons Attribution-ShareAlike 2.5 Australia
This work by Danielle Madeley is licensed under a Creative Commons Attribution-ShareAlike 2.5 Australia.