aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2026-03-27 16:23:14 +0100
committerGitHub <noreply@github.com>2026-03-27 16:23:14 +0100
commit802c96f5fca9de479af7c249130a7928bc441349 (patch)
tree8ebf6ef1d535d5e1ea706c823eae589bc0809edd
parentdocs(changelog): riscv64 binaries (diff)
downloadsl0ppij-802c96f5fca9de479af7c249130a7928bc441349.tar.gz
sl0ppij-802c96f5fca9de479af7c249130a7928bc441349.tar.xz
sl0ppij-802c96f5fca9de479af7c249130a7928bc441349.zip
CLI focus-pane-id and are-floating-panes-visible actions (#4926)
* add zellij action focus-pane-id * zellij action are-floating-panes-visible * fix e2e tests * add pr
-rw-r--r--CHANGELOG.md1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__break_panes_to_new_tab_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__break_panes_to_tab_with_index_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__clear_screen_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_focus_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_focused_tab_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_plugin_pane_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_terminal_pane_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__detach_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__edit_layout_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__edit_scrollback_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_next_pane_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_or_create_tab_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_plugin_pane_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_previous_pane_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_terminal_pane_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_next_tab_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_previous_tab_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_tab.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_tab_name_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_focus_or_tab_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_focus_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_pane_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_pane_with_direction_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tab_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command-2.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__next_swap_layout_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_background_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_floating_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_floating_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_floating_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_floating_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__override_layout_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__page_scroll_down_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__page_scroll_up_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__previous_swap_layout_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__quit_zellij_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_plugin_pane_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_tab_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_terminal_pane_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__resize_focused_pane_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__resize_focused_pane_with_direction_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__run_action_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_down_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_to_bottom_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_to_top_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_up_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__send_configuration_to_plugins.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__show_self_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__start_or_reload_plugin.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_with_layout_and_cwd_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_with_layout_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_to_mode_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_active_tab_sync_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_focus_fullscreen_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_pane_embed_or_eject_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_pane_frames_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_tab_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__undo_rename_pane_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__undo_rename_tab_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_chars_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_chars_to_pane_id_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_plugin_command.snap1
-rw-r--r--zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_to_pane_id_plugin_command.snap1
-rw-r--r--zellij-server/src/route.rs44
-rw-r--r--zellij-server/src/screen.rs89
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_default_parameters.snap2
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_line_number.snap2
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_split_direction.snap2
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_in_place_with_close_replaced_pane.snap1
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_launch_or_focus_plugin_action.snap1
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_launch_or_focus_plugin_in_place_with_close_replaced_pane.snap1
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_command_and_cwd.snap2
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_default_parameters.snap2
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_floating_pane_and_coordinates.snap2
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_split_direction.snap2
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_in_place_with_close_replaced_pane.snap1
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_tab_action_with_name_and_layout.snap1
-rw-r--r--zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_query_tab_names_action.snap1
-rw-r--r--zellij-utils/assets/prost/api.action.rs13
-rw-r--r--zellij-utils/assets/prost_ipc/client_server_contract.rs18
-rw-r--r--zellij-utils/src/cli.rs13
-rw-r--r--zellij-utils/src/client_server_contract/common_types.proto6
-rw-r--r--zellij-utils/src/errors.rs1
-rw-r--r--zellij-utils/src/input/actions.rs77
-rw-r--r--zellij-utils/src/ipc/protobuf_conversion.rs25
-rw-r--r--zellij-utils/src/ipc/tests/roundtrip_tests.rs8
-rw-r--r--zellij-utils/src/plugin_api/action.proto6
-rw-r--r--zellij-utils/src/plugin_api/action.rs21
95 files changed, 392 insertions, 19 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index eb59ec93..90401de9 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
* fix: theme folder not being picked up on startup (https://github.com/zellij-org/zellij/pull/4892)
* fix: do not reset selection in session-manager on SessionInfo update (https://github.com/zellij-org/zellij/pull/4919)
* fix: performance regression when switching tabs (https://github.com/zellij-org/zellij/pull/4918)
+* feat: add "focus-pane-with-id" and "are-floating-panes-visible" cli commands (https://github.com/zellij-org/zellij/pull/4926)
* build: add risc64 binaries to releases (https://github.com/zellij-org/zellij/pull/4913)
## [0.44.0] - 2026-03-23
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__break_panes_to_new_tab_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__break_panes_to_new_tab_plugin_command.snap
index 38ce1e9e..e06468a5 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__break_panes_to_new_tab_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__break_panes_to_new_tab_plugin_command.snap
@@ -38,6 +38,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
},
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__break_panes_to_tab_with_index_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__break_panes_to_tab_with_index_plugin_command.snap
index 28c62b2a..522ebdc4 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__break_panes_to_tab_with_index_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__break_panes_to_tab_with_index_plugin_command.snap
@@ -23,6 +23,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
},
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__clear_screen_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__clear_screen_plugin_command.snap
index 7b31ca71..4ebfca38 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__clear_screen_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__clear_screen_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_focus_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_focus_plugin_command.snap
index 2b758c6a..b20e1d1b 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_focus_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_focus_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_focused_tab_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_focused_tab_plugin_command.snap
index b31bd2c5..425b83b9 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_focused_tab_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_focused_tab_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_plugin_pane_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_plugin_pane_plugin_command.snap
index e47bc89b..3ea4cfa6 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_plugin_pane_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_plugin_pane_plugin_command.snap
@@ -16,6 +16,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
None,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_terminal_pane_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_terminal_pane_plugin_command.snap
index d76b1a2f..fdb9f66c 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_terminal_pane_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__close_terminal_pane_plugin_command.snap
@@ -16,6 +16,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
None,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__detach_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__detach_plugin_command.snap
index f42fc911..3c46454c 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__detach_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__detach_plugin_command.snap
@@ -15,6 +15,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__edit_layout_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__edit_layout_plugin_command.snap
index a1a2c63c..e58542d7 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__edit_layout_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__edit_layout_plugin_command.snap
@@ -41,6 +41,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__edit_scrollback_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__edit_scrollback_plugin_command.snap
index 6bc552d1..4daa68e8 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__edit_scrollback_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__edit_scrollback_plugin_command.snap
@@ -14,6 +14,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_next_pane_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_next_pane_plugin_command.snap
index 9c1483ed..71551a65 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_next_pane_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_next_pane_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_or_create_tab_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_or_create_tab_plugin_command.snap
index 413e183a..cb2d7f0d 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_or_create_tab_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_or_create_tab_plugin_command.snap
@@ -22,6 +22,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_plugin_pane_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_plugin_pane_plugin_command.snap
index cba3338c..d8f258f1 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_plugin_pane_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_plugin_pane_plugin_command.snap
@@ -18,6 +18,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_previous_pane_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_previous_pane_plugin_command.snap
index 251e585f..b40eae1c 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_previous_pane_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_previous_pane_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_terminal_pane_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_terminal_pane_plugin_command.snap
index 67166535..f921ca65 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_terminal_pane_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__focus_terminal_pane_plugin_command.snap
@@ -18,6 +18,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_next_tab_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_next_tab_plugin_command.snap
index 50806aec..fda0ffe9 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_next_tab_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_next_tab_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_previous_tab_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_previous_tab_plugin_command.snap
index a82b40a7..80c93ba1 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_previous_tab_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_previous_tab_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_tab.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_tab.snap
index 66727a92..e410d273 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_tab.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_tab.snap
@@ -16,6 +16,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_tab_name_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_tab_name_plugin_command.snap
index 7847f3bd..f7968649 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_tab_name_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__go_to_tab_name_plugin_command.snap
@@ -22,6 +22,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_focus_or_tab_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_focus_or_tab_plugin_command.snap
index a03ad540..5fda023e 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_focus_or_tab_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_focus_or_tab_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_focus_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_focus_plugin_command.snap
index e236fb9b..db1be26c 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_focus_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_focus_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_pane_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_pane_plugin_command.snap
index 0de2f0f9..1c4f356d 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_pane_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_pane_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_pane_with_direction_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_pane_with_direction_plugin_command.snap
index e41284da..efd5921a 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_pane_with_direction_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__move_pane_with_direction_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tab_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tab_plugin_command.snap
index 81b08d6c..3479f894 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tab_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tab_plugin_command.snap
@@ -32,6 +32,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command-2.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command-2.snap
index cd1466ae..69271b74 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command-2.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command-2.snap
@@ -84,6 +84,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command.snap
index eccf2bd0..b650bbf3 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__new_tabs_with_layout_plugin_command.snap
@@ -84,6 +84,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__next_swap_layout_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__next_swap_layout_plugin_command.snap
index c019c09e..60e5a9f2 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__next_swap_layout_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__next_swap_layout_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_background_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_background_plugin_command.snap
index 603deaa8..54aec244 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_background_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_background_plugin_command.snap
@@ -44,6 +44,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
false,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_floating_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_floating_plugin_command.snap
index 6207efb3..184e1ab2 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_floating_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_floating_plugin_command.snap
@@ -42,6 +42,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
false,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_plugin_command.snap
index 3089d85a..343bc4f4 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_command_pane_plugin_command.snap
@@ -43,6 +43,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
false,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_floating_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_floating_plugin_command.snap
index 9c1b42d6..1374c942 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_floating_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_floating_plugin_command.snap
@@ -40,6 +40,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
false,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_plugin_command.snap
index 675cac9a..69dc0b9c 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_plugin_command.snap
@@ -41,6 +41,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
false,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_floating_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_floating_plugin_command.snap
index a98b3e19..bb690528 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_floating_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_floating_plugin_command.snap
@@ -42,6 +42,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
false,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_plugin_command.snap
index aa308679..0aef3509 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_file_with_line_plugin_command.snap
@@ -43,6 +43,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
false,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_floating_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_floating_plugin_command.snap
index a895910a..8d0c52cd 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_floating_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_floating_plugin_command.snap
@@ -35,6 +35,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
false,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_plugin_command.snap
index dfa6bcbf..e6492177 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__open_terminal_plugin_command.snap
@@ -36,6 +36,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
false,
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__override_layout_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__override_layout_plugin_command.snap
index 30e9d8ce..f4d7fae5 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__override_layout_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__override_layout_plugin_command.snap
@@ -2189,6 +2189,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__page_scroll_down_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__page_scroll_down_plugin_command.snap
index b642064f..0f9916ff 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__page_scroll_down_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__page_scroll_down_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__page_scroll_up_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__page_scroll_up_plugin_command.snap
index 5f3a7d70..c08a05fd 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__page_scroll_up_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__page_scroll_up_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__previous_swap_layout_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__previous_swap_layout_plugin_command.snap
index 78bfe2ab..0c268c6b 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__previous_swap_layout_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__previous_swap_layout_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__quit_zellij_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__quit_zellij_plugin_command.snap
index bde1eaee..1ee312ba 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__quit_zellij_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__quit_zellij_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_plugin_pane_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_plugin_pane_plugin_command.snap
index 2c279b00..8c2a3026 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_plugin_pane_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_plugin_pane_plugin_command.snap
@@ -37,6 +37,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_tab_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_tab_plugin_command.snap
index ff67468d..5a4150fb 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_tab_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_tab_plugin_command.snap
@@ -27,6 +27,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_terminal_pane_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_terminal_pane_plugin_command.snap
index b3fb351f..8b31d82d 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_terminal_pane_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__rename_terminal_pane_plugin_command.snap
@@ -39,6 +39,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__resize_focused_pane_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__resize_focused_pane_plugin_command.snap
index 19ecd531..6522869f 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__resize_focused_pane_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__resize_focused_pane_plugin_command.snap
@@ -18,6 +18,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__resize_focused_pane_with_direction_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__resize_focused_pane_with_direction_plugin_command.snap
index 3634bac2..81fc5b59 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__resize_focused_pane_with_direction_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__resize_focused_pane_with_direction_plugin_command.snap
@@ -20,6 +20,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__run_action_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__run_action_plugin_command.snap
index a43ab56a..4e8e98db 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__run_action_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__run_action_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_down_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_down_plugin_command.snap
index 3f536271..ddd1b5b3 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_down_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_down_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_to_bottom_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_to_bottom_plugin_command.snap
index 5b110d01..a8ac60b2 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_to_bottom_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_to_bottom_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_to_top_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_to_top_plugin_command.snap
index a76af090..b9f6c326 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_to_top_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_to_top_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_up_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_up_plugin_command.snap
index c116da80..2f51b4b4 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_up_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__scroll_up_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__send_configuration_to_plugins.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__send_configuration_to_plugins.snap
index b63fe174..e9e3f023 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__send_configuration_to_plugins.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__send_configuration_to_plugins.snap
@@ -22,6 +22,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__show_self_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__show_self_plugin_command.snap
index e9986253..8e1f0931 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__show_self_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__show_self_plugin_command.snap
@@ -18,6 +18,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__start_or_reload_plugin.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__start_or_reload_plugin.snap
index 531c882b..8f21f56b 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__start_or_reload_plugin.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__start_or_reload_plugin.snap
@@ -25,6 +25,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_plugin_command.snap
index 90ad25e0..7a0feaac 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_plugin_command.snap
@@ -24,6 +24,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_with_layout_and_cwd_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_with_layout_and_cwd_plugin_command.snap
index 0fab6fed..688e654e 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_with_layout_and_cwd_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_with_layout_and_cwd_plugin_command.snap
@@ -28,6 +28,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_with_layout_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_with_layout_plugin_command.snap
index 056365a7..d74fedd8 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_with_layout_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_session_with_layout_plugin_command.snap
@@ -28,6 +28,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_to_mode_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_to_mode_plugin_command.snap
index 6180f6fa..d8c94ff0 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_to_mode_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__switch_to_mode_plugin_command.snap
@@ -334,6 +334,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_active_tab_sync_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_active_tab_sync_plugin_command.snap
index 69d8616b..5219829b 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_active_tab_sync_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_active_tab_sync_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_focus_fullscreen_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_focus_fullscreen_plugin_command.snap
index e2998b4d..a86344f3 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_focus_fullscreen_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_focus_fullscreen_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_pane_embed_or_eject_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_pane_embed_or_eject_plugin_command.snap
index f8fc7c47..74eccdcf 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_pane_embed_or_eject_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_pane_embed_or_eject_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_pane_frames_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_pane_frames_plugin_command.snap
index 86104bb4..581c6295 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_pane_frames_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_pane_frames_plugin_command.snap
@@ -12,6 +12,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_tab_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_tab_plugin_command.snap
index 2c355cb5..064b990c 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_tab_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__toggle_tab_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__undo_rename_pane_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__undo_rename_pane_plugin_command.snap
index 870abd96..1258d042 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__undo_rename_pane_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__undo_rename_pane_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__undo_rename_tab_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__undo_rename_tab_plugin_command.snap
index fc24b7f8..c2acf40a 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__undo_rename_tab_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__undo_rename_tab_plugin_command.snap
@@ -13,6 +13,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_chars_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_chars_plugin_command.snap
index 0a7ab0e9..f603bed8 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_chars_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_chars_plugin_command.snap
@@ -20,6 +20,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_chars_to_pane_id_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_chars_to_pane_id_plugin_command.snap
index 9c071f78..82128264 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_chars_to_pane_id_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_chars_to_pane_id_plugin_command.snap
@@ -21,6 +21,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_plugin_command.snap
index 0a7ab0e9..f603bed8 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_plugin_command.snap
@@ -20,6 +20,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_to_pane_id_plugin_command.snap b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_to_pane_id_plugin_command.snap
index 1ee5dfad..fbfadfb4 100644
--- a/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_to_pane_id_plugin_command.snap
+++ b/zellij-server/src/plugins/unit/snapshots/zellij_server__plugins__plugin_tests__write_to_pane_id_plugin_command.snap
@@ -20,6 +20,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/route.rs b/zellij-server/src/route.rs
index 97b0689b..dde7ebc6 100644
--- a/zellij-server/src/route.rs
+++ b/zellij-server/src/route.rs
@@ -46,6 +46,7 @@ pub struct ActionCompletionResult {
pub affected_pane_id: Option<PaneId>,
pub affected_tab_id: Option<usize>,
pub error_message: Option<String>,
+ pub stdout_message: Option<String>,
}
pub fn wait_for_action_completion(
@@ -65,6 +66,7 @@ pub fn wait_for_action_completion(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
}
},
}
@@ -85,6 +87,7 @@ pub fn wait_for_action_completion(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
}
},
}
@@ -105,6 +108,7 @@ pub struct NotificationEnd {
affected_pane_id: Option<PaneId>, // optional payload of the pane id affected by this action
affected_tab_id: Option<usize>, // optional payload of the tab id affected by this action
error_message: Option<String>,
+ stdout_message: Option<String>,
}
impl Clone for NotificationEnd {
@@ -117,6 +121,7 @@ impl Clone for NotificationEnd {
affected_pane_id: self.affected_pane_id,
affected_tab_id: self.affected_tab_id,
error_message: self.error_message.clone(),
+ stdout_message: self.stdout_message.clone(),
}
}
}
@@ -130,6 +135,7 @@ impl NotificationEnd {
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
}
}
@@ -144,6 +150,7 @@ impl NotificationEnd {
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
}
}
@@ -163,6 +170,10 @@ impl NotificationEnd {
self.error_message = Some(message);
}
+ pub fn set_stdout_message(&mut self, message: String) {
+ self.stdout_message = Some(message);
+ }
+
pub fn unblock_condition(&self) -> Option<UnblockCondition> {
self.unblock_condition
}
@@ -176,6 +187,7 @@ impl Drop for NotificationEnd {
affected_pane_id: self.affected_pane_id,
affected_tab_id: self.affected_tab_id,
error_message: self.error_message.take(),
+ stdout_message: self.stdout_message.take(),
};
let _ = tx.send(result);
}
@@ -369,6 +381,17 @@ pub(crate) fn route_action(
))
.with_context(err_context)?;
},
+ Action::FocusPaneByPaneId { pane_id } => {
+ senders
+ .send_to_screen(ScreenInstruction::FocusPaneWithId(
+ pane_id.into(),
+ true, // should_float_if_hidden
+ false, // should_be_in_place_if_hidden
+ client_id,
+ Some(NotificationEnd::new(completion_tx)),
+ ))
+ .with_context(err_context)?;
+ },
Action::MoveFocus { direction } => {
let notification_end = Some(NotificationEnd::new(completion_tx));
@@ -1791,6 +1814,15 @@ pub(crate) fn route_action(
})
.with_context(err_context)?;
},
+ Action::AreFloatingPanesVisible { tab_id } => {
+ senders
+ .send_to_screen(ScreenInstruction::AreFloatingPanesVisible {
+ client_id,
+ tab_id,
+ completion: Some(NotificationEnd::new(completion_tx)),
+ })
+ .with_context(err_context)?;
+ },
// Pane-targeting CLI-only variants
Action::ScrollUpByPaneId { pane_id } => {
senders
@@ -2017,6 +2049,17 @@ pub(crate) fn route_action(
);
}
}
+ } else if let Some(stdout_message) = &result.stdout_message {
+ if let Some(cli_client_id) = cli_client_id {
+ if let Some(ref os_input) = os_input {
+ let _ = os_input.send_to_client(
+ cli_client_id,
+ ServerToClientMsg::Log {
+ lines: vec![stdout_message.clone()],
+ },
+ );
+ }
+ }
} else if let Some(exit_status) = result.exit_status {
if let Some(cli_client_id) = cli_client_id {
if let Some(ref os_input) = os_input {
@@ -3080,6 +3123,7 @@ mod tests {
affected_pane_id: None,
affected_tab_id: Some(123),
error_message: None,
+ stdout_message: None,
};
assert_eq!(result.affected_tab_id, Some(123));
diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs
index b74472c4..f68bf533 100644
--- a/zellij-server/src/screen.rs
+++ b/zellij-server/src/screen.rs
@@ -274,6 +274,11 @@ pub enum ScreenInstruction {
tab_id: Option<usize>,
completion: Option<NotificationEnd>,
},
+ AreFloatingPanesVisible {
+ client_id: ClientId,
+ tab_id: Option<usize>,
+ completion: Option<NotificationEnd>,
+ },
WriteCharacter(
Option<KeyWithModifier>,
Vec<u8>,
@@ -748,6 +753,9 @@ impl From<&ScreenInstruction> for ScreenContext {
ScreenInstruction::ToggleFloatingPanes(..) => ScreenContext::ToggleFloatingPanes,
ScreenInstruction::ShowFloatingPanes { .. } => ScreenContext::ShowFloatingPanes,
ScreenInstruction::HideFloatingPanes { .. } => ScreenContext::HideFloatingPanes,
+ ScreenInstruction::AreFloatingPanesVisible { .. } => {
+ ScreenContext::AreFloatingPanesVisible
+ },
ScreenInstruction::WriteCharacter(..) => ScreenContext::WriteCharacter,
ScreenInstruction::Resize(.., strategy, _) => match strategy {
ResizeStrategy {
@@ -2263,6 +2271,39 @@ impl Screen {
Ok(())
}
+ pub fn are_floating_panes_visible_in_tab(
+ &self,
+ client_id: ClientId,
+ tab_id: Option<usize>,
+ completion: Option<NotificationEnd>,
+ ) -> Result<()> {
+ let tab = match tab_id {
+ Some(id) => self.tabs.get(&id),
+ None => self.get_active_tab(client_id).ok(),
+ };
+ let mut completion = completion;
+ match tab {
+ None => {
+ if let Some(c) = completion.as_mut() {
+ c.set_error_message("Tab not found".to_string());
+ }
+ },
+ Some(tab) => {
+ if tab.are_floating_panes_visible() {
+ if let Some(c) = completion.as_mut() {
+ c.set_stdout_message("true".to_string());
+ }
+ } else {
+ if let Some(c) = completion.as_mut() {
+ c.set_error_message("false".to_string());
+ }
+ }
+ },
+ }
+ drop(completion);
+ Ok(())
+ }
+
/// Creates a new [`Tab`] in this [`Screen`]
pub fn new_tab(
&mut self,
@@ -5143,6 +5184,13 @@ pub(crate) fn screen_thread_main(
screen.log_and_report_session_state()?;
screen.render(None)?;
},
+ ScreenInstruction::AreFloatingPanesVisible {
+ client_id,
+ tab_id,
+ completion,
+ } => {
+ screen.are_floating_panes_visible_in_tab(client_id, tab_id, completion)?;
+ },
ScreenInstruction::WriteCharacter(
key_with_modifier,
raw_bytes,
@@ -7405,17 +7453,38 @@ pub(crate) fn screen_thread_main(
should_float_if_hidden,
should_be_in_place_if_hidden,
client_id,
- _completion_tx, // the action ends here, dropping this will release anything
- // waiting for it
+ mut completion_tx,
) => {
- screen.focus_pane_with_id(
- pane_id,
- should_float_if_hidden,
- should_be_in_place_if_hidden,
- client_id,
- )?;
- screen.clear_bell_for_pane_id(pane_id, client_id);
- screen.log_and_report_session_state()?;
+ let pane_exists = screen
+ .tabs
+ .iter()
+ .any(|(_, tab)| tab.has_pane_with_pid(&pane_id));
+ if !pane_exists {
+ if let Some(c) = completion_tx.as_mut() {
+ c.set_exit_status(1);
+ c.set_error_message(format!("Pane with id {:?} not found", pane_id));
+ }
+ } else {
+ let already_focused = screen
+ .get_active_pane_id(&client_id)
+ .map(|active| active == pane_id)
+ .unwrap_or(false);
+ if already_focused {
+ if let Some(c) = completion_tx.as_mut() {
+ c.set_exit_status(1);
+ c.set_error_message(format!("Pane {:?} is already focused", pane_id));
+ }
+ } else {
+ screen.focus_pane_with_id(
+ pane_id,
+ should_float_if_hidden,
+ should_be_in_place_if_hidden,
+ client_id,
+ )?;
+ screen.clear_bell_for_pane_id(pane_id, client_id);
+ screen.log_and_report_session_state()?;
+ }
+ }
},
ScreenInstruction::RenamePane(
pane_id,
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_default_parameters.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_default_parameters.snap
index 742f2480..8996ded8 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_default_parameters.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_default_parameters.snap
@@ -2,4 +2,4 @@
source: zellij-server/src/./unit/screen_tests.rs
expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())"
---
-[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: None, cwd: Some("."), originating_plugin: None })), Some("Editing: /file/to/edit"), Tiled { direction: None, borderless: None }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None, affected_tab_id: None, error_message: None }), false), Exit]
+[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: None, cwd: Some("."), originating_plugin: None })), Some("Editing: /file/to/edit"), Tiled { direction: None, borderless: None }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None, affected_tab_id: None, error_message: None, stdout_message: None }), false), Exit]
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_line_number.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_line_number.snap
index 21195f58..2866060b 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_line_number.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_line_number.snap
@@ -2,4 +2,4 @@
source: zellij-server/src/./unit/screen_tests.rs
expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())"
---
-[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: Some(100), cwd: Some("."), originating_plugin: None })), Some("Editing: /file/to/edit"), Tiled { direction: None, borderless: None }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None, affected_tab_id: None, error_message: None }), false), Exit]
+[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: Some(100), cwd: Some("."), originating_plugin: None })), Some("Editing: /file/to/edit"), Tiled { direction: None, borderless: None }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None, affected_tab_id: None, error_message: None, stdout_message: None }), false), Exit]
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_split_direction.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_split_direction.snap
index 21f4b55d..036f62bf 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_split_direction.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_action_with_split_direction.snap
@@ -2,4 +2,4 @@
source: zellij-server/src/./unit/screen_tests.rs
expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())"
---
-[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: None, cwd: Some("."), originating_plugin: None })), Some("Editing: /file/to/edit"), Tiled { direction: Some(Down), borderless: None }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None, affected_tab_id: None, error_message: None }), false), Exit]
+[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(OpenFile(OpenFilePayload { path: "/file/to/edit", line_number: None, cwd: Some("."), originating_plugin: None })), Some("Editing: /file/to/edit"), Tiled { direction: Some(Down), borderless: None }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None, affected_tab_id: None, error_message: None, stdout_message: None }), false), Exit]
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_in_place_with_close_replaced_pane.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_in_place_with_close_replaced_pane.snap
index bece1bab..dc48e276 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_in_place_with_close_replaced_pane.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_edit_in_place_with_close_replaced_pane.snap
@@ -31,6 +31,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_launch_or_focus_plugin_action.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_launch_or_focus_plugin_action.snap
index 3c2a1097..a0da95d7 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_launch_or_focus_plugin_action.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_launch_or_focus_plugin_action.snap
@@ -41,6 +41,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_launch_or_focus_plugin_in_place_with_close_replaced_pane.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_launch_or_focus_plugin_in_place_with_close_replaced_pane.snap
index 44c00845..e1adbe20 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_launch_or_focus_plugin_in_place_with_close_replaced_pane.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_launch_or_focus_plugin_in_place_with_close_replaced_pane.snap
@@ -41,6 +41,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_command_and_cwd.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_command_and_cwd.snap
index 7434e18c..43dd40d1 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_command_and_cwd.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_command_and_cwd.snap
@@ -2,4 +2,4 @@
source: zellij-server/src/./unit/screen_tests.rs
expression: "format!(\"{:?}\", new_pane_instruction)"
---
-Some(SpawnTerminal(Some(RunCommand(RunCommand { command: "htop", args: [], cwd: Some("/some/folder"), hold_on_close: true, hold_on_start: false, originating_plugin: None, use_terminal_title: false })), None, Tiled { direction: Some(Right), borderless: Some(false) }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None, affected_tab_id: None, error_message: None }), false))
+Some(SpawnTerminal(Some(RunCommand(RunCommand { command: "htop", args: [], cwd: Some("/some/folder"), hold_on_close: true, hold_on_start: false, originating_plugin: None, use_terminal_title: false })), None, Tiled { direction: Some(Right), borderless: Some(false) }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None, affected_tab_id: None, error_message: None, stdout_message: None }), false))
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_default_parameters.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_default_parameters.snap
index 0e62cd90..433f4d93 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_default_parameters.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_default_parameters.snap
@@ -2,4 +2,4 @@
source: zellij-server/src/./unit/screen_tests.rs
expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())"
---
-[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(None, None, Tiled { direction: None, borderless: Some(false) }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None, affected_tab_id: None, error_message: None }), false), Exit]
+[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(None, None, Tiled { direction: None, borderless: Some(false) }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None, affected_tab_id: None, error_message: None, stdout_message: None }), false), Exit]
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_floating_pane_and_coordinates.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_floating_pane_and_coordinates.snap
index c9efed6d..f33730b2 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_floating_pane_and_coordinates.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_floating_pane_and_coordinates.snap
@@ -2,4 +2,4 @@
source: zellij-server/src/./unit/screen_tests.rs
expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())"
---
-[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(RunCommand(RunCommand { command: "htop", args: [], cwd: Some("/some/folder"), hold_on_close: true, hold_on_start: false, originating_plugin: None, use_terminal_title: false })), None, Floating(Some(FloatingPaneCoordinates { x: Some(Fixed(10)), y: None, width: Some(Percent(20)), height: None, pinned: None, borderless: Some(false) })), false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None, affected_tab_id: None, error_message: None }), false), Exit]
+[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(Some(RunCommand(RunCommand { command: "htop", args: [], cwd: Some("/some/folder"), hold_on_close: true, hold_on_start: false, originating_plugin: None, use_terminal_title: false })), None, Floating(Some(FloatingPaneCoordinates { x: Some(Fixed(10)), y: None, width: Some(Percent(20)), height: None, pinned: None, borderless: Some(false) })), false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None, affected_tab_id: None, error_message: None, stdout_message: None }), false), Exit]
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_split_direction.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_split_direction.snap
index 2ebc8665..1aebde3e 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_split_direction.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_action_with_split_direction.snap
@@ -2,4 +2,4 @@
source: zellij-server/src/./unit/screen_tests.rs
expression: "format!(\"{:?}\", *received_pty_instructions.lock().unwrap())"
---
-[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(None, None, Tiled { direction: Some(Right), borderless: Some(false) }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None, affected_tab_id: None, error_message: None }), false), Exit]
+[UpdateActivePane(Some(Terminal(0)), 1), UpdateActivePane(Some(Terminal(0)), 1), SpawnTerminal(None, None, Tiled { direction: Some(Right), borderless: Some(false) }, false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: None, affected_tab_id: None, error_message: None, stdout_message: None }), false), Exit]
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_in_place_with_close_replaced_pane.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_in_place_with_close_replaced_pane.snap
index fbdfc98c..06b8080f 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_in_place_with_close_replaced_pane.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_pane_in_place_with_close_replaced_pane.snap
@@ -32,6 +32,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_tab_action_with_name_and_layout.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_tab_action_with_name_and_layout.snap
index 2277cd57..efad1fca 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_tab_action_with_name_and_layout.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_tab_action_with_name_and_layout.snap
@@ -113,6 +113,7 @@ NewTab(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
)
diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_query_tab_names_action.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_query_tab_names_action.snap
index de7276ab..57cc8612 100644
--- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_query_tab_names_action.snap
+++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_query_tab_names_action.snap
@@ -17,6 +17,7 @@ Some(
affected_pane_id: None,
affected_tab_id: None,
error_message: None,
+ stdout_message: None,
},
),
),
diff --git a/zellij-utils/assets/prost/api.action.rs b/zellij-utils/assets/prost/api.action.rs
index 2849f268..267b900c 100644
--- a/zellij-utils/assets/prost/api.action.rs
+++ b/zellij-utils/assets/prost/api.action.rs
@@ -302,7 +302,7 @@ pub struct OverrideLayoutPayload {
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, 53, 54, 55, 56, 57, 58, 59")]
+ #[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, 54, 55, 56, 57, 58, 59, 60")]
pub optional_payload: ::core::option::Option<action::OptionalPayload>,
}
/// Nested message and enum types in `Action`.
@@ -420,6 +420,8 @@ pub mod action {
ShowFloatingPanesPayload(super::ShowFloatingPanesPayload),
#[prost(message, tag="59")]
HideFloatingPanesPayload(super::HideFloatingPanesPayload),
+ #[prost(message, tag="60")]
+ AreFloatingPanesVisiblePayload(super::AreFloatingPanesVisiblePayload),
}
}
#[allow(clippy::derive_partial_eq_without_eq)]
@@ -464,6 +466,12 @@ pub struct HideFloatingPanesPayload {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
+pub struct AreFloatingPanesVisiblePayload {
+ #[prost(uint32, optional, tag="1")]
+ pub tab_id: ::core::option::Option<u32>,
+}
+#[allow(clippy::derive_partial_eq_without_eq)]
+#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PaneIdAndShouldFloat {
#[prost(uint32, tag="1")]
pub pane_id: u32,
@@ -1108,6 +1116,7 @@ pub enum ActionName {
RenameTabById = 97,
ShowFloatingPanes = 98,
HideFloatingPanes = 99,
+ AreFloatingPanesVisible = 100,
}
impl ActionName {
/// String value of the enum field names used in the ProtoBuf definition.
@@ -1213,6 +1222,7 @@ impl ActionName {
ActionName::RenameTabById => "RenameTabById",
ActionName::ShowFloatingPanes => "ShowFloatingPanes",
ActionName::HideFloatingPanes => "HideFloatingPanes",
+ ActionName::AreFloatingPanesVisible => "AreFloatingPanesVisible",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -1315,6 +1325,7 @@ impl ActionName {
"RenameTabById" => Some(Self::RenameTabById),
"ShowFloatingPanes" => Some(Self::ShowFloatingPanes),
"HideFloatingPanes" => Some(Self::HideFloatingPanes),
+ "AreFloatingPanesVisible" => Some(Self::AreFloatingPanesVisible),
_ => None,
}
}
diff --git a/zellij-utils/assets/prost_ipc/client_server_contract.rs b/zellij-utils/assets/prost_ipc/client_server_contract.rs
index 4d305e00..472b35fd 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")]
+ #[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")]
pub action_type: ::core::option::Option<action::ActionType>,
}
/// Nested message and enum types in `Action`.
@@ -397,6 +397,10 @@ pub mod action {
NextSwapLayoutByTabId(super::NextSwapLayoutByTabIdAction),
#[prost(message, tag="134")]
MoveTabByTabId(super::MoveTabByTabIdAction),
+ #[prost(message, tag="135")]
+ FocusPaneByPaneId(super::FocusPaneByPaneIdAction),
+ #[prost(message, tag="136")]
+ AreFloatingPanesVisible(super::AreFloatingPanesVisibleAction),
}
}
// Action message definitions (all 92 variants)
@@ -506,6 +510,12 @@ pub struct HideFloatingPanesAction {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
+pub struct AreFloatingPanesVisibleAction {
+ #[prost(uint32, optional, tag="1")]
+ pub tab_id: ::core::option::Option<u32>,
+}
+#[allow(clippy::derive_partial_eq_without_eq)]
+#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CloseFocusAction {
}
#[allow(clippy::derive_partial_eq_without_eq)]
@@ -2019,6 +2029,12 @@ pub struct TogglePanePinnedByPaneIdAction {
#[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 FocusPaneByPaneIdAction {
+ #[prost(message, optional, tag="1")]
+ pub pane_id: ::core::option::Option<PaneId>,
+}
/// Tab-targeting action messages
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
diff --git a/zellij-utils/src/cli.rs b/zellij-utils/src/cli.rs
index cb436da6..12117265 100644
--- a/zellij-utils/src/cli.rs
+++ b/zellij-utils/src/cli.rs
@@ -735,6 +735,11 @@ pub enum CliAction {
FocusNextPane,
/// Change focus to the previous pane
FocusPreviousPane,
+ /// Focus a specific pane by its ID
+ FocusPaneId {
+ /// The pane_id of the pane, eg. terminal_1, plugin_2 or 3
+ pane_id: String,
+ },
/// Move the focused pane in the specified direction. [right|left|up|down]
MoveFocus {
direction: Direction,
@@ -1101,6 +1106,14 @@ pub enum CliAction {
#[clap(short, long, value_parser)]
tab_id: Option<usize>,
},
+ /// Check if floating panes are visible in the specified tab (or active tab).
+ ///
+ /// Prints "true" to stdout and exits 0 if visible.
+ /// Prints "false" to stdout and exits 1 if not visible.
+ AreFloatingPanesVisible {
+ #[clap(short, long, value_parser)]
+ tab_id: Option<usize>,
+ },
/// Close the focused pane.
ClosePane {
/// Target a specific pane by ID (eg. terminal_1, plugin_2, or 3)
diff --git a/zellij-utils/src/client_server_contract/common_types.proto b/zellij-utils/src/client_server_contract/common_types.proto
index 864083b7..6a6f211c 100644
--- a/zellij-utils/src/client_server_contract/common_types.proto
+++ b/zellij-utils/src/client_server_contract/common_types.proto
@@ -272,6 +272,8 @@ message Action {
PreviousSwapLayoutByTabIdAction previous_swap_layout_by_tab_id = 132;
NextSwapLayoutByTabIdAction next_swap_layout_by_tab_id = 133;
MoveTabByTabIdAction move_tab_by_tab_id = 134;
+ FocusPaneByPaneIdAction focus_pane_by_pane_id = 135;
+ AreFloatingPanesVisibleAction are_floating_panes_visible = 136;
}
}
@@ -308,6 +310,9 @@ message ShowFloatingPanesAction {
message HideFloatingPanesAction {
optional uint32 tab_id = 1;
}
+message AreFloatingPanesVisibleAction {
+ optional uint32 tab_id = 1;
+}
message CloseFocusAction {}
message UndoRenamePaneAction {}
message NoOpAction {}
@@ -1200,6 +1205,7 @@ message CloseFocusByPaneIdAction { PaneId pane_id = 1; }
message RenamePaneByPaneIdAction { PaneId pane_id = 1; bytes name = 2; }
message UndoRenamePaneByPaneIdAction { PaneId pane_id = 1; }
message TogglePanePinnedByPaneIdAction { PaneId pane_id = 1; }
+message FocusPaneByPaneIdAction { PaneId pane_id = 1; }
// Tab-targeting action messages
message UndoRenameTabByTabIdAction { uint64 id = 1; }
diff --git a/zellij-utils/src/errors.rs b/zellij-utils/src/errors.rs
index 324fae33..1658310e 100644
--- a/zellij-utils/src/errors.rs
+++ b/zellij-utils/src/errors.rs
@@ -222,6 +222,7 @@ pub enum ScreenContext {
ToggleFloatingPanes,
ShowFloatingPanes,
HideFloatingPanes,
+ AreFloatingPanesVisible,
TogglePaneEmbedOrFloating,
HorizontalSplit,
VerticalSplit,
diff --git a/zellij-utils/src/input/actions.rs b/zellij-utils/src/input/actions.rs
index 4fcdfbb1..6dda2b7e 100644
--- a/zellij-utils/src/input/actions.rs
+++ b/zellij-utils/src/input/actions.rs
@@ -289,6 +289,10 @@ pub enum Action {
HideFloatingPanes {
tab_id: Option<usize>,
},
+ /// Check if floating panes are visible in the specified tab (or active tab if tab_id is None)
+ AreFloatingPanesVisible {
+ tab_id: Option<usize>,
+ },
/// Close the focus pane.
CloseFocus,
PaneNameInput {
@@ -603,6 +607,9 @@ pub enum Action {
TogglePanePinnedByPaneId {
pane_id: PaneId,
},
+ FocusPaneByPaneId {
+ pane_id: PaneId,
+ },
// Tab-targeting CLI-only variants
UndoRenameTabByTabId {
id: u64,
@@ -796,6 +803,13 @@ impl Action {
},
CliAction::FocusNextPane => Ok(vec![Action::FocusNextPane]),
CliAction::FocusPreviousPane => Ok(vec![Action::FocusPreviousPane]),
+ CliAction::FocusPaneId { pane_id } => {
+ let pane_id = PaneId::from_str(&pane_id)
+ .map_err(|_| format!(
+ "Malformed pane id: {pane_id}, expecting either a bare integer (eg. 1), a terminal pane id (eg. terminal_1) or a plugin pane id (eg. plugin_1)"
+ ))?;
+ Ok(vec![Action::FocusPaneByPaneId { pane_id }])
+ },
CliAction::MoveFocus { direction } => Ok(vec![Action::MoveFocus { direction }]),
CliAction::MoveFocusOrTab { direction } => {
Ok(vec![Action::MoveFocusOrTab { direction }])
@@ -1270,6 +1284,9 @@ impl Action {
CliAction::HideFloatingPanes { tab_id } => {
Ok(vec![Action::HideFloatingPanes { tab_id }])
},
+ CliAction::AreFloatingPanesVisible { tab_id } => {
+ Ok(vec![Action::AreFloatingPanesVisible { tab_id }])
+ },
CliAction::ClosePane { pane_id } => match pane_id {
Some(pane_id_str) => {
let pane_id = PaneId::from_str(&pane_id_str)
@@ -3100,4 +3117,64 @@ mod tests {
_ => panic!("Expected DumpScreen action"),
}
}
+
+ #[test]
+ fn test_focus_pane_id() {
+ let cli_action = CliAction::FocusPaneId {
+ pane_id: "terminal_7".to_string(),
+ };
+ let result = Action::actions_from_cli(cli_action, Box::new(|| PathBuf::from("/tmp")), None);
+ assert!(result.is_ok());
+ let actions = result.unwrap();
+ assert_eq!(actions.len(), 1);
+ match &actions[0] {
+ Action::FocusPaneByPaneId { pane_id } => {
+ assert!(matches!(pane_id, PaneId::Terminal(7)));
+ },
+ _ => panic!("Expected FocusPaneByPaneId action"),
+ }
+ }
+
+ #[test]
+ fn test_focus_pane_id_bare_int() {
+ let cli_action = CliAction::FocusPaneId {
+ pane_id: "3".to_string(),
+ };
+ let result = Action::actions_from_cli(cli_action, Box::new(|| PathBuf::from("/tmp")), None);
+ assert!(result.is_ok());
+ let actions = result.unwrap();
+ assert_eq!(actions.len(), 1);
+ match &actions[0] {
+ Action::FocusPaneByPaneId { pane_id } => {
+ assert!(matches!(pane_id, PaneId::Terminal(3)));
+ },
+ _ => panic!("Expected FocusPaneByPaneId action"),
+ }
+ }
+
+ #[test]
+ fn test_focus_pane_id_plugin() {
+ let cli_action = CliAction::FocusPaneId {
+ pane_id: "plugin_2".to_string(),
+ };
+ let result = Action::actions_from_cli(cli_action, Box::new(|| PathBuf::from("/tmp")), None);
+ assert!(result.is_ok());
+ let actions = result.unwrap();
+ assert_eq!(actions.len(), 1);
+ match &actions[0] {
+ Action::FocusPaneByPaneId { pane_id } => {
+ assert!(matches!(pane_id, PaneId::Plugin(2)));
+ },
+ _ => panic!("Expected FocusPaneByPaneId action"),
+ }
+ }
+
+ #[test]
+ fn test_focus_pane_id_malformed() {
+ let cli_action = CliAction::FocusPaneId {
+ pane_id: "invalid_id".to_string(),
+ };
+ let result = Action::actions_from_cli(cli_action, Box::new(|| PathBuf::from("/tmp")), None);
+ assert!(result.is_err());
+ }
}
diff --git a/zellij-utils/src/ipc/protobuf_conversion.rs b/zellij-utils/src/ipc/protobuf_conversion.rs
index 725592c7..093cff4e 100644
--- a/zellij-utils/src/ipc/protobuf_conversion.rs
+++ b/zellij-utils/src/ipc/protobuf_conversion.rs
@@ -784,6 +784,7 @@ impl From<crate::input::actions::Action>
fn from(action: crate::input::actions::Action) -> Self {
use crate::client_server_contract::client_server_contract::{
action::ActionType,
+ AreFloatingPanesVisibleAction,
BreakPaneAction,
BreakPaneLeftAction,
BreakPaneRightAction,
@@ -808,6 +809,7 @@ impl From<crate::input::actions::Action>
EditScrollbackAction,
EditScrollbackByPaneIdAction,
FocusNextPaneAction,
+ FocusPaneByPaneIdAction,
FocusPluginPaneWithIdAction,
FocusPreviousPaneAction,
FocusTerminalPaneWithIdAction,
@@ -1168,6 +1170,11 @@ impl From<crate::input::actions::Action>
tab_id: tab_id.map(|id| id as u32),
})
},
+ crate::input::actions::Action::AreFloatingPanesVisible { tab_id } => {
+ ActionType::AreFloatingPanesVisible(AreFloatingPanesVisibleAction {
+ tab_id: tab_id.map(|id| id as u32),
+ })
+ },
crate::input::actions::Action::CloseFocus => {
ActionType::CloseFocus(CloseFocusAction {})
},
@@ -1689,6 +1696,11 @@ impl From<crate::input::actions::Action>
pane_id: Some(pane_id.into()),
})
},
+ crate::input::actions::Action::FocusPaneByPaneId { pane_id } => {
+ ActionType::FocusPaneByPaneId(FocusPaneByPaneIdAction {
+ pane_id: Some(pane_id.into()),
+ })
+ },
// Tab-targeting CLI-only variants
crate::input::actions::Action::UndoRenameTabByTabId { id } => {
ActionType::UndoRenameTabByTabId(UndoRenameTabByTabIdAction { id })
@@ -1979,6 +1991,11 @@ impl TryFrom<crate::client_server_contract::client_server_contract::Action>
tab_id: a.tab_id.map(|id| id as usize),
})
},
+ ActionType::AreFloatingPanesVisible(a) => {
+ Ok(crate::input::actions::Action::AreFloatingPanesVisible {
+ tab_id: a.tab_id.map(|id| id as usize),
+ })
+ },
ActionType::CloseFocus(_) => Ok(crate::input::actions::Action::CloseFocus),
ActionType::PaneNameInput(pane_name_action) => {
Ok(crate::input::actions::Action::PaneNameInput {
@@ -2593,6 +2610,14 @@ impl TryFrom<crate::client_server_contract::client_server_contract::Action>
.try_into()?,
})
},
+ ActionType::FocusPaneByPaneId(a) => {
+ Ok(crate::input::actions::Action::FocusPaneByPaneId {
+ pane_id: a
+ .pane_id
+ .ok_or_else(|| anyhow!("FocusPaneByPaneId missing pane_id"))?
+ .try_into()?,
+ })
+ },
// Tab-targeting CLI-only variants
ActionType::UndoRenameTabByTabId(a) => {
Ok(crate::input::actions::Action::UndoRenameTabByTabId { id: a.id })
diff --git a/zellij-utils/src/ipc/tests/roundtrip_tests.rs b/zellij-utils/src/ipc/tests/roundtrip_tests.rs
index 78e68f52..cfe882a1 100644
--- a/zellij-utils/src/ipc/tests/roundtrip_tests.rs
+++ b/zellij-utils/src/ipc/tests/roundtrip_tests.rs
@@ -3295,6 +3295,14 @@ fn test_client_messages() {
client_id: Some(100),
is_cli_client: true,
});
+ test_client_roundtrip!(ClientToServerMsg::Action {
+ action: Action::FocusPaneByPaneId {
+ pane_id: PaneId::Terminal(1),
+ },
+ terminal_id: Some(1),
+ client_id: Some(100),
+ is_cli_client: true,
+ });
// Tab-targeting roundtrips
test_client_roundtrip!(ClientToServerMsg::Action {
action: Action::UndoRenameTabByTabId { id: 5 },
diff --git a/zellij-utils/src/plugin_api/action.proto b/zellij-utils/src/plugin_api/action.proto
index 5f92ad94..ea043d56 100644
--- a/zellij-utils/src/plugin_api/action.proto
+++ b/zellij-utils/src/plugin_api/action.proto
@@ -244,6 +244,7 @@ message Action {
TabIdAndName rename_tab_by_id_payload = 57;
ShowFloatingPanesPayload show_floating_panes_payload = 58;
HideFloatingPanesPayload hide_floating_panes_payload = 59;
+ AreFloatingPanesVisiblePayload are_floating_panes_visible_payload = 60;
}
}
@@ -272,6 +273,10 @@ message HideFloatingPanesPayload {
optional uint32 tab_id = 1;
}
+message AreFloatingPanesVisiblePayload {
+ optional uint32 tab_id = 1;
+}
+
message PaneIdAndShouldFloat {
uint32 pane_id = 1;
bool should_float = 2;
@@ -484,6 +489,7 @@ enum ActionName {
RenameTabById = 97;
ShowFloatingPanes = 98;
HideFloatingPanes = 99;
+ AreFloatingPanesVisible = 100;
}
message Position {
diff --git a/zellij-utils/src/plugin_api/action.rs b/zellij-utils/src/plugin_api/action.rs
index 93d0a556..4384eb68 100644
--- a/zellij-utils/src/plugin_api/action.rs
+++ b/zellij-utils/src/plugin_api/action.rs
@@ -7,6 +7,7 @@ pub use super::generated_api::api::{
run_plugin_or_alias::PluginType,
Action as ProtobufAction,
ActionName as ProtobufActionName,
+ AreFloatingPanesVisiblePayload,
BareKey as ProtobufBareKey,
// New layout-related types
CommandOrPlugin as ProtobufCommandOrPlugin,
@@ -424,6 +425,17 @@ impl TryFrom<ProtobufAction> for Action {
None => Ok(Action::HideFloatingPanes { tab_id: None }),
_ => Err("Wrong payload for HideFloatingPanes"),
},
+ Some(ProtobufActionName::AreFloatingPanesVisible) => {
+ match protobuf_action.optional_payload {
+ Some(OptionalPayload::AreFloatingPanesVisiblePayload(payload)) => {
+ Ok(Action::AreFloatingPanesVisible {
+ tab_id: payload.tab_id.map(|id| id as usize),
+ })
+ },
+ None => Ok(Action::AreFloatingPanesVisible { tab_id: None }),
+ _ => Err("Wrong payload for AreFloatingPanesVisible"),
+ }
+ },
Some(ProtobufActionName::CloseFocus) => match protobuf_action.optional_payload {
Some(_) => Err("CloseFocus should not have a payload"),
None => Ok(Action::CloseFocus),
@@ -1086,6 +1098,7 @@ impl TryFrom<Action> for ProtobufAction {
| Action::RenamePaneByPaneId { .. }
| Action::UndoRenamePaneByPaneId { .. }
| Action::TogglePanePinnedByPaneId { .. }
+ | Action::FocusPaneByPaneId { .. }
| Action::UndoRenameTabByTabId { .. }
| Action::ToggleActiveSyncTabByTabId { .. }
| Action::ToggleFloatingPanesByTabId { .. }
@@ -1380,6 +1393,14 @@ impl TryFrom<Action> for ProtobufAction {
},
)),
}),
+ Action::AreFloatingPanesVisible { tab_id } => Ok(ProtobufAction {
+ name: ProtobufActionName::AreFloatingPanesVisible as i32,
+ optional_payload: Some(OptionalPayload::AreFloatingPanesVisiblePayload(
+ AreFloatingPanesVisiblePayload {
+ tab_id: tab_id.map(|id| id as u32),
+ },
+ )),
+ }),
Action::CloseFocus => Ok(ProtobufAction {
name: ProtobufActionName::CloseFocus as i32,
optional_payload: None,