Files
Klipper-tui/src/main.rs
T
2026-03-21 15:11:54 -07:00

31 lines
635 B
Rust

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(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(())
}