diff options
author | Aram Drevekenin <aram@poor.dev> | 2024-03-18 09:19:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-18 09:19:58 +0100 |
commit | ee16a4b8c347a81878389fd4f90144c2c6357f41 (patch) | |
tree | bf8675d57499b6278e8c89b84c8141969cc2ce3f /zellij-tile/src | |
parent | 12daac3b5445e4281cf5c1810be0ebdb257085c1 (diff) |
feat(plugins): session manager cwd and new filepicker (#3200)
* prototype
* folder selection ui in session manager
* overhaul strider
* scan folder host command
* get strider to work from the cli and some cli pipe fixes
* some ux improvements to strider
* improve strider's ui
* make strider ui responsive
* make session-manager new ui parts responsive
* fix tests
* style(fmt): rustfmt
Diffstat (limited to 'zellij-tile/src')
-rw-r--r-- | zellij-tile/src/shim.rs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/zellij-tile/src/shim.rs b/zellij-tile/src/shim.rs index 064a53d85..2d04a7b6a 100644 --- a/zellij-tile/src/shim.rs +++ b/zellij-tile/src/shim.rs @@ -766,6 +766,24 @@ where unsafe { host_run_plugin_command() }; } +/// Scan a specific folder in the host filesystem (this is a hack around some WASI runtime performance +/// issues), will not follow symlinks +pub fn scan_host_folder<S: AsRef<Path>>(folder_to_scan: &S) { + let plugin_command = PluginCommand::ScanHostFolder(folder_to_scan.as_ref().to_path_buf()); + let protobuf_plugin_command: ProtobufPluginCommand = plugin_command.try_into().unwrap(); + object_to_stdout(&protobuf_plugin_command.encode_to_vec()); + unsafe { host_run_plugin_command() }; +} + +/// Start watching the host folder for filesystem changes (Note: somewhat unstable at the time +/// being) +pub fn watch_filesystem() { + let plugin_command = PluginCommand::WatchFilesystem; + 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)] |