another commit

This commit is contained in:
2026-03-21 14:15:17 +00:00
parent 9a39cc17b0
commit c52b7c16f2
4 changed files with 192 additions and 22 deletions
+28 -8
View File
@@ -1,10 +1,30 @@
use ratatui::backend::CrosstermBackend;
use ratatui::Terminal;
use std::io::{stdout, Write};
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,
fn main() {
let backend = CrosstermBackend::new(stdout());
let mut terminal = Terminal::new(backend).unwrap();
//todo: setup moonraker interface
//todo: setup custom klipper 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(())
}