Files
Klipper-tui/src/main.rs
T

31 lines
642 B
Rust
Raw Normal View History

2026-03-21 14:15:17 +00:00
use std::io;
use std::error::Error;
use std::time::Duration;
use clap::Parser;
mod app;
mod ui;
mod crossterm;
use crate::{
app::App,
ui::ui,
};
#[derive(Debug, Parser)]
struct Cli {
/// time in ms between two ticks.
#[arg(short, long, default_value_t = 200)]
tick_rate: u64,
/// whether unicode symbols are used to improve the overall look of the app
#[arg(short, long, default_value_t = true)]
unicode: bool,
}
fn main() -> Result<(), Box<dyn Error>> {
let cli = Cli::Parse();
let tick_rate = Duration::from_millis(cli.tick_rate);
crate::crossterm::run(tick_rate, cli.unicode)?;
Ok(())
2026-03-21 12:35:22 +00:00
}