Skip to main content

sonos_cli/tui/
mod.rs

1//! Interactive TUI for controlling Sonos speakers.
2//!
3//! Launched when `sonos` is run without arguments in a terminal.
4
5mod app;
6mod event;
7mod handlers;
8pub mod hooks;
9mod screens;
10mod theme;
11mod ui;
12mod widgets;
13
14pub use app::App;
15
16use crate::config::Config;
17use anyhow::Result;
18
19/// Launch the interactive TUI. Blocks until the user quits.
20pub fn run(config: Config) -> Result<()> {
21    let theme = theme::Theme::from_name(&config.theme);
22    let app = App::new(config, theme)?;
23    event::run_event_loop(app)
24}