diff options
| author | Aram Drevekenin <aram@poor.dev> | 2023-05-16 12:47:18 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-16 12:47:18 +0200 |
| commit | 5fe4d60c220c872c1e77a7ddf24fec6686c28e95 (patch) | |
| tree | b6abec3006de7cd2eaecee149005d55ee4671a6b /zellij-utils | |
| parent | docs(changelog): update config file output (diff) | |
| download | sl0ppij-5fe4d60c220c872c1e77a7ddf24fec6686c28e95.tar.gz sl0ppij-5fe4d60c220c872c1e77a7ddf24fec6686c28e95.tar.xz sl0ppij-5fe4d60c220c872c1e77a7ddf24fec6686c28e95.zip | |
feat(plugins): Plugin workers and strider (#2449)
* mvp of strider fuzzy find
* improve search ui
* various refactoringz
* moar refactoring
* even more refactoring
* tests and more refactoring
* refactor: remove unused stuff
* style(fmt): rustfmt
* debug ci
* debug ci
* correct path for plugin system tests
* fix plugin system ci tests
* remove debugging statements from test
* fix plugin worker persistence
* add test for plugin worker persistence
* style(fmt): rustfmt
* final cleanups
* remove outdated comments
Diffstat (limited to 'zellij-utils')
| -rw-r--r-- | zellij-utils/Cargo.toml | 1 | ||||
| -rwxr-xr-x | zellij-utils/assets/plugins/compact-bar.wasm | bin | 490119 -> 791665 bytes | |||
| -rwxr-xr-x | zellij-utils/assets/plugins/fixture-plugin-for-tests.wasm | bin | 0 -> 732287 bytes | |||
| -rwxr-xr-x | zellij-utils/assets/plugins/status-bar.wasm | bin | 621069 -> 920797 bytes | |||
| -rwxr-xr-x | zellij-utils/assets/plugins/strider.wasm | bin | 503181 -> 916361 bytes | |||
| -rwxr-xr-x | zellij-utils/assets/plugins/tab-bar.wasm | bin | 458835 -> 762202 bytes | |||
| -rw-r--r-- | zellij-utils/src/consts.rs | 5 | ||||
| -rw-r--r-- | zellij-utils/src/data.rs | 4 | ||||
| -rw-r--r-- | zellij-utils/src/errors.rs | 3 |
9 files changed, 13 insertions, 0 deletions
diff --git a/zellij-utils/Cargo.toml b/zellij-utils/Cargo.toml index 95f8b82a..f12d8c78 100644 --- a/zellij-utils/Cargo.toml +++ b/zellij-utils/Cargo.toml @@ -39,6 +39,7 @@ regex = "1.5.5" tempfile = "3.2.0" kdl = { version = "4.5.0", features = ["span"] } shellexpand = "3.0.0" +uuid = { version = "0.8.2", features = ["serde", "v4"] } #[cfg(not(target_family = "wasm"))] [target.'cfg(not(target_family = "wasm"))'.dependencies] diff --git a/zellij-utils/assets/plugins/compact-bar.wasm b/zellij-utils/assets/plugins/compact-bar.wasm Binary files differindex d59cb92b..3145fe1d 100755 --- a/zellij-utils/assets/plugins/compact-bar.wasm +++ b/zellij-utils/assets/plugins/compact-bar.wasm diff --git a/zellij-utils/assets/plugins/fixture-plugin-for-tests.wasm b/zellij-utils/assets/plugins/fixture-plugin-for-tests.wasm Binary files differnew file mode 100755 index 00000000..a5421d72 --- /dev/null +++ b/zellij-utils/assets/plugins/fixture-plugin-for-tests.wasm diff --git a/zellij-utils/assets/plugins/status-bar.wasm b/zellij-utils/assets/plugins/status-bar.wasm Binary files differindex 63907aed..8f7ed782 100755 --- a/zellij-utils/assets/plugins/status-bar.wasm +++ b/zellij-utils/assets/plugins/status-bar.wasm diff --git a/zellij-utils/assets/plugins/strider.wasm b/zellij-utils/assets/plugins/strider.wasm Binary files differindex 39909aaa..929f5e8c 100755 --- a/zellij-utils/assets/plugins/strider.wasm +++ b/zellij-utils/assets/plugins/strider.wasm diff --git a/zellij-utils/assets/plugins/tab-bar.wasm b/zellij-utils/assets/plugins/tab-bar.wasm Binary files differindex 5f59fe4f..a8742f67 100755 --- a/zellij-utils/assets/plugins/tab-bar.wasm +++ b/zellij-utils/assets/plugins/tab-bar.wasm diff --git a/zellij-utils/src/consts.rs b/zellij-utils/src/consts.rs index b851b152..047cf986 100644 --- a/zellij-utils/src/consts.rs +++ b/zellij-utils/src/consts.rs @@ -5,6 +5,7 @@ use directories_next::ProjectDirs; use lazy_static::lazy_static; use once_cell::sync::OnceCell; use std::path::PathBuf; +use uuid::Uuid; pub const ZELLIJ_CONFIG_FILE_ENV: &str = "ZELLIJ_CONFIG_FILE"; pub const ZELLIJ_CONFIG_DIR_ENV: &str = "ZELLIJ_CONFIG_DIR"; @@ -29,6 +30,10 @@ lazy_static! { pub static ref ZELLIJ_PROJ_DIR: ProjectDirs = ProjectDirs::from("org", "Zellij Contributors", "Zellij").unwrap(); pub static ref ZELLIJ_CACHE_DIR: PathBuf = ZELLIJ_PROJ_DIR.cache_dir().to_path_buf(); + pub static ref ZELLIJ_SESSION_CACHE_DIR: PathBuf = ZELLIJ_PROJ_DIR + .cache_dir() + .to_path_buf() + .join(format!("{}", Uuid::new_v4())); pub static ref ZELLIJ_DEFAULT_THEMES: Themes = { let mut default_themes = Themes::default(); diff --git a/zellij-utils/src/data.rs b/zellij-utils/src/data.rs index 6da375f5..285532cc 100644 --- a/zellij-utils/src/data.rs +++ b/zellij-utils/src/data.rs @@ -469,6 +469,10 @@ pub enum Event { SystemClipboardFailure, InputReceived, Visible(bool), + CustomMessage( + String, // message + String, // payload + ), } /// Describes the different input modes, which change the way that keystrokes will be interpreted. diff --git a/zellij-utils/src/errors.rs b/zellij-utils/src/errors.rs index 8b49112b..74395e57 100644 --- a/zellij-utils/src/errors.rs +++ b/zellij-utils/src/errors.rs @@ -365,6 +365,9 @@ pub enum PluginContext { RemoveClient, NewTab, ApplyCachedEvents, + ApplyCachedWorkerMessages, + PostMessageToPluginWorker, + PostMessageToPlugin, } /// Stack call representations corresponding to the different types of [`ClientInstruction`]s. |
