diff --git a/src/clients/system_tray.rs b/src/clients/system_tray.rs index a511280..d8915fc 100644 --- a/src/clients/system_tray.rs +++ b/src/clients/system_tray.rs @@ -11,6 +11,7 @@ use stray::StatusNotifierWatcher; use tokio::spawn; use tokio::sync::{broadcast, mpsc}; use tracing::{debug, error, trace}; +use crate::unique_id::get_unique_usize; type Tray = BTreeMap, Option)>; @@ -24,11 +25,13 @@ pub struct TrayEventReceiver { impl TrayEventReceiver { async fn new() -> stray::error::Result { + let id = format!("ironbar-{}", get_unique_usize()); + let (tx, rx) = mpsc::channel(16); let (b_tx, b_rx) = broadcast::channel(16); let tray = StatusNotifierWatcher::new(rx).await?; - let mut host = tray.create_notifier_host("ironbar").await?; + let mut host = tray.create_notifier_host(&id).await?; let tray = Arc::new(Mutex::new(BTreeMap::new()));