From 18e5670d90c1277f09705d4c04585078ebff1bf6 Mon Sep 17 00:00:00 2001 From: Gabriele Musco Date: Sun, 12 Jan 2025 10:05:51 +0100 Subject: [PATCH] feat: launch options for plugins --- src/ui/app.rs | 14 ++++++++++---- src/ui/plugins/mod.rs | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/ui/app.rs b/src/ui/app.rs index 77edeeb..acaac50 100644 --- a/src/ui/app.rs +++ b/src/ui/app.rs @@ -256,10 +256,16 @@ impl App { ); None } else { - Some(format!( - "'{}'", - cp.plugin.executable().unwrap().to_string_lossy() - )) + Some(format!("'{}'", { + let mut cmd_parts = vec![cp + .plugin + .executable() + .unwrap() + .to_string_lossy() + .to_string()]; + cmd_parts.extend(cp.plugin.luanch_opts.clone().unwrap_or_default()); + cmd_parts.join(" ") + })) } } else { None diff --git a/src/ui/plugins/mod.rs b/src/ui/plugins/mod.rs index c900fd6..ec8a9e3 100644 --- a/src/ui/plugins/mod.rs +++ b/src/ui/plugins/mod.rs @@ -27,6 +27,8 @@ pub struct Plugin { pub exec_url: Option, /// either one of exec_url or exec_path must be provided pub exec_path: Option, + /// options and arguments that should be passed to the plugin executable + pub luanch_opts: Option>, } impl Plugin {