cleanup unused edns

This commit is contained in:
🪞👃🪞 2025-04-27 17:57:36 +03:00
parent a2f27dac90
commit 26b7a9390e
20 changed files with 14 additions and 14 deletions

View file

@ -14,7 +14,7 @@ pub fn handle_arranger (app: &mut Tek, input: &TuiIn) -> Perhaps<bool> {
}
}
// Handle from root keymap
if let Some(command) = SourceIter(include_str!("../../../config/arranger_keys.edn"))
if let Some(command) = SourceIter(include_str!("../../../config/keys_arranger.edn"))
.command::<_, TekCommand, _>(app, input)
{
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
if let Some(command) = match app.selected() {
Selection::Clip(_, _) => SourceIter(include_str!("../../../config/arranger_keys_clip.edn")),
Selection::Track(_) => SourceIter(include_str!("../../../config/arranger_keys_track.edn")),
Selection::Scene(_) => SourceIter(include_str!("../../../config/arranger_keys_scene.edn")),
Selection::Mix => SourceIter(include_str!("../../../config/arranger_keys_mix.edn")),
Selection::Clip(_, _) => SourceIter(include_str!("../../../config/keys_arranger_clip.edn")),
Selection::Track(_) => SourceIter(include_str!("../../../config/keys_arranger_track.edn")),
Selection::Scene(_) => SourceIter(include_str!("../../../config/keys_arranger_scene.edn")),
Selection::Mix => SourceIter(include_str!("../../../config/keys_arranger_mix.edn")),
}.command::<_, TekCommand, _>(app, input) {
if let Some(undo) = command.execute(app)? {
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) {
return Ok(Some(true))
}
if let Some(command) = SourceIter(include_str!("../../../config/sequencer_keys.edn"))
if let Some(command) = SourceIter(include_str!("../../../config/keys_sequencer.edn"))
.command::<_, TekCommand, _>(app, input)
{
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) {
return Ok(Some(true))
}
if let Some(command) = SourceIter(include_str!("../../../config/groovebox_keys.edn"))
if let Some(command) = SourceIter(include_str!("../../../config/keys_groovebox.edn"))
.command::<_, TekCommand, _>(app, input)
{
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> {
let sampler = app.tracks[0].sampler_mut(0).expect("no sampler");
if let Some(command) = SourceIter(include_str!("../../../config/sampler_keys.edn"))
if let Some(command) = SourceIter(include_str!("../../../config/keys_sampler.edn"))
.command::<_, SamplerCommand, _>(sampler, input)
{
if let Some(undo) = command.execute(sampler)? {

View file

@ -868,7 +868,7 @@ impl Modal {
Bsp::s(Tui::bold(true, "tek!"), Bsp::s("", Map::south(1, options, option)))
}
fn view_help (&self) -> impl Content<TuiOut> {
let bindings = ||TokenIter::new(include_str!("../../../config/groovebox_keys.edn"))
let bindings = ||TokenIter::new(include_str!("../../../config/keys_groovebox.edn"))
.filter_map(|x|if let Value::Exp(_, iter)=x.value{
Some(iter)
} else {

View file

@ -106,11 +106,11 @@ impl Cli {
color: ItemTheme::random(),
clock: Clock::new(jack, self.bpm)?,
view: SourceIter(match mode {
LaunchMode::Clock => include_str!("../../config/transport.edn"),
LaunchMode::Sequencer => include_str!("../../config/sequencer.edn"),
LaunchMode::Groovebox => include_str!("../../config/groovebox.edn"),
LaunchMode::Arranger { .. } => include_str!("../../config/arranger.edn"),
LaunchMode::Sampler => include_str!("../../config/sampler.edn"),
LaunchMode::Clock => include_str!("../../config/view_transport.edn"),
LaunchMode::Sequencer => include_str!("../../config/view_sequencer.edn"),
LaunchMode::Groovebox => include_str!("../../config/view_groovebox.edn"),
LaunchMode::Arranger { .. } => include_str!("../../config/view_arranger.edn"),
LaunchMode::Sampler => include_str!("../../config/view_sampler.edn"),
_ => todo!("{mode:?}"),
}),
pool: match mode {