aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/assets/prost/api.action.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2025-12-23 13:41:56 +0100
committerGitHub <noreply@github.com>2025-12-23 13:41:56 +0100
commit3fe48a972c55537502128779116d38d8f8aedb7e (patch)
tree350386442db2a46e1d8ba3d9d4dd0c7d53b34c13 /zellij-utils/assets/prost/api.action.rs
parentRead only web tokens (#4551) (diff)
downloadsl0ppij-3fe48a972c55537502128779116d38d8f8aedb7e.tar.gz
sl0ppij-3fe48a972c55537502128779116d38d8f8aedb7e.tar.xz
sl0ppij-3fe48a972c55537502128779116d38d8f8aedb7e.zip
Feature: allow overriding a layout for a currently running tab (change layout at runtime) (#4566)
* add tests for LayoutApplier * initial untested implementation of override functions * add override-layout cli action with stub in screen * filter run instructions to ignore * implement override-layout roundtrip through plugin and pty threads * initial full-cycle working override implementation * fix some bugs (eg. actually start new terminals) * fix some bugs with focus after override * fix floating pane matching bug in layout applier * formatting * use first tab, error on more than 1 tab * fix some floating_panes ordering and shell issues * get new tab name to work * respect swap layouts * allow specifying tab properties on main layout node if we just have one tab * add tests for new override methods * start work on retaining panes, hard-coded things, kind of working but broken in many places * fixed most tiled pane override bugs * reset viewport before reapplying * revert constraint system changes * retain-existing-terminal-panes flag * add retain terminal panes tests * add retain plugin panes flag * add keybind * add retain plugin panes tests * add override-layout e2e test * refactor: layout_applier * style: rustfmt * some cleanups * fix cli flags * no crashy * formatting and artifacts * moar cleanups * fix: respect expanded in stack when overriding * docs(changelog): add PR
Diffstat (limited to 'zellij-utils/assets/prost/api.action.rs')
-rw-r--r--zellij-utils/assets/prost/api.action.rs25
1 files changed, 24 insertions, 1 deletions
diff --git a/zellij-utils/assets/prost/api.action.rs b/zellij-utils/assets/prost/api.action.rs
index 46435021..ccf96860 100644
--- a/zellij-utils/assets/prost/api.action.rs
+++ b/zellij-utils/assets/prost/api.action.rs
@@ -257,10 +257,28 @@ pub struct NewTabPayload {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
+pub struct OverrideLayoutPayload {
+ #[prost(message, optional, tag="1")]
+ pub tiled_layout: ::core::option::Option<TiledPaneLayout>,
+ #[prost(message, repeated, tag="2")]
+ pub floating_layouts: ::prost::alloc::vec::Vec<FloatingPaneLayout>,
+ #[prost(message, repeated, tag="3")]
+ pub swap_tiled_layouts: ::prost::alloc::vec::Vec<SwapTiledLayout>,
+ #[prost(message, repeated, tag="4")]
+ pub swap_floating_layouts: ::prost::alloc::vec::Vec<SwapFloatingLayout>,
+ #[prost(string, optional, tag="5")]
+ pub tab_name: ::core::option::Option<::prost::alloc::string::String>,
+ #[prost(bool, tag="10")]
+ pub retain_existing_terminal_panes: bool,
+ #[prost(bool, tag="11")]
+ pub retain_existing_plugin_panes: bool,
+}
+#[allow(clippy::derive_partial_eq_without_eq)]
+#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Action {
#[prost(enumeration="ActionName", tag="1")]
pub name: i32,
- #[prost(oneof="action::OptionalPayload", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52")]
+ #[prost(oneof="action::OptionalPayload", tags="2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53")]
pub optional_payload: ::core::option::Option<action::OptionalPayload>,
}
/// Nested message and enum types in `Action`.
@@ -364,6 +382,8 @@ pub mod action {
NewTabPayload(super::NewTabPayload),
#[prost(message, tag="52")]
NewInPlacePanePayload(super::NewInPlacePanePayload),
+ #[prost(message, tag="53")]
+ OverrideLayoutPayload(super::OverrideLayoutPayload),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
@@ -994,6 +1014,7 @@ pub enum ActionName {
SwitchSession = 90,
NewBlockingPane = 91,
NewInPlacePane = 92,
+ OverrideLayout = 93,
}
impl ActionName {
/// String value of the enum field names used in the ProtoBuf definition.
@@ -1092,6 +1113,7 @@ impl ActionName {
ActionName::SwitchSession => "SwitchSession",
ActionName::NewBlockingPane => "NewBlockingPane",
ActionName::NewInPlacePane => "NewInPlacePane",
+ ActionName::OverrideLayout => "OverrideLayout",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -1187,6 +1209,7 @@ impl ActionName {
"SwitchSession" => Some(Self::SwitchSession),
"NewBlockingPane" => Some(Self::NewBlockingPane),
"NewInPlacePane" => Some(Self::NewInPlacePane),
+ "OverrideLayout" => Some(Self::OverrideLayout),
_ => None,
}
}