Stray
Stray is a minimal SystemNotifierWatcher implementation which goal is to provide a minimalistic API to access tray icons and menu.
Examples
Start the system tray and listen for changes
use ;
use StreamExt;
use NotifierItemMessage;
use NotifierItemCommand;
async
Send menu activation request to the system tray
// Assuming we stored our menu items in some UI state we can send menu item activation request:
use NotifierItemCommand;
ui_tx.clone.try_send.unwrap;
Gtk example
For a detailed, real life example, you can take a look at the gtk-tray.
git clone git@github.com:oknozor/stray.git
cd stray/gtk-tray
cargo run