#tray #tokio #dbusmenu #statusnotifieritem

system-tray

Async StatusNotifierItem and DBusMenu client for custom tray implementations

3 unstable releases

0.2.0 Mar 29, 2024
0.1.5 Jan 27, 2024
0.1.4 Aug 13, 2023

#218 in GUI

Download history 21/week @ 2024-01-01 18/week @ 2024-01-08 33/week @ 2024-01-15 41/week @ 2024-01-22 59/week @ 2024-01-29 79/week @ 2024-02-05 86/week @ 2024-02-12 73/week @ 2024-02-19 97/week @ 2024-02-26 93/week @ 2024-03-04 79/week @ 2024-03-11 141/week @ 2024-03-18 318/week @ 2024-03-25 155/week @ 2024-04-01 102/week @ 2024-04-08 51/week @ 2024-04-15

635 downloads per month
Used in ironbar

MIT license

51KB
931 lines

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("my_app-1234").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...
    }
}

Dependencies

~14–28MB
~412K SLoC