Skip to main content

Module tray

Module tray 

Source
Expand description

System tray (ksni-based) for the hyprcorrect daemon.

Publishes a StatusNotifierItem with a small menu: Pause/Resume, Open Preferences…, Quit. Menu activations arrive on the returned channel. The pause state is shared with the daemon via an Arc<AtomicBool> — the tray reads it live to choose its icon, label, and SNI status — and TrayHandle::refresh pushes a property-change so SNI hosts pick up the new state immediately.

Structs§

IconPixmap
A pre-rasterized icon pixmap to publish via SNI. The data is ARGB32 in network (big-endian) byte order — that’s the format the StatusNotifierItem spec requires.
TrayHandle
A live handle to the running tray. Holding it keeps the SNI service registered; dropping it tears it down.

Enums§

TrayError
An error starting the tray.
TrayEvent
A menu event from the tray.

Functions§

start
Start the tray. Returns a TrayHandle (the caller must hold it for the life of the daemon) and a receiver of menu activations.