guake-guake/guake/guake_toggle.py
Gaetan Semet 150a3a77f9 add guake-toggle command
to call dbus message directly

Signed-off-by: Gaetan Semet <gaetan@xeberon.net>
2018-06-06 07:28:34 +02:00

11 lines
312 B
Python

def toggle_guake_by_dbus():
import dbus
try:
bus = dbus.SessionBus()
remote_object = bus.get_object('org.guake3.RemoteControl', '/org/guake3/RemoteControl')
print("Sending 'toggle' message to Guake3")
remote_object.show_hide()
except dbus.DBusException:
pass