thesandwi.ch/thecockpit/src/main.rs
Isaac Mills 21d93f7073
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Initial cockpit commit
2025-07-18 16:42:04 -06:00

25 lines
570 B
Rust

use std::time::Duration;
use ratatui::crossterm::event;
use thecockpit::app::App;
fn main() {
let mut terminal = ratatui::init();
let mut app = App::default();
loop {
terminal.draw(|frame| app.draw(frame));
if event::poll(Duration::from_secs(0)).unwrap() {
match event::read().unwrap() {
event::Event::Key(event::KeyEvent {
code: event::KeyCode::Char('q'),
..
}) => break,
_ => {}
}
}
}
ratatui::restore();
}