aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/plugin_api
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2025-07-01 20:17:37 +0200
committerGitHub <noreply@github.com>2025-07-01 20:17:37 +0200
commitca0048bdcb6d5f3bc0d7f05806efe1319a218e93 (patch)
tree38c61a2251b8126530098babc414a70d0b4ea0c9 /zellij-utils/src/plugin_api
parentdocs(changelog): replace pane API (diff)
downloadsl0ppij-ca0048bdcb6d5f3bc0d7f05806efe1319a218e93.tar.gz
sl0ppij-ca0048bdcb6d5f3bc0d7f05806efe1319a218e93.tar.xz
sl0ppij-ca0048bdcb6d5f3bc0d7f05806efe1319a218e93.zip
feat: stack pane action (#4255)
* refactor: group placement properties * add stackpane cli and keybinding * add test * refactor: move spawn vertically/horizontally to spawnterminal * fix tests and cleanups * some cleanups and minor fixes * more cleanups * add stack action to the UI * style(fmt): rustfmt * fix serialization * add to default config * fix e2e tests * style(fmt): rustfmt * fix cli * fix tests * docs(changelog): add PR
Diffstat (limited to 'zellij-utils/src/plugin_api')
-rw-r--r--zellij-utils/src/plugin_api/action.proto1
-rw-r--r--zellij-utils/src/plugin_api/action.rs8
2 files changed, 9 insertions, 0 deletions
diff --git a/zellij-utils/src/plugin_api/action.proto b/zellij-utils/src/plugin_api/action.proto
index 40a6481f..5bdd34e9 100644
--- a/zellij-utils/src/plugin_api/action.proto
+++ b/zellij-utils/src/plugin_api/action.proto
@@ -243,6 +243,7 @@ enum ActionName {
MouseEvent = 86;
TogglePaneInGroup = 87;
ToggleGroupMarking = 88;
+ NewStackedPane = 89;
}
message Position {
diff --git a/zellij-utils/src/plugin_api/action.rs b/zellij-utils/src/plugin_api/action.rs
index 857bb385..d018ea1b 100644
--- a/zellij-utils/src/plugin_api/action.rs
+++ b/zellij-utils/src/plugin_api/action.rs
@@ -720,6 +720,10 @@ impl TryFrom<ProtobufAction> for Action {
plugin_id: None,
}),
},
+ Some(ProtobufActionName::NewStackedPane) => match protobuf_action.optional_payload {
+ Some(_) => Err("NewStackedPane should not have a payload"),
+ None => Ok(Action::NewStackedPane(None, None)),
+ },
_ => Err("Unknown Action"),
}
}
@@ -1254,6 +1258,10 @@ impl TryFrom<Action> for ProtobufAction {
name: ProtobufActionName::ToggleGroupMarking as i32,
optional_payload: None,
}),
+ Action::NewStackedPane(..) => Ok(ProtobufAction {
+ name: ProtobufActionName::NewStackedPane as i32,
+ optional_payload: None,
+ }),
Action::NoOp
| Action::Confirm
| Action::NewInPlacePane(..)