diff options
| author | Aram Drevekenin <aram@poor.dev> | 2026-07-27 18:24:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-27 18:24:37 +0200 |
| commit | ea07e2d5b6bbc9ea6f9c765b0838b3e91156a58d (patch) | |
| tree | 4a8fac8a9b27f2a8b32b3af61a3b5419b9937c81 /zellij-utils/assets | |
| parent | Switch from the unmaintained daemonize crate to a maintained fork (#4512) (diff) | |
| download | sl0ppij-ea07e2d5b6bbc9ea6f9c765b0838b3e91156a58d.tar.gz sl0ppij-ea07e2d5b6bbc9ea6f9c765b0838b3e91156a58d.tar.xz sl0ppij-ea07e2d5b6bbc9ea6f9c765b0838b3e91156a58d.zip | |
Nested session handling (#5417)
* fix: theme query and updated pixel dimensions
* add no-ui-fullscreen key/action/capability
* protocol core
* integration test harness
* fix integration tests
* fix flaky tests
* nested ui (dimming) and directional focus initial implementation
* integration tests for nested ui dimming and directional focus
* initial full screen nesteed implementation
* fix: keep hidden floating panes hidden across nested no-ui fullscreen
* fix integration tests
* no ui fullscreen integration tests
* hardening behavior/tests
* fix(nested): re-derive descend/dim on host tab switch and new-tab so clicking dimmed chrome ascends
* initial modal implementation
* initial ui improvements
* fix integration tests
* improve nested selection ui
* nested session modal refactoring and tests
* improve integration test speed somewhat
* some ui adjustments
* simplify full/auto nested session handling
* hints in compact-bar
* guest stdin leak fix
* allow floating panes to be fullscreen
* make nested session handling configurable
* protocol reannounce
* refactor: naming confusion
* improve ux somewhat
* rustfmt
* merge fixes
* improve integration test rate limiting (fix ci)
* add pr
Diffstat (limited to 'zellij-utils/assets')
21 files changed, 305 insertions, 4 deletions
diff --git a/zellij-utils/assets/config/default.kdl b/zellij-utils/assets/config/default.kdl index 22ae3699..a551dc80 100644 --- a/zellij-utils/assets/config/default.kdl +++ b/zellij-utils/assets/config/default.kdl @@ -33,6 +33,7 @@ keybinds { bind "s" { NewPane "stacked"; SwitchToMode "Normal"; } bind "x" { CloseFocus; SwitchToMode "Normal"; } bind "f" { ToggleFocusFullscreen; SwitchToMode "Normal"; } + bind "Shift f" { ToggleFocusNoUiFullscreen; SwitchToMode "Normal"; } bind "z" { TogglePaneFrames; SwitchToMode "Normal"; } bind "w" { ToggleFloatingPanes; SwitchToMode "Normal"; } bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "Normal"; } @@ -115,6 +116,9 @@ keybinds { bind "Ctrl o" { SwitchToMode "Normal"; } bind "Ctrl s" { SwitchToMode "Scroll"; } bind "d" { Detach; } + bind "]" { FocusHostSession; SwitchToMode "Normal"; } + bind "[" { FocusGuestSession; SwitchToMode "Normal"; } + bind "f" { ToggleHostFullscreen; SwitchToMode "Normal"; } bind "w" { LaunchOrFocusPlugin "session-manager" { floating true @@ -261,6 +265,15 @@ load_plugins { // // on_force_close "quit" +// Choose how to handle a nested Zellij session detected running inside a pane +// Options: +// - ask (Default - prompt with a modal to zoom in or control on focus) +// - fullscreen (always zoom into the nested session) +// - descend (always control the nested session on focus) +// - never (never prompt or descend; do it manually) +// +// nested_session_handling "ask" + // Send a request for a simplified ui (without arrow fonts) to plugins // Options: // - true diff --git a/zellij-utils/assets/plugins/about.wasm b/zellij-utils/assets/plugins/about.wasm Binary files differindex 5f8c923e..927632bc 100755 --- a/zellij-utils/assets/plugins/about.wasm +++ b/zellij-utils/assets/plugins/about.wasm diff --git a/zellij-utils/assets/plugins/compact-bar.wasm b/zellij-utils/assets/plugins/compact-bar.wasm Binary files differindex 0f55fac9..bf73dadd 100755 --- a/zellij-utils/assets/plugins/compact-bar.wasm +++ b/zellij-utils/assets/plugins/compact-bar.wasm diff --git a/zellij-utils/assets/plugins/configuration.wasm b/zellij-utils/assets/plugins/configuration.wasm Binary files differindex dcd848fa..d615cdca 100755 --- a/zellij-utils/assets/plugins/configuration.wasm +++ b/zellij-utils/assets/plugins/configuration.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 differindex ccde7690..1adf8d94 100755 --- a/zellij-utils/assets/plugins/fixture-plugin-for-tests.wasm +++ b/zellij-utils/assets/plugins/fixture-plugin-for-tests.wasm diff --git a/zellij-utils/assets/plugins/layout-manager.wasm b/zellij-utils/assets/plugins/layout-manager.wasm Binary files differindex c5382f72..fece91ea 100755 --- a/zellij-utils/assets/plugins/layout-manager.wasm +++ b/zellij-utils/assets/plugins/layout-manager.wasm diff --git a/zellij-utils/assets/plugins/link.wasm b/zellij-utils/assets/plugins/link.wasm Binary files differindex 32d2aba3..18a96f47 100755 --- a/zellij-utils/assets/plugins/link.wasm +++ b/zellij-utils/assets/plugins/link.wasm diff --git a/zellij-utils/assets/plugins/mobile.wasm b/zellij-utils/assets/plugins/mobile.wasm Binary files differindex 05bd6516..00ec86de 100755 --- a/zellij-utils/assets/plugins/mobile.wasm +++ b/zellij-utils/assets/plugins/mobile.wasm diff --git a/zellij-utils/assets/plugins/multiple-select.wasm b/zellij-utils/assets/plugins/multiple-select.wasm Binary files differindex 036a726e..2f2767d5 100755 --- a/zellij-utils/assets/plugins/multiple-select.wasm +++ b/zellij-utils/assets/plugins/multiple-select.wasm diff --git a/zellij-utils/assets/plugins/plugin-manager.wasm b/zellij-utils/assets/plugins/plugin-manager.wasm Binary files differindex 2d4caf64..e146e20e 100755 --- a/zellij-utils/assets/plugins/plugin-manager.wasm +++ b/zellij-utils/assets/plugins/plugin-manager.wasm diff --git a/zellij-utils/assets/plugins/session-manager.wasm b/zellij-utils/assets/plugins/session-manager.wasm Binary files differindex 61e16dd8..bd2ba4b0 100755 --- a/zellij-utils/assets/plugins/session-manager.wasm +++ b/zellij-utils/assets/plugins/session-manager.wasm diff --git a/zellij-utils/assets/plugins/share.wasm b/zellij-utils/assets/plugins/share.wasm Binary files differindex fa0fb2e7..9fe98cb2 100755 --- a/zellij-utils/assets/plugins/share.wasm +++ b/zellij-utils/assets/plugins/share.wasm diff --git a/zellij-utils/assets/plugins/status-bar.wasm b/zellij-utils/assets/plugins/status-bar.wasm Binary files differindex 70a76358..d2f14b1b 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 9197346b..f348f0b8 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 f52aa749..0bce4ec4 100755 --- a/zellij-utils/assets/plugins/tab-bar.wasm +++ b/zellij-utils/assets/plugins/tab-bar.wasm diff --git a/zellij-utils/assets/prost/api.action.rs b/zellij-utils/assets/prost/api.action.rs index a703c9f0..4860feb1 100644 --- a/zellij-utils/assets/prost/api.action.rs +++ b/zellij-utils/assets/prost/api.action.rs @@ -1134,6 +1134,10 @@ pub enum ActionName { ToggleTheme = 103, FocusLastPane = 104, SetPaneFrameStyle = 105, + ToggleFocusNoUiFullscreen = 106, + FocusHostSession = 107, + ToggleHostFullscreen = 108, + FocusGuestSession = 109, } impl ActionName { /// String value of the enum field names used in the ProtoBuf definition. @@ -1245,6 +1249,10 @@ impl ActionName { ActionName::ToggleTheme => "ToggleTheme", ActionName::FocusLastPane => "FocusLastPane", ActionName::SetPaneFrameStyle => "SetPaneFrameStyle", + ActionName::ToggleFocusNoUiFullscreen => "ToggleFocusNoUiFullscreen", + ActionName::FocusHostSession => "FocusHostSession", + ActionName::ToggleHostFullscreen => "ToggleHostFullscreen", + ActionName::FocusGuestSession => "FocusGuestSession", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1353,6 +1361,10 @@ impl ActionName { "ToggleTheme" => Some(Self::ToggleTheme), "FocusLastPane" => Some(Self::FocusLastPane), "SetPaneFrameStyle" => Some(Self::SetPaneFrameStyle), + "ToggleFocusNoUiFullscreen" => Some(Self::ToggleFocusNoUiFullscreen), + "FocusHostSession" => Some(Self::FocusHostSession), + "ToggleHostFullscreen" => Some(Self::ToggleHostFullscreen), + "FocusGuestSession" => Some(Self::FocusGuestSession), _ => None, } } diff --git a/zellij-utils/assets/prost/api.event.rs b/zellij-utils/assets/prost/api.event.rs index 8f050da7..4230d347 100644 --- a/zellij-utils/assets/prost/api.event.rs +++ b/zellij-utils/assets/prost/api.event.rs @@ -703,6 +703,18 @@ pub struct ModeUpdatePayload { pub web_server_capability: ::core::option::Option<bool>, #[prost(enumeration="PaneFrameStyle", optional, tag="16")] pub pane_frame_style: ::core::option::Option<i32>, + #[prost(bool, optional, tag="17")] + pub session_dimmed: ::core::option::Option<bool>, + #[prost(string, repeated, tag="18")] + pub ancestry: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, optional, tag="19")] + pub host_fullscreen: ::core::option::Option<bool>, + #[prost(string, repeated, tag="20")] + pub nested_ascend_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(bool, optional, tag="21")] + pub session_ascended: ::core::option::Option<bool>, + #[prost(string, repeated, tag="22")] + pub nested_descend_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] diff --git a/zellij-utils/assets/prost/api.plugin_command.rs b/zellij-utils/assets/prost/api.plugin_command.rs index 676361b2..9f053ae3 100644 --- a/zellij-utils/assets/prost/api.plugin_command.rs +++ b/zellij-utils/assets/prost/api.plugin_command.rs @@ -2249,6 +2249,8 @@ pub enum CommandName { SetPaneFrameStyle = 224, ToggleFloatingPanes = 225, NewPane = 226, + ToggleFocusNoUiFullscreen = 227, + FocusHostSession = 228, } impl CommandName { /// String value of the enum field names used in the ProtoBuf definition. @@ -2461,6 +2463,8 @@ impl CommandName { CommandName::SetPaneFrameStyle => "SetPaneFrameStyle", CommandName::ToggleFloatingPanes => "ToggleFloatingPanes", CommandName::NewPane => "NewPane", + CommandName::ToggleFocusNoUiFullscreen => "ToggleFocusNoUiFullscreen", + CommandName::FocusHostSession => "FocusHostSession", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -2670,6 +2674,8 @@ impl CommandName { "SetPaneFrameStyle" => Some(Self::SetPaneFrameStyle), "ToggleFloatingPanes" => Some(Self::ToggleFloatingPanes), "NewPane" => Some(Self::NewPane), + "ToggleFocusNoUiFullscreen" => Some(Self::ToggleFocusNoUiFullscreen), + "FocusHostSession" => Some(Self::FocusHostSession), _ => None, } } diff --git a/zellij-utils/assets/prost_ipc/client_server_contract.rs b/zellij-utils/assets/prost_ipc/client_server_contract.rs index 7cb4a620..11cc7937 100644 --- a/zellij-utils/assets/prost_ipc/client_server_contract.rs +++ b/zellij-utils/assets/prost_ipc/client_server_contract.rs @@ -119,7 +119,7 @@ pub struct RgbColor { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct Action { - #[prost(oneof="action::ActionType", tags="1, 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, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142")] + #[prost(oneof="action::ActionType", tags="1, 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, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147")] pub action_type: ::core::option::Option<action::ActionType>, } /// Nested message and enum types in `Action`. @@ -413,6 +413,16 @@ pub mod action { FocusLastPane(super::FocusLastPaneAction), #[prost(message, tag="142")] SetPaneFrameStyle(super::SetPaneFrameStyleAction), + #[prost(message, tag="143")] + ToggleFocusNoUiFullscreen(super::ToggleFocusNoUiFullscreenAction), + #[prost(message, tag="144")] + ToggleNoUiFullscreenByPaneId(super::ToggleNoUiFullscreenByPaneIdAction), + #[prost(message, tag="145")] + FocusHostSession(super::FocusHostSessionAction), + #[prost(message, tag="146")] + ToggleHostFullscreen(super::ToggleHostFullscreenAction), + #[prost(message, tag="147")] + FocusGuestSession(super::FocusGuestSessionAction), } } // Action message definitions (all 92 variants) @@ -436,6 +446,18 @@ pub struct FocusLastPaneAction { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] +pub struct FocusHostSessionAction { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FocusGuestSessionAction { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ToggleHostFullscreenAction { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct SwitchFocusAction { } #[allow(clippy::derive_partial_eq_without_eq)] @@ -498,6 +520,10 @@ pub struct ToggleFocusFullscreenAction { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] +pub struct ToggleFocusNoUiFullscreenAction { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct TogglePaneFramesAction { } #[allow(clippy::derive_partial_eq_without_eq)] @@ -1967,7 +1993,7 @@ pub struct Options { pub show_release_notes: ::core::option::Option<bool>, #[prost(bool, optional, tag="33")] pub advanced_mouse_actions: ::core::option::Option<bool>, - #[prost(bool, optional, tag="53")] + #[prost(bool, optional, tag="54")] pub mouse_scroll_resize: ::core::option::Option<bool>, #[prost(string, optional, tag="34")] pub web_server_ip: ::core::option::Option<::prost::alloc::string::String>, @@ -2007,6 +2033,8 @@ pub struct Options { pub pane_frame_style: ::core::option::Option<::prost::alloc::string::String>, #[prost(bool, optional, tag="52")] pub stacked_pane_list: ::core::option::Option<bool>, + #[prost(enumeration="NestedSessionHandling", optional, tag="53")] + pub nested_session_handling: ::core::option::Option<i32>, } /// Pane-targeting action messages #[allow(clippy::derive_partial_eq_without_eq)] @@ -2101,6 +2129,12 @@ pub struct ToggleFullscreenByPaneIdAction { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] +pub struct ToggleNoUiFullscreenByPaneIdAction { + #[prost(message, optional, tag="1")] + pub pane_id: ::core::option::Option<PaneId>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct TogglePaneEmbedOrFloatingByPaneIdAction { #[prost(message, optional, tag="1")] pub pane_id: ::core::option::Option<PaneId>, @@ -2966,10 +3000,45 @@ impl MobileLayout { } } } +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum NestedSessionHandling { + Unspecified = 0, + Ask = 1, + Fullscreen = 2, + Descend = 3, + Never = 4, +} +impl NestedSessionHandling { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + NestedSessionHandling::Unspecified => "NESTED_SESSION_HANDLING_UNSPECIFIED", + NestedSessionHandling::Ask => "NESTED_SESSION_HANDLING_ASK", + NestedSessionHandling::Fullscreen => "NESTED_SESSION_HANDLING_FULLSCREEN", + NestedSessionHandling::Descend => "NESTED_SESSION_HANDLING_DESCEND", + NestedSessionHandling::Never => "NESTED_SESSION_HANDLING_NEVER", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option<Self> { + match value { + "NESTED_SESSION_HANDLING_UNSPECIFIED" => Some(Self::Unspecified), + "NESTED_SESSION_HANDLING_ASK" => Some(Self::Ask), + "NESTED_SESSION_HANDLING_FULLSCREEN" => Some(Self::Fullscreen), + "NESTED_SESSION_HANDLING_DESCEND" => Some(Self::Descend), + "NESTED_SESSION_HANDLING_NEVER" => Some(Self::Never), + _ => None, + } + } +} #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ClientToServerMsg { - #[prost(oneof="client_to_server_msg::Message", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21")] + #[prost(oneof="client_to_server_msg::Message", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22")] pub message: ::core::option::Option<client_to_server_msg::Message>, } /// Nested message and enum types in `ClientToServerMsg`. @@ -3019,6 +3088,8 @@ pub mod client_to_server_msg { HostTerminalThemeChanged(super::HostTerminalThemeChangedMsg), #[prost(message, tag="21")] SoftKeyboardVisibilityChanged(super::SoftKeyboardVisibilityChangedMsg), + #[prost(message, tag="22")] + NestedSessionFrameFromHost(super::NestedSessionFrameFromHostMsg), } } #[allow(clippy::derive_partial_eq_without_eq)] @@ -3172,6 +3243,12 @@ pub struct SoftKeyboardVisibilityChangedMsg { #[prost(bool, tag="1")] pub visible: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NestedSessionFrameFromHostMsg { + #[prost(bytes="vec", tag="1")] + pub payload_bytes: ::prost::alloc::vec::Vec<u8>, +} #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] #[repr(i32)] pub enum ResizeCause { @@ -3230,7 +3307,7 @@ impl HostTerminalThemeIndication { #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] pub struct ServerToClientMsg { - #[prost(oneof="server_to_client_msg::Message", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17")] + #[prost(oneof="server_to_client_msg::Message", tags="1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18")] pub message: ::core::option::Option<server_to_client_msg::Message>, } /// Nested message and enum types in `ServerToClientMsg`. @@ -3272,6 +3349,8 @@ pub mod server_to_client_msg { ForwardQueryToHost(super::ForwardQueryToHostMsg), #[prost(message, tag="17")] SetSoftKeyboard(super::SetSoftKeyboardMsg), + #[prost(message, tag="18")] + EmitNestedSessionFrame(super::EmitNestedSessionFrameMsg), } } #[allow(clippy::derive_partial_eq_without_eq)] @@ -3385,3 +3464,9 @@ pub struct SetSoftKeyboardMsg { #[prost(bool, tag="1")] pub on: bool, } +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct EmitNestedSessionFrameMsg { + #[prost(bytes="vec", tag="1")] + pub payload_bytes: ::prost::alloc::vec::Vec<u8>, +} diff --git a/zellij-utils/assets/prost_nested_session/generated_nested_session_api.rs b/zellij-utils/assets/prost_nested_session/generated_nested_session_api.rs new file mode 100644 index 00000000..59f16320 --- /dev/null +++ b/zellij-utils/assets/prost_nested_session/generated_nested_session_api.rs @@ -0,0 +1,3 @@ +pub mod nested_session_contract { + include!("nested_session_contract.rs"); +} diff --git a/zellij-utils/assets/prost_nested_session/nested_session_contract.rs b/zellij-utils/assets/prost_nested_session/nested_session_contract.rs new file mode 100644 index 00000000..1a9e117a --- /dev/null +++ b/zellij-utils/assets/prost_nested_session/nested_session_contract.rs @@ -0,0 +1,170 @@ +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct NestedSessionMessage { + #[prost(oneof="nested_session_message::Payload", tags="1, 2, 3, 4, 5, 8, 9, 10, 11, 12, 13, 14")] + pub payload: ::core::option::Option<nested_session_message::Payload>, +} +/// Nested message and enum types in `NestedSessionMessage`. +pub mod nested_session_message { + #[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Oneof)] + pub enum Payload { + #[prost(message, tag="1")] + Announce(super::Announce), + #[prost(message, tag="2")] + FocusHost(super::FocusHost), + #[prost(message, tag="3")] + HostFullscreen(super::ToggleHostFullscreen), + #[prost(message, tag="4")] + Pong(super::Pong), + #[prost(message, tag="5")] + Bye(super::Bye), + #[prost(message, tag="8")] + AnnounceAck(super::AnnounceAck), + #[prost(message, tag="9")] + FocusGained(super::FocusGained), + #[prost(message, tag="10")] + FocusLost(super::FocusLost), + #[prost(message, tag="11")] + FullscreenState(super::FullscreenState), + #[prost(message, tag="12")] + AncestryUpdate(super::AncestryUpdate), + #[prost(message, tag="13")] + Ping(super::Ping), + #[prost(message, tag="14")] + ShortcutUpdate(super::ShortcutUpdate), + } +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Announce { + #[prost(string, tag="1")] + pub session_name: ::prost::alloc::string::String, + #[prost(enumeration="NestedCapability", repeated, tag="2")] + pub capabilities: ::prost::alloc::vec::Vec<i32>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FocusHost { + #[prost(enumeration="NestedDirection", tag="1")] + pub direction: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ToggleHostFullscreen { + #[prost(bool, tag="1")] + pub fullscreen: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Pong { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Bye { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AnnounceAck { + #[prost(string, repeated, tag="1")] + pub ancestry: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(enumeration="NestedCapability", repeated, tag="2")] + pub capabilities: ::prost::alloc::vec::Vec<i32>, + #[prost(string, repeated, tag="3")] + pub descend_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct ShortcutUpdate { + #[prost(string, repeated, tag="1")] + pub ascend_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, + #[prost(string, repeated, tag="2")] + pub descend_keys: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FocusGained { + #[prost(enumeration="NestedDirection", tag="1")] + pub from_direction: i32, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FocusLost { +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct FullscreenState { + #[prost(bool, tag="1")] + pub fullscreen: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct AncestryUpdate { + #[prost(string, repeated, tag="1")] + pub ancestry: ::prost::alloc::vec::Vec<::prost::alloc::string::String>, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct Ping { +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum NestedCapability { + Unspecified = 0, + NestedControl = 1, +} +impl NestedCapability { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + NestedCapability::Unspecified => "NESTED_CAPABILITY_UNSPECIFIED", + NestedCapability::NestedControl => "NESTED_CAPABILITY_NESTED_CONTROL", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option<Self> { + match value { + "NESTED_CAPABILITY_UNSPECIFIED" => Some(Self::Unspecified), + "NESTED_CAPABILITY_NESTED_CONTROL" => Some(Self::NestedControl), + _ => None, + } + } +} +#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] +#[repr(i32)] +pub enum NestedDirection { + Unspecified = 0, + Left = 1, + Right = 2, + Up = 3, + Down = 4, +} +impl NestedDirection { + /// String value of the enum field names used in the ProtoBuf definition. + /// + /// The values are not transformed in any way and thus are considered stable + /// (if the ProtoBuf definition does not change) and safe for programmatic use. + pub fn as_str_name(&self) -> &'static str { + match self { + NestedDirection::Unspecified => "NESTED_DIRECTION_UNSPECIFIED", + NestedDirection::Left => "NESTED_DIRECTION_LEFT", + NestedDirection::Right => "NESTED_DIRECTION_RIGHT", + NestedDirection::Up => "NESTED_DIRECTION_UP", + NestedDirection::Down => "NESTED_DIRECTION_DOWN", + } + } + /// Creates an enum from field names used in the ProtoBuf definition. + pub fn from_str_name(value: &str) -> ::core::option::Option<Self> { + match value { + "NESTED_DIRECTION_UNSPECIFIED" => Some(Self::Unspecified), + "NESTED_DIRECTION_LEFT" => Some(Self::Left), + "NESTED_DIRECTION_RIGHT" => Some(Self::Right), + "NESTED_DIRECTION_UP" => Some(Self::Up), + "NESTED_DIRECTION_DOWN" => Some(Self::Down), + _ => None, + } + } +} |
