Initial cockpit commit
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
537774f120
commit
21d93f7073
17 changed files with 177 additions and 22 deletions
25
thecockpit/src/main.rs
Normal file
25
thecockpit/src/main.rs
Normal file
|
@ -0,0 +1,25 @@
|
|||
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();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue