Skip to main content

Module ui

Module ui 

Source
Expand description

Native egui desktop UI. See plans/native-ui.md for the full design (tabs, tray icon, notifications, autostart).

This module is gated behind the ui cargo feature so headless installs and the systemd / launchd service path don’t pull in egui / eframe / tray-icon / notify-rust + their system libs.

Modules§

app
The eframe App impl. Holds shared state (the same Arc<Mutex<…>> handles the runtime loops use) and dispatches to per-tab renderers.
notifier
OS-native desktop notifications gated on per-event toggles.
tab
The five tabs the UI exposes. Pure data + tiny enum impl so the contract is testable without egui in scope.
tabs
Per-tab modules. Each module exposes a pure-data view model (testable without egui) and a thin render function that draws the view model into an egui::Ui.
tray
Tray icon state + menu factory (pure data). The per-OS tray construction lives in super::tray_host (ksni on Linux, tray-icon on macOS / Windows); this module keeps the logic that decides what the tray looks like (icon variant, menu labels, ARGB byte order) free of any platform types so it stays unit-testable.
tray_host
Cross-platform system-tray host.

Functions§

run
Entry point for studio-worker ui. Loads config, spawns the four background loops on the calling tokio runtime, then hands the main thread to eframe (which it owns for the lifetime of the window).