mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
collect edns under config/
This commit is contained in:
parent
efd182f302
commit
a2f27dac90
30 changed files with 19 additions and 19 deletions
|
|
@ -14,7 +14,7 @@ pub fn handle_arranger (app: &mut Tek, input: &TuiIn) -> Perhaps<bool> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Handle from root keymap
|
// Handle from root keymap
|
||||||
if let Some(command) = SourceIter(include_str!("../edn/arranger_keys.edn"))
|
if let Some(command) = SourceIter(include_str!("../../../config/arranger_keys.edn"))
|
||||||
.command::<_, TekCommand, _>(app, input)
|
.command::<_, TekCommand, _>(app, input)
|
||||||
{
|
{
|
||||||
if let Some(undo) = command.execute(app)? { app.history.push(undo); }
|
if let Some(undo) = command.execute(app)? { app.history.push(undo); }
|
||||||
|
|
@ -22,10 +22,10 @@ pub fn handle_arranger (app: &mut Tek, input: &TuiIn) -> Perhaps<bool> {
|
||||||
}
|
}
|
||||||
// Handle from selection-dependent keymaps
|
// Handle from selection-dependent keymaps
|
||||||
if let Some(command) = match app.selected() {
|
if let Some(command) = match app.selected() {
|
||||||
Selection::Clip(_, _) => SourceIter(include_str!("../edn/arranger_keys_clip.edn")),
|
Selection::Clip(_, _) => SourceIter(include_str!("../../../config/arranger_keys_clip.edn")),
|
||||||
Selection::Track(_) => SourceIter(include_str!("../edn/arranger_keys_track.edn")),
|
Selection::Track(_) => SourceIter(include_str!("../../../config/arranger_keys_track.edn")),
|
||||||
Selection::Scene(_) => SourceIter(include_str!("../edn/arranger_keys_scene.edn")),
|
Selection::Scene(_) => SourceIter(include_str!("../../../config/arranger_keys_scene.edn")),
|
||||||
Selection::Mix => SourceIter(include_str!("../edn/arranger_keys_mix.edn")),
|
Selection::Mix => SourceIter(include_str!("../../../config/arranger_keys_mix.edn")),
|
||||||
}.command::<_, TekCommand, _>(app, input) {
|
}.command::<_, TekCommand, _>(app, input) {
|
||||||
if let Some(undo) = command.execute(app)? {
|
if let Some(undo) = command.execute(app)? {
|
||||||
app.history.push(undo);
|
app.history.push(undo);
|
||||||
|
|
@ -39,7 +39,7 @@ pub fn handle_sequencer (app: &mut Tek, input: &TuiIn) -> Perhaps<bool> {
|
||||||
if app.editor.handle(input)? == Some(true) {
|
if app.editor.handle(input)? == Some(true) {
|
||||||
return Ok(Some(true))
|
return Ok(Some(true))
|
||||||
}
|
}
|
||||||
if let Some(command) = SourceIter(include_str!("../edn/sequencer_keys.edn"))
|
if let Some(command) = SourceIter(include_str!("../../../config/sequencer_keys.edn"))
|
||||||
.command::<_, TekCommand, _>(app, input)
|
.command::<_, TekCommand, _>(app, input)
|
||||||
{
|
{
|
||||||
if let Some(undo) = command.execute(app)? {
|
if let Some(undo) = command.execute(app)? {
|
||||||
|
|
@ -54,7 +54,7 @@ pub fn handle_groovebox (app: &mut Tek, input: &TuiIn) -> Perhaps<bool> {
|
||||||
if app.editor.handle(input)? == Some(true) {
|
if app.editor.handle(input)? == Some(true) {
|
||||||
return Ok(Some(true))
|
return Ok(Some(true))
|
||||||
}
|
}
|
||||||
if let Some(command) = SourceIter(include_str!("../edn/groovebox_keys.edn"))
|
if let Some(command) = SourceIter(include_str!("../../../config/groovebox_keys.edn"))
|
||||||
.command::<_, TekCommand, _>(app, input)
|
.command::<_, TekCommand, _>(app, input)
|
||||||
{
|
{
|
||||||
if let Some(undo) = command.execute(app)? {
|
if let Some(undo) = command.execute(app)? {
|
||||||
|
|
@ -67,7 +67,7 @@ pub fn handle_groovebox (app: &mut Tek, input: &TuiIn) -> Perhaps<bool> {
|
||||||
|
|
||||||
pub fn handle_sampler (app: &mut Tek, input: &TuiIn) -> Perhaps<bool> {
|
pub fn handle_sampler (app: &mut Tek, input: &TuiIn) -> Perhaps<bool> {
|
||||||
let sampler = app.tracks[0].sampler_mut(0).expect("no sampler");
|
let sampler = app.tracks[0].sampler_mut(0).expect("no sampler");
|
||||||
if let Some(command) = SourceIter(include_str!("../edn/sampler_keys.edn"))
|
if let Some(command) = SourceIter(include_str!("../../../config/sampler_keys.edn"))
|
||||||
.command::<_, SamplerCommand, _>(sampler, input)
|
.command::<_, SamplerCommand, _>(sampler, input)
|
||||||
{
|
{
|
||||||
if let Some(undo) = command.execute(sampler)? {
|
if let Some(undo) = command.execute(sampler)? {
|
||||||
|
|
|
||||||
|
|
@ -868,7 +868,7 @@ impl Modal {
|
||||||
Bsp::s(Tui::bold(true, "tek!"), Bsp::s("", Map::south(1, options, option)))
|
Bsp::s(Tui::bold(true, "tek!"), Bsp::s("", Map::south(1, options, option)))
|
||||||
}
|
}
|
||||||
fn view_help (&self) -> impl Content<TuiOut> {
|
fn view_help (&self) -> impl Content<TuiOut> {
|
||||||
let bindings = ||TokenIter::new(include_str!("../edn/groovebox_keys.edn"))
|
let bindings = ||TokenIter::new(include_str!("../../../config/groovebox_keys.edn"))
|
||||||
.filter_map(|x|if let Value::Exp(_, iter)=x.value{
|
.filter_map(|x|if let Value::Exp(_, iter)=x.value{
|
||||||
Some(iter)
|
Some(iter)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -106,11 +106,11 @@ impl Cli {
|
||||||
color: ItemTheme::random(),
|
color: ItemTheme::random(),
|
||||||
clock: Clock::new(jack, self.bpm)?,
|
clock: Clock::new(jack, self.bpm)?,
|
||||||
view: SourceIter(match mode {
|
view: SourceIter(match mode {
|
||||||
LaunchMode::Clock => include_str!("./edn/transport.edn"),
|
LaunchMode::Clock => include_str!("../../config/transport.edn"),
|
||||||
LaunchMode::Sequencer => include_str!("./edn/sequencer.edn"),
|
LaunchMode::Sequencer => include_str!("../../config/sequencer.edn"),
|
||||||
LaunchMode::Groovebox => include_str!("./edn/groovebox.edn"),
|
LaunchMode::Groovebox => include_str!("../../config/groovebox.edn"),
|
||||||
LaunchMode::Arranger { .. } => include_str!("./edn/arranger.edn"),
|
LaunchMode::Arranger { .. } => include_str!("../../config/arranger.edn"),
|
||||||
LaunchMode::Sampler => include_str!("./edn/sampler.edn"),
|
LaunchMode::Sampler => include_str!("../../config/sampler.edn"),
|
||||||
_ => todo!("{mode:?}"),
|
_ => todo!("{mode:?}"),
|
||||||
}),
|
}),
|
||||||
pool: match mode {
|
pool: match mode {
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ impl Default for MidiEditor {
|
||||||
Self {
|
Self {
|
||||||
mode: PianoHorizontal::new(None),
|
mode: PianoHorizontal::new(None),
|
||||||
size: Measure::new(),
|
size: Measure::new(),
|
||||||
keys: SourceIter(include_str!("../../edn/keys_edit.edn")),
|
keys: SourceIter(include_str!("../../../../config/keys_edit.edn")),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,10 +23,10 @@ impl Default for MidiPool {
|
||||||
clips: Arc::from(RwLock::from(vec![])),
|
clips: Arc::from(RwLock::from(vec![])),
|
||||||
clip: 0.into(),
|
clip: 0.into(),
|
||||||
mode: None,
|
mode: None,
|
||||||
keys: SourceIter(include_str!("../../edn/keys_pool.edn")),
|
keys: SourceIter(include_str!("../../../../config/keys_pool.edn")),
|
||||||
keys_file: SourceIter(include_str!("../../edn/keys_pool_file.edn")),
|
keys_file: SourceIter(include_str!("../../../../config/keys_pool_file.edn")),
|
||||||
keys_rename: SourceIter(include_str!("../../edn/keys_clip_rename.edn")),
|
keys_rename: SourceIter(include_str!("../../../../config/keys_clip_rename.edn")),
|
||||||
keys_length: SourceIter(include_str!("../../edn/keys_clip_length.edn")),
|
keys_length: SourceIter(include_str!("../../../../config/keys_clip_length.edn")),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue