2 # -*- coding: utf-8 -*-
9 for n
in range(1, len(sys
.argv
) - 1, 2):
10 args
[sys
.argv
[n
]] = sys
.argv
[n
+ 1]
14 bus
= dbus
.SessionBus()
16 obj
= bus
.get_object("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject")
17 pidgin
= dbus
.Interface(obj
, "im.pidgin.purple.PurpleInterface")
19 current
= pidgin
.PurpleSavedstatusGetCurrent()
20 status_type
= pidgin
.PurpleSavedstatusGetType(current
)
21 saved
= pidgin
.PurpleSavedstatusNew("", status_type
)
22 pidgin
.PurpleSavedstatusSetMessage(saved
, "♪ %s - %s" % (args
["artist"], args
["title"]))
23 pidgin
.PurpleSavedstatusActivate(saved
)