aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-client
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2025-12-11 14:25:42 +0100
committerGitHub <noreply@github.com>2025-12-11 14:25:42 +0100
commit693fa082def5ef0fe030cd7fdc3b1df051b35dc6 (patch)
treeb3f651462bbc1cd2fa5b2d79207343413ef6b83c /zellij-client
parentfix(zellij-server): unblock building on 32bit targets (#4484) (diff)
downloadsl0ppij-693fa082def5ef0fe030cd7fdc3b1df051b35dc6.tar.gz
sl0ppij-693fa082def5ef0fe030cd7fdc3b1df051b35dc6.tar.xz
sl0ppij-693fa082def5ef0fe030cd7fdc3b1df051b35dc6.zip
Command Sequences, Blocking CLI Commands, New Plugin APIs (#4546)
* fix deadlocks * initial logging to plugin implementation * only log actions, include keys as Action::Write * send actions to plugins as a new Event::UserAction * add Action::Write metadata to plugin API * run_action plugin command and permission * block-until-exit/success/failure in the cli * fix tests * add NewBlockingPane to the plugin API * run actions in a different thread so as not to block plugin execution * add custom context to run_action flow * fixes for floating pane z_index sorting and unknown protobuf events not crashing plugins * always render the frame of pinned panes * macros module * add macros to config * KDL macro parsing * thread macros to the plugin thread * get/update/delete macros from plugins * add macros updated event * add ability to rename macros * fix deadlock * fix z_indices with pinned unselectable panes bug * allow plugins to opt-in to show_cursor * change show_cursor(bool) to show_cursor(Option<coordinates>) * test * upgrade strum to allow proper enum iteration and case insensitive fromstr implementation for Actions * better cwd tracking for exited command panes * add initial panes to NewTab Action (no-op for now) * add initial panes to cli newtab action * make initial panes work * add close_on_exit and start_suspended to the cli * properly convert newtab action (potentially breaking for plugins) * allow first pane in tab to block * make distinction between opening panes with the last active client and the current pane in the cli * improve some apis * fix fixed size closing pane bug * fix plugin cursor coordinates * fix issues with launch-or-focus-plugin having to do with in-place and suppressed panes * fix: set affected pane in replace pane * allow setting a pane in place when it is suppressed and being focused (tests failing) * fix tests * some fixes for unsuppression of panes * some fixes for completion_tx in new tab action * allow replace/suppressed rather than replace/close only * fixes for inserting suppressed panes without conflicts * pane focus history and explicit unsuppress plugin api * fix: prefer explicitly provided pane id in placement in actions that provide it * fix floating pane coordinate change and z_index * fix plugin cache dir to persist between sessions * fix some stack focusing issues when adding panes without a client id * make sure pinned panes are always above non-pinned floating panes * allow plugins to copy to clipboard * initial text styling additions implementations - buggy * fix dimming issues * remove extras, stay with just dim and unbold * unbold and dim as indices * allow ui components to render success/error colors * allow plugins to send sigint/sigkill to processes, as well as receive their pid * ui component fixes and send originating plugin context with run_action * originating plugin for new tab too * make plugn show pane command also expand stacked panes * add sequence plugin * remove macros * remove snapshots * add shortcut for sequence plugin * fix plugin tests * plugin tests for new apis * update snapshots for sequence shortcut * cleanups and formatting * Event::CwdChanged * moar cleanups * remove some warnings * remove mroe warnings * remove dead code * remove more dead code * fix minor bugs in sequence plugin * update sequence help and format codebase * fix conditional blocking cli commands * fix initial-command new-tab cli flag * add client_ids to CwdChanged Event * last fixes * add pr
Diffstat (limited to 'zellij-client')
-rw-r--r--zellij-client/src/old_config_converter/old_config.rs49
-rw-r--r--zellij-client/src/web_client/types.rs16
2 files changed, 1 insertions, 64 deletions
diff --git a/zellij-client/src/old_config_converter/old_config.rs b/zellij-client/src/old_config_converter/old_config.rs
index bfe345df..b5083c17 100644
--- a/zellij-client/src/old_config_converter/old_config.rs
+++ b/zellij-client/src/old_config_converter/old_config.rs
@@ -7,7 +7,7 @@ use std::path::PathBuf;
use serde::de::{Error, Visitor};
use serde::{Deserialize, Deserializer, Serialize};
-use std::collections::{BTreeMap, HashMap};
+use std::collections::HashMap;
use url::Url;
const ON_FORCE_CLOSE_DESCRIPTION: &'static str = "
@@ -560,23 +560,6 @@ struct OldUnbindFromYaml {
unbind: OldUnbind,
}
-/// Main configuration.
-#[derive(Debug, Clone, PartialEq, Deserialize)]
-struct OldConfig {
- pub keybinds: OldKeybinds,
- pub options: OldOptions,
- pub themes: Option<OldThemesFromYamlIntermediate>,
- pub plugins: OldPluginsConfig,
- pub ui: Option<OldUiConfigFromYaml>,
- pub env: OldEnvironmentVariablesFromYaml,
-}
-
-#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
-struct OldKeybinds(HashMap<OldInputMode, OldModeKeybinds>);
-
-#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
-struct OldModeKeybinds(BTreeMap<OldKey, Vec<OldAction>>);
-
#[derive(Debug, Clone, PartialEq, Deserialize, Serialize)]
pub struct OldThemesFromYamlIntermediate(HashMap<String, OldTheme>);
@@ -720,36 +703,6 @@ impl Default for OldPluginTypeFromYaml {
#[derive(Debug, Default, Clone, PartialEq, Eq, Hash, Deserialize, Serialize)]
struct OldPluginTag(String);
-#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
-struct OldPluginsConfig(HashMap<OldPluginTag, OldPluginConfig>);
-
-#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
-struct OldPluginConfig {
- /// Path of the plugin, see resolve_wasm_bytes for resolution semantics
- pub path: PathBuf,
- /// Plugin type
- pub run: OldPluginType,
- /// Allow command execution from plugin
- pub _allow_exec_host_cmd: bool,
- /// Original location of the
- pub location: OldRunPluginLocation,
-}
-
-#[derive(Debug, Serialize, Deserialize, Clone, PartialEq, Eq)]
-enum OldRunPluginLocation {
- File(PathBuf),
- Zellij(OldPluginTag),
-}
-
-#[derive(Clone, Debug, PartialEq, Deserialize, Serialize)]
-#[serde(rename_all = "kebab-case")]
-enum OldPluginType {
- /// Starts immediately when Zellij is started and runs without a visible pane
- Headless,
- /// Runs once per pane declared inside a layout file
- Pane(Option<usize>), // tab_index
-}
-
#[derive(Copy, Clone, Debug, PartialEq, Deserialize, Serialize)]
pub enum OldOnForceClose {
#[serde(alias = "quit")]
diff --git a/zellij-client/src/web_client/types.rs b/zellij-client/src/web_client/types.rs
index 201a0cf4..32676fd3 100644
--- a/zellij-client/src/web_client/types.rs
+++ b/zellij-client/src/web_client/types.rs
@@ -168,22 +168,6 @@ pub struct AppState {
pub is_https: bool,
}
-#[derive(Debug, Clone, Serialize, Deserialize)]
-pub struct StdinMessage {
- pub web_client_id: String,
- pub stdin: String,
-}
-
-#[derive(Debug, Clone, Serialize, Deserialize)]
-pub enum ShutdownSignal {
- Shutdown,
-}
-
-#[derive(Serialize, Debug)]
-pub struct SendShutdownSignalResponse {
- pub status: String,
-}
-
#[derive(Serialize)]
pub struct CreateClientIdResponse {
pub web_client_id: String,