Skip to content

Instantly share code, notes, and snippets.

@cordarei
Created March 4, 2013 07:06
Show Gist options
  • Select an option

  • Save cordarei/5080554 to your computer and use it in GitHub Desktop.

Select an option

Save cordarei/5080554 to your computer and use it in GitHub Desktop.
testing to see where (which workspace) the dbus notifications show up
#!/usr/bin/env python
import dbus
import time
bus = dbus.SessionBus()
obj = bus.get_object("org.freedesktop.Notifications",
"/org/freedesktop/Notifications")
ni = dbus.Interface(obj, "org.freedesktop.Notifications")
msgid = ni.Notify("Test DBus Notification",
0,
'',
"Test Notify",
"message?",
"",
{},
2000)
time.sleep(3)
msgid = ni.Notify("Test DBus Notification",
msgid,
'',
"Test Notify",
"where does this message appear?",
"",
{},
0)
@cordarei

cordarei commented Mar 4, 2013

Copy link
Copy Markdown
Author

the answer is, it's controlled by the notification server (probably)

on xfce at least notifications show up on every workspace, even if you change workspaces and the notification is replacing an earlier one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment