]> git.phdru.name Git - xsetbg.git/blob - xsetbg-dbus-client.py
Rename db_file to xsetbg_db_path
[xsetbg.git] / xsetbg-dbus-client.py
1 #!/usr/bin/env python
2 """XSetBg DBus client
3
4 """
5
6 __author__ = "Oleg Broytman <phd@phdru.name>"
7 __copyright__ = "Copyright (C) 2000-2012 PhiloSoft Design"
8 __license__ = "GNU GPL"
9
10
11 import sys
12 import dbus
13
14 def main():
15     try:
16         command = sys.argv[1]
17     except IndexError:
18         sys.exit('Usage: %s command' % sys.argv[0])
19
20     bus = dbus.SessionBus()
21     remote_object = bus.get_object("name.phdru.XSetBg", "/XSetBg")
22     iface = dbus.Interface(remote_object, "name.phdru.XSetBg")
23
24     getattr(iface, command)()
25
26 if __name__ == '__main__':
27     main()