-
-
Save SergKolo/4bc7856ddfbc1fb4ff56732e60dd19db to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import dbus | |
def get_dbus(OBJ,PATH,INTERFACE,METHOD): | |
# This basically works the same as | |
# dbus-send or qdbus. Just give it | |
# all the info, and it will spit out output | |
bus = dbus.SessionBus() | |
proxy = bus.get_object(OBJ,PATH) | |
method = proxy.get_dbus_method(METHOD,INTERFACE) | |
return method() | |
windows = get_dbus( 'org.ayatana.bamf' , '/org/ayatana/bamf/matcher' , 'org.ayatana.bamf.matcher','WindowPaths' ) | |
for window in windows: | |
print get_dbus( 'org.ayatana.bamf', window, 'org.ayatana.bamf.view','Name' ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment