bumpin tengri
Some checks failed
/ build (push) Has been cancelled

This commit is contained in:
okay stopped screaming 2026-03-20 02:49:24 +02:00
parent 54f0a95f3a
commit 0577309b19
4 changed files with 92 additions and 69 deletions

View file

@ -20,6 +20,12 @@ pub(crate) use ::midly::{Smf, TrackEventKind, MidiMessage, Error as MidiError, n
pub extern crate tengri;
pub(crate) use tengri::{
*,
lang::*,
play::*,
sing::*,
time::*,
draw::*,
tui::*,
crossterm::event::{Event, KeyEvent},
ratatui::{
self,
@ -62,8 +68,26 @@ pub(crate) use ConnectStatus::*;
/// Command-line entrypoint.
#[cfg(feature = "cli")] pub fn main () -> Usually<()> {
use clap::Parser;
Cli::parse().run()
Config::watch(|config|{
Exit::enter(|exit|{
Jack::connect("tek", |jack|{
let state = Arc::new(RwLock::new(App {
color: ItemTheme::random(),
config: Config::init(),
dialog: Dialog::welcome(),
jack: jack.clone(),
mode: ":menu",
project: Arrangement::new(&jack, &Clock::new(&jack, 51)),
..Default::default()
}));
// TODO: Sync these timings with main clock, so that things
// "accidentally" fall on the beat in overload conditions.
let keyboard = run_tui_in(&exit, &state, Duration::from_millis(100))?;
let terminal = run_tui_out(&exit, &state, Duration::from_millis(10))?;
(keyboard, terminal)
})
})
})
}
/// Create a new application from a backend, project, config, and mode