diff --git a/Makefile.toml b/Makefile.toml index 8856854c..03c1eef7 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -15,6 +15,37 @@ dependencies = ["pre-test"] [tasks.post-test] env = { "SKIP_TEST" = false } +[tasks.run] +workspace = false +dependencies = ["build"] +run_task = { name = ["patch-layouts", "run-zellij"] } + +## Need to walk the layout YAML and patch the plugin fields! +[tasks.patch-layouts] +script_runner = "@rust" +script = ''' +//! ```cargo +//! [dependencies] +//! yaml-rust = "0.4" +//! ``` +use std::{fs, env, error::Error, path::Path}; +use yaml_rust::{YamlLoader, YamlEmitter}; + +fn main() -> Result<(), Box> { + let root = env::var("CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY")?; + let layout_path = Path::new(&root).join("assets/layouts"); + for layout in fs::read_dir(layout_path)? { + let yaml = fs::read_to_string(layout?.path())?; + let yaml = YamlLoader::load_from_str(&yaml)?[0]; + } + Ok(()) +} +''' + +[tasks.run-zellij] + + + # Running Zellij # Change the build to always use the assets, but not delete them by default diff --git a/assets/plugins/status-bar.wasm b/assets/plugins/status-bar.wasm index 7a5b0e51..0a72d5c1 100644 Binary files a/assets/plugins/status-bar.wasm and b/assets/plugins/status-bar.wasm differ diff --git a/assets/plugins/strider.wasm b/assets/plugins/strider.wasm index ec479353..d0dd9278 100644 Binary files a/assets/plugins/strider.wasm and b/assets/plugins/strider.wasm differ diff --git a/assets/plugins/tab-bar.wasm b/assets/plugins/tab-bar.wasm index e895d7ea..d0b32e02 100644 Binary files a/assets/plugins/tab-bar.wasm and b/assets/plugins/tab-bar.wasm differ