diff options
| author | Brooks J Rady <b.j.rady@gmail.com> | 2021-03-30 12:49:42 +0100 |
|---|---|---|
| committer | Brooks J Rady <b.j.rady@gmail.com> | 2021-03-30 12:49:42 +0100 |
| commit | f4f6e3c66bbaee91321c293df1beb5c5d6e4e441 (patch) | |
| tree | d02315d6415842728a30b1fd6117b9a4abe8581c | |
| parent | Start porting to cargo-make (diff) | |
| download | sl0ppij-f4f6e3c66bbaee91321c293df1beb5c5d6e4e441.tar.gz sl0ppij-f4f6e3c66bbaee91321c293df1beb5c5d6e4e441.tar.xz sl0ppij-f4f6e3c66bbaee91321c293df1beb5c5d6e4e441.zip | |
Start working on layout patching
| -rw-r--r-- | Makefile.toml | 31 | ||||
| -rw-r--r-- | assets/plugins/status-bar.wasm | bin | 418654 -> 442368 bytes | |||
| -rw-r--r-- | assets/plugins/strider.wasm | bin | 515536 -> 551589 bytes | |||
| -rw-r--r-- | assets/plugins/tab-bar.wasm | bin | 388133 -> 439000 bytes |
4 files changed, 31 insertions, 0 deletions
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<dyn Error>> { + 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 Binary files differindex 7a5b0e51..0a72d5c1 100644 --- a/assets/plugins/status-bar.wasm +++ b/assets/plugins/status-bar.wasm diff --git a/assets/plugins/strider.wasm b/assets/plugins/strider.wasm Binary files differindex ec479353..d0dd9278 100644 --- a/assets/plugins/strider.wasm +++ b/assets/plugins/strider.wasm diff --git a/assets/plugins/tab-bar.wasm b/assets/plugins/tab-bar.wasm Binary files differindex e895d7ea..d0b32e02 100644 --- a/assets/plugins/tab-bar.wasm +++ b/assets/plugins/tab-bar.wasm |
