aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-tile
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2024-12-01 11:06:44 +0100
committerGitHub <noreply@github.com>2024-12-01 11:06:44 +0100
commit0c21eae6646d511944a85121433b9443a96c73aa (patch)
treea5a091a4df73920dfbb03e2abfb1cb770ffbf44b /zellij-tile
parentdocs(changelog): ui component padding (diff)
downloadsl0ppij-0c21eae6646d511944a85121433b9443a96c73aa.tar.gz
sl0ppij-0c21eae6646d511944a85121433b9443a96c73aa.tar.xz
sl0ppij-0c21eae6646d511944a85121433b9443a96c73aa.zip
feat(plugins): allow changing the plugin's `/host` folder (under a new permission) (#3827)
* working without notifying plugins * permissions and events * cleanups and formatting * style(fmt): rustfmt
Diffstat (limited to 'zellij-tile')
-rw-r--r--zellij-tile/src/shim.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/zellij-tile/src/shim.rs b/zellij-tile/src/shim.rs
index bc1b4844..1e116f13 100644
--- a/zellij-tile/src/shim.rs
+++ b/zellij-tile/src/shim.rs
@@ -1128,6 +1128,13 @@ pub fn rebind_keys(
unsafe { host_run_plugin_command() };
}
+pub fn change_host_folder(new_host_folder: PathBuf) {
+ let plugin_command = PluginCommand::ChangeHostFolder(new_host_folder);
+ let protobuf_plugin_command: ProtobufPluginCommand = plugin_command.try_into().unwrap();
+ object_to_stdout(&protobuf_plugin_command.encode_to_vec());
+ unsafe { host_run_plugin_command() };
+}
+
// Utility Functions
#[allow(unused)]