hyprcorrect_ui/lib.rs
1//! The hyprcorrect GUI: the egui preferences window and (later, M4)
2//! the keyboard-navigable suggestion popup.
3//!
4//! All UI in this crate is platform-independent egui — Linux and
5//! macOS share the same code. The `run_preferences` entry handles a
6//! best-effort singleton lock so double-clicking "Open Preferences…"
7//! in the tray doesn't open two windows.
8//!
9//! See the "Configuration & GUI" section of `DESIGN.md`.
10
11mod apps;
12#[cfg(target_os = "linux")]
13pub mod autostart;
14mod docker;
15pub mod icon;
16mod prefs;
17mod review;
18
19/// Open the preferences window. Blocks until the user closes it.
20///
21/// If another prefs window is already open, this returns immediately
22/// after best-effort asking the existing one to focus itself.
23pub fn run_preferences() {
24 prefs::run();
25}
26
27/// Open the review popup for the daemon's pending review request.
28/// Reads the request from the runtime file, shows the popup, and
29/// signals the daemon on exit so the apply happens against the
30/// originating window. Blocks until the user closes the popup.
31pub fn run_review() {
32 review::run();
33}