system-tray

Crates.iosystem-tray
lib.rssystem-tray
version0.3.0
sourcesrc
created_at2023-08-13 13:42:54.109917
updated_at2024-11-08 01:29:38.082794
descriptionAsync `StatusNotifierItem` and `DBusMenu` client for custom tray implementations.
homepage
repositoryhttps://github.com/jakestanger/system-tray
max_upload_size
id943321
size70,268
Jake Stanger (JakeStanger)

documentation

README

System Tray

An async implementation of the StatusNotifierItem and DbusMenu protocols for building system trays.

Requires Tokio.

Example

use system_tray::client::Client;

#[tokio::main]
async fn main() {
    let client = Client::new().await.unwrap();
    let mut tray_rx = client.subscribe();

    let initial_items = client.items();
    
    // do something with initial items...
    
    while let Ok(ev) = tray_rx.recv().await {
        println!("{ev:?}"); // do something with event...
    }
}
Commit count: 17

cargo fmt