mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-08 04:36:45 +01:00
wip: fix one batch of errors, unlock another
This commit is contained in:
parent
a54798994b
commit
10f191282e
14 changed files with 92 additions and 28 deletions
|
|
@ -4,7 +4,6 @@ edition = "2021"
|
|||
version = "0.1.0"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.5.4", features = [ "derive" ] }
|
||||
clojure-reader = "0.1.0"
|
||||
microxdg = "0.1.2"
|
||||
|
||||
|
|
|
|||
|
|
@ -32,10 +32,12 @@ pub struct App {
|
|||
impl App {
|
||||
pub fn new () -> Usually<Self> {
|
||||
let xdg = Arc::new(XdgApp::new("tek")?);
|
||||
let first_run = crate::config::AppPaths::new(&xdg)?.should_create();
|
||||
let jack = JackClient::Inactive(Client::new("tek", ClientOptions::NO_START_SERVER)?.0);
|
||||
let first_run = AppPaths::new(&xdg)?.should_create();
|
||||
let jack = JackClient::Inactive(
|
||||
Client::new("tek", ClientOptions::NO_START_SERVER)?.0
|
||||
);
|
||||
*MODAL.lock().unwrap() = first_run.then(||{
|
||||
Exit::boxed(crate::devices::setup::SetupModal(Some(xdg.clone()), false))
|
||||
Exit::boxed(SetupModal(Some(xdg.clone()), false))
|
||||
});
|
||||
Ok(Self {
|
||||
entered: true,
|
||||
|
|
@ -95,7 +97,7 @@ render!(App |self, buf, area| {
|
|||
&self.transport,
|
||||
&self.arranger,
|
||||
&If(self.arranger.selected.is_clip(), &Split::right([
|
||||
&ChainView::vertical(&self),
|
||||
&tek_chain::ChainView::vertical(&self),
|
||||
&self.sequencer,
|
||||
]))
|
||||
]).render(buf, area)?;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//! Command line option parser.
|
||||
|
||||
use clap::{Parser, Subcommand};
|
||||
use tek_core::clap::{self, Parser, Subcommand};
|
||||
|
||||
#[derive(Debug, Parser)]
|
||||
#[command(version, about, long_about = None)]
|
||||
|
|
|
|||
|
|
@ -20,10 +20,13 @@ submod! {
|
|||
control
|
||||
edn
|
||||
help
|
||||
modal
|
||||
setup
|
||||
}
|
||||
|
||||
/// Global modal dialog
|
||||
pub static MODAL: Lazy<Arc<Mutex<Option<Box<dyn Exit>>>>> =
|
||||
Lazy::new(||Arc::new(Mutex::new(None)));
|
||||
|
||||
/// Application entrypoint.
|
||||
pub fn main () -> Usually<()> {
|
||||
run(App::from_edn(include_str!("../../../demos/project.edn"))?
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
use crate::*;
|
||||
|
||||
/// Global modal dialog
|
||||
pub static MODAL: Lazy<Arc<Mutex<Option<Box<dyn Exit>>>>> =
|
||||
Lazy::new(||Arc::new(Mutex::new(None)));
|
||||
Loading…
Add table
Add a link
Reference in a new issue