Continuing from the preview blog post on Gmail notifications, I wondered if there was a way to link Skype into libnotify. Skype uses its own notification system by default which doesn’t fit with the Gnome / Unity desktop, and looks kind of crappy. I could start a rant about Skype now, and the fact the Linux client never gets updated, seems to silently crash when open for longer than an hour, and is generally a shoddy counterpart to the Windows and Mac versions … then again since it’s been acquired by Microsoft I can’t see that this situation is going to ever improve now. Anyway, in the Options, under Notifications, if you select an event and then click Advanced, you can then clear the box that says “send a notification”, and select to run a script instead.
Using the ‘Contact came online’ event as an example, if you run the following as your ‘script’, inserting the name of a contact using the %sname variable, it looks like this:
notify-send "%sname is now online" -i skype
And for messages, you can use %smessage to insert the Skype message into a notification popup.
notify-send "%sname" "%smessage" -i skype
A list of available variables is here.