You are not logged in.
I'm trying to pick up Pidgin im message in Awesome VM. The following python example from Pidgin web site works fine:
#!/usr/bin/env python
def my_func(account, sender, message, conversation, flags):
print(sender, "said:", message)
from pydbus import SessionBus
from gi.repository import GObject
bus = SessionBus()
purple = bus.get("im.pidgin.purple.PurpleService", "/im/pidgin/purple/PurpleObject")
purple.ReceivedImMsg.connect(my_func)
GObject.MainLoop().run()...but I can't find any good example in Awesome VM. Filling out the following three methods should do the trick, but I can't figure out how...
dbus.request_name("session", "im.pidgin.purple.PurpleService")
dbus.add_match("session", "???")
dbus.connect_signal("???",
function(...)
-- do something
end)Last edited by raspine (2016-03-06 16:27:12)
Offline
I finally got it working:
dbus.request_name("session", "im.pidgin.purple.PurpleService")
dbus.add_match("session", "interface='im.pidgin.purple.PurpleInterface', member='ReceivedImMsg'")
dbus.connect_signal("im.pidgin.purple.PurpleInterface",
function(...)
-- do something
end)Last edited by raspine (2016-03-06 16:27:40)
Offline