diff options
| author | Aram Drevekenin <aram@poor.dev> | 2026-01-13 11:27:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-13 11:27:07 +0100 |
| commit | 4a27ceea0d99b036ca607e05714cef15689d7c26 (patch) | |
| tree | 22c0148718a82082bdb196c5e867697f514cc541 /zellij-utils/src/plugin_api/plugin_command.proto | |
| parent | docs(CONTRIBUTING): Describe rust toolchain versioning policy (#4585) (diff) | |
| download | sl0ppij-4a27ceea0d99b036ca607e05714cef15689d7c26.tar.gz sl0ppij-4a27ceea0d99b036ca607e05714cef15689d7c26.tar.xz sl0ppij-4a27ceea0d99b036ca607e05714cef15689d7c26.zip | |
Layout manager (#4601)
* ad plugin override_layout command
* watch available layouts and report to plugin thread
* Event::AvailableLayoutInfo
* save layout command
* refactor save_layout
* fix api and permissions
* delete_layout API command
* edit layout in place API
* edit layout response through api
* propagate layout parsing errors
* generate random name plugin api
* dump stringified layout API
* synchronicity dump_session_layout and include LayoutMetadata in sync response
* parse_layout plugin api
* fix: default to default layout dir in plugin api
* rename_layout plugin command API
* initial implementation of multi-tab override
* apply to multiple tabs
* allow applying to only the active tab
* add tab/pane names to layout parsing metadata
* indicate is_builtin_plugin in PaneMetadata
* get_layout_dir plugin API command
* consolidate (and fix) is_builtin_plugin logic
* fix bad ret
* allow dumping the layout for just a specific tab in the session
* get focused pane and tab sync api
* color last substring variants
* add plugin
* update assets
* fix tests
* add e2e tests for new plugin apis
* update ui with new shortcut
* rustfmt
* docs(changelog): add PR
Diffstat (limited to 'zellij-utils/src/plugin_api/plugin_command.proto')
| -rw-r--r-- | zellij-utils/src/plugin_api/plugin_command.proto | 137 |
1 files changed, 137 insertions, 0 deletions
diff --git a/zellij-utils/src/plugin_api/plugin_command.proto b/zellij-utils/src/plugin_api/plugin_command.proto index fb456ccd..0a0ad2b0 100644 --- a/zellij-utils/src/plugin_api/plugin_command.proto +++ b/zellij-utils/src/plugin_api/plugin_command.proto @@ -166,6 +166,16 @@ enum CommandName { SendSigintToPaneId = 171; SendSigkillToPaneId = 172; GetPanePid = 173; + OverrideLayout = 174; + SaveLayout = 175; + DeleteLayout = 176; + EditLayout = 177; + GenerateRandomName = 178; + DumpLayout = 179; + ParseLayout = 180; + RenameLayout = 181; + GetLayoutDir = 182; + GetFocusedPaneInfo = 183; } message PluginCommand { @@ -280,6 +290,17 @@ message PluginCommand { PaneId send_sigint_to_pane_id_payload = 121; PaneId send_sigkill_to_pane_id_payload = 122; GetPanePidPayload get_pane_pid_payload = 123; + OverrideLayoutPayload override_layout_payload = 124; + SaveLayoutPayload save_layout_payload = 125; + DeleteLayoutPayload delete_layout_payload = 126; + EditLayoutPayload edit_layout_payload = 127; + GenerateRandomNamePayload generate_random_name_payload = 128; + DumpLayoutPayload dump_layout_payload = 129; + ParseLayoutPayload parse_layout_payload = 130; + RenameLayoutPayload rename_layout_payload = 131; + GetLayoutDirPayload get_layout_dir_payload = 132; + DumpSessionLayoutPayload dump_session_layout_payload = 133; + GetFocusedPaneInfoPayload get_focused_pane_info_payload = 134; } } @@ -288,6 +309,10 @@ message NewTabPayload { optional string cwd = 2; } +message DumpSessionLayoutPayload { + optional uint32 tab_index = 1; +} + message RunActionPayload { action.Action action = 1; repeated ContextItem context = 2; @@ -755,3 +780,115 @@ message GetPanePidResponse { string error = 2; } } + +message SaveLayoutResponse { + oneof result { + bool success = 1; + string error = 2; + } +} + +message DeleteLayoutResponse { + oneof result { + bool success = 1; + string error = 2; + } +} + +message EditLayoutResponse { + oneof result { + bool success = 1; + string error = 2; + } +} + +message GenerateRandomNameResponse { + string name = 1; +} + +message OverrideLayoutPayload { + event.LayoutInfo layout_info = 1; + repeated ContextItem context = 2; + bool retain_existing_terminal_panes = 3; + bool retain_existing_plugin_panes = 4; + bool apply_only_to_active_tab = 5; +} + +message SaveLayoutPayload { + string layout_name = 1; + string layout_kdl = 2; + bool overwrite = 3; +} + +message DeleteLayoutPayload { + string layout_name = 1; +} + +message EditLayoutPayload { + string layout_name = 1; + repeated ContextItem context = 2; +} + +message GenerateRandomNamePayload {} + +message DumpLayoutPayload { + string layout_name = 1; +} + +message DumpLayoutResponse { + oneof result { + string layout_content = 1; + string error = 2; + } +} + +message DumpSessionLayoutResponse { + oneof result { + string layout_content = 1; + string error = 2; + } + optional api.event.LayoutMetadata metadata = 3; +} + +message ParseLayoutPayload { + string layout_string = 1; +} + +message ParseLayoutResponse { + oneof result { + api.event.LayoutMetadata metadata = 1; + api.event.LayoutParsingError error = 2; + } +} + +message RenameLayoutPayload { + string old_layout_name = 1; + string new_layout_name = 2; +} + +message RenameLayoutResponse { + oneof result { + bool success = 1; + string error = 2; + } +} + +message GetLayoutDirPayload {} + +message GetLayoutDirResponse { + string layout_dir = 1; +} + +message GetFocusedPaneInfoPayload {} + +message GetFocusedPaneInfoResponse { + oneof result { + FocusedPaneInfo focused_pane_info = 1; + string error = 2; + } +} + +message FocusedPaneInfo { + uint32 focused_tab_index = 1; + PaneId focused_pane_id = 2; +} |
