summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tray.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tray.rs b/src/tray.rs
index 1caeb3a..b0e1b74 100644
--- a/src/tray.rs
+++ b/src/tray.rs
@@ -274,6 +274,18 @@ async fn run(
let dbus = zbus::fdo::DBusProxy::new(&conn).await?;
+ let host_name = format!("org.kde.StatusNotifierHost-i3bar-mango-{}", std::process::id());
+ let watcher_proxy = zbus::Proxy::new(
+ &conn,
+ "org.kde.StatusNotifierWatcher",
+ "/StatusNotifierWatcher",
+ "org.kde.StatusNotifierWatcher",
+ )
+ .await?;
+ watcher_proxy
+ .call::<_, _, ()>("RegisterStatusNotifierHost", &host_name)
+ .await?;
+
let owner_stream = dbus.receive_name_owner_changed().await?;
let tx = events_tx.clone();
conn.executor()