All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
25 lines
570 B
Rust
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();
|
|
}
|