Sunday, July 17, 2011

Skype Urgent Hint

The thing is to get the Skype set the urgency hint when there's something going on. This is very handy if you or your window manager can take benefit of it.

Obviously Skype can't do it (at least the version 2.2.0.35). Only possible hook I've found is configuring a custom script to be run on particular event. This can be configured in "Options" dialog and "Notifications" tab. I've did this for "First Chat Message Received" and "Chat Message Received" events. The script is really executed and no arguments are passed, hence there is no way to find out which window is actually "urgent".

The script will find all windows of skype and mark all of them as urgent.

  • xdotool - command-line X11 automation tool
  • seturgent - nice simple program just doing its job (I was already decided to write something similar because I couldn't find it, but eventually I did and it works well)
~/bin/skype-urgent
#!/bin/bash

ids=$(xdotool search --class 'skype')

for id in $ids; do
    seturgent "$id"
done