Sunday, November 11, 2007

Skype dbus interface.

I find useful to have im programs running in the background, and to focus them with some kind of keybinding. I I wrote this little python script to show the skype window:

#!/usr/bin/env python
import dbus

remote_bus = dbus.SessionBus()

out_connection = remote_bus.get_object('com.Skype.API', '/com/Skype')

out_connection.Invoke('NAME mySkypeController')
out_connection.Invoke('PROTOCOL 5')
out_connection.Invoke('FOCUS')

Then in fvwm add something like:
DestroyFunc showSkype
AddToFunc showSkype
+ I Next ("skype") close
+ I none ("skype") exec exec /usr/local/sbin/showskype.py
Post a Comment