diff options
| author | Aram Drevekenin <aram@poor.dev> | 2026-01-20 10:13:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-01-20 10:13:37 +0100 |
| commit | 03c86d09cf301db9a62427170f956a632812d67e (patch) | |
| tree | 5eee73d6201cbe2066ec258a0b7612e84e97aa6d | |
| parent | Fix: allow 0% coordinate specification for floating panes (#4609) (diff) | |
| download | sl0ppij-03c86d09cf301db9a62427170f956a632812d67e.tar.gz sl0ppij-03c86d09cf301db9a62427170f956a632812d67e.tar.xz sl0ppij-03c86d09cf301db9a62427170f956a632812d67e.zip | |
Allow toggling pane frames for specific panes (#4615)
* initial implementation
* add borderless to edit and plugin cli commands
* allow changing existing pane to borderless
* allow setting in layouts and keybindings
* get to work through the existing plugin api commands
* fix when applying (swap) layouts
* fix tests
* allow setting pane as bordered (borderful?) when changing its coordinates (eg. through the cli)
* allow explicitly setting a pane as bordered or borderless without toggling
* rustfmt
* adjust snapshots
* docs(changelog): add PR
99 files changed, 1471 insertions, 585 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 22e34743..ca020c6d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) * fix: properly close the welcome screen session when switching sessions away from it (https://github.com/zellij-org/zellij/pull/4605) * fix: properly center floating panes started with `--floating` when explicit width/height is provided (https://github.com/zellij-org/zellij/pull/4607) * fix: allow specifying "0%" coordinates when opening panes wit "zellij run --floating" (https://github.com/zellij-org/zellij/pull/4609) +* feat: allow opening panes as `borderless` or toggling/changing the borderless status of existing panes (https://github.com/zellij-org/zellij/pull/4615) ## [0.43.1] - 2025-08-08 diff --git a/default-plugins/about/src/main.rs b/default-plugins/about/src/main.rs index 71ea7c8e..c0d1f398 100644 --- a/default-plugins/about/src/main.rs +++ b/default-plugins/about/src/main.rs @@ -307,6 +307,7 @@ impl App { Some(UI_COLUMNS.to_string()), Some(UI_ROWS.to_string()), None, + Some(false), ) .unwrap(), )]); diff --git a/default-plugins/compact-bar/src/main.rs b/default-plugins/compact-bar/src/main.rs index b07559e2..074e5181 100644 --- a/default-plugins/compact-bar/src/main.rs +++ b/default-plugins/compact-bar/src/main.rs @@ -443,6 +443,7 @@ impl State { Some(width.to_string()), Some(height.to_string()), Some(true), + Some(false), ) .unwrap_or_default() } diff --git a/default-plugins/multiple-select/src/main.rs b/default-plugins/multiple-select/src/main.rs index 3e68e22a..78949ea7 100644 --- a/default-plugins/multiple-select/src/main.rs +++ b/default-plugins/multiple-select/src/main.rs @@ -481,6 +481,7 @@ impl App { Some(format!("{}", width)), Some(format!("{}", height)), Some(true), + Some(false), ) else { return; }; @@ -500,6 +501,7 @@ impl App { Some(format!("{}", width)), Some(format!("{}", height)), Some(true), + Some(false), ) else { return; }; diff --git a/default-plugins/sequence/src/main.rs b/default-plugins/sequence/src/main.rs index 0ac286d9..4631caa2 100644 --- a/default-plugins/sequence/src/main.rs +++ b/default-plugins/sequence/src/main.rs @@ -881,6 +881,7 @@ fn change_floating_pane_coordinates( width.map(|width| format!("{}%", width)), height.map(|height| format!("{}%", height)), Some(should_be_pinned), + Some(false), ); if let Some(coordinates) = coordinates { // TODO: better diff --git a/default-plugins/sequence/src/state/mod.rs b/default-plugins/sequence/src/state/mod.rs index 19738be7..e3fbf3ff 100644 --- a/default-plugins/sequence/src/state/mod.rs +++ b/default-plugins/sequence/src/state/mod.rs @@ -354,6 +354,7 @@ impl State { Some(format!("50%")), Some(format!("{}", initial_height)), Some(false), // should not be pinned when running sequence + Some(false), ); coordinates.map(|coordinates| { if Some(&coordinates) != self.current_position.as_ref() { @@ -403,6 +404,7 @@ impl State { Some(width.to_string()), Some(height.to_string()), Some(true), // should be pinned for sequence + Some(false), ); coordinates.map(|coordinates| { if Some(&coordinates) != self.current_position.as_ref() { diff --git a/default-plugins/sequence/src/state/positioning.rs b/default-plugins/sequence/src/state/positioning.rs index 6acadfff..b724df62 100644 --- a/default-plugins/sequence/src/state/positioning.rs +++ b/default-plugins/sequence/src/state/positioning.rs @@ -41,6 +41,7 @@ pub fn change_floating_pane_coordinates_absolute( width.map(|width| width.to_string()), height.map(|height| height.to_string()), Some(should_be_pinned), + Some(false), ); if let Some(coordinates) = coordinates { change_floating_panes_coordinates(vec![(PaneId::Plugin(own_plugin_id), coordinates)]); diff --git a/src/main.rs b/src/main.rs index 64c94ed4..de0b496c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -45,6 +45,7 @@ fn main() { block_until_exit_failure, block_until_exit, near_current_pane, + borderless, })) = opts.command { let cwd = cwd.or_else(|| std::env::current_dir().ok()); @@ -82,6 +83,7 @@ fn main() { blocking, unblock_condition, near_current_pane, + borderless, }; commands::send_action_to_session(command_cli_action, opts.session, config); std::process::exit(0); @@ -97,6 +99,7 @@ fn main() { width, height, pinned, + borderless, })) = opts.command { let cwd = None; @@ -124,6 +127,7 @@ fn main() { blocking, unblock_condition, near_current_pane: false, + borderless, }; commands::send_action_to_session(command_cli_action, opts.session, config); std::process::exit(0); @@ -141,6 +145,7 @@ fn main() { height, pinned, near_current_pane, + borderless, })) = opts.command { let mut file = file; @@ -163,6 +168,7 @@ fn main() { height, pinned, near_current_pane, + borderless, }; commands::send_action_to_session(command_cli_action, opts.session, config); std::process::exit(0); diff --git a/zellij-server/src/pane_groups.rs b/zellij-server/src/pane_groups.rs index 1f7f2df4..5642bbcd 100644 --- a/zellij-server/src/pane_groups.rs +++ b/zellij-server/src/pane_groups.rs @@ -168,6 +168,7 @@ impl PaneGroups { width: Some(PercentOrFixed::Fixed(width)), height: Some(PercentOrFixed::Fixed(height)), pinned: Some(true), + borderless: Some(false), }; let _ = self.senders.send_to_pty(PtyInstruction::FillPluginCwd( should_float, diff --git a/zellij-server/src/panes/floating_panes/mod.rs b/zellij-server/src/panes/floating_panes/mod.rs index 18710c01..0303399f 100644 --- a/zellij-server/src/panes/floating_panes/mod.rs +++ b/zellij-server/src/panes/floating_panes/mod.rs @@ -803,6 +803,13 @@ impl FloatingPanes { if let Some(pinned) = new_coordinates.pinned.as_ref() { pane.set_pinned(*pinned); } + if let Some(should_be_borderless) = new_coordinates.borderless { + if should_be_borderless { + pane.set_borderless(true); + } else { + pane.set_borderless(false); + }; + } pane_geom.adjust_coordinates(new_coordinates, viewport); pane.set_geom(pane_geom); pane.set_should_render(true); diff --git a/zellij-server/src/panes/plugin_pane.rs b/zellij-server/src/panes/plugin_pane.rs index ffad3d84..a30f49ae 100644 --- a/zellij-server/src/panes/plugin_pane.rs +++ b/zellij-server/src/panes/plugin_pane.rs @@ -697,8 +697,13 @@ impl Pane for PluginPane { } } - fn set_borderless(&mut self, borderless: bool) { - self.borderless = borderless; + fn set_borderless(&mut self, should_be_borderless: bool) { + self.borderless = should_be_borderless; + if should_be_borderless { + self.set_content_offset(Offset::default()); + } else { + self.set_content_offset(Offset::frame(1)); + } } fn borderless(&self) -> bool { self.borderless diff --git a/zellij-server/src/panes/terminal_pane.rs b/zellij-server/src/panes/terminal_pane.rs index 97bf5dcc..881fefe9 100644 --- a/zellij-server/src/panes/terminal_pane.rs +++ b/zellij-server/src/panes/terminal_pane.rs @@ -630,12 +630,17 @@ impl Pane for TerminalPane { } } - fn set_borderless(&mut self, borderless: bool) { - self.borderless = borderless; - } fn borderless(&self) -> bool { self.borderless } + fn set_borderless(&mut self, should_be_borderless: bool) { + self.borderless = should_be_borderless; + if should_be_borderless { + self.set_content_offset(Offset::default()); + } else { + self.set_content_offset(Offset::frame(1)); + } + } fn set_exclude_from_sync(&mut self, exclude_from_sync: bool) { self.exclude_from_sync = exclude_from_sync; diff --git a/zellij-server/src/panes/tiled_panes/mod.rs b/zellij-server/src/panes/tiled_panes/mod.rs index a658f801..6bcfe9db 100644 --- a/zellij-server/src/panes/tiled_panes/mod.rs +++ b/zellij-server/src/panes/tiled_panes/mod.rs @@ -573,7 +573,7 @@ impl TiledPanes { pane.set_content_offset(Offset::default()); } else { // no draw_pane_frames and this pane should have a separation to other panes - // according to its position in the viewport (eg. no separation if its at the + // according to its position in the viewport (eg. no separation if it's at the // viewport bottom) - offset its content accordingly let mut position_and_size = pane.current_geom(); let is_stacked = position_and_size.is_stacked(); @@ -1194,7 +1194,7 @@ impl TiledPanes { &mut self, run: Option<Run>, geom: PaneGeom, - borderless: bool, + should_be_borderless: Option<bool>, ) { match self .panes @@ -1203,8 +1203,15 @@ impl TiledPanes { { Some((_, pane)) => { pane.set_geom(geom); - pane.set_borderless(borderless); - if self.draw_pane_frames { + + if let Some(should_be_borderless) = should_be_borderless { + pane.set_borderless(should_be_borderless); + if should_be_borderless { + pane.set_content_offset(Offset::default()); + } else { + pane.set_content_offset(Offset::frame(1)); + } + } else if self.draw_pane_frames { pane.set_content_offset(Offset::frame(1)); } }, 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 1c74a94b..9f02cee0 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 @@ -17,7 +17,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -33,7 +33,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -46,7 +46,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, 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 889a6e9d..3a910a7d 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 @@ -17,7 +17,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -33,7 +33,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -46,7 +46,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: 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 24de4279..e1e5e906 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 @@ -20,7 +20,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -55,7 +55,9 @@ Some( ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -68,7 +70,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -103,7 +105,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -119,7 +121,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -134,7 +136,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -147,7 +149,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -182,7 +184,9 @@ Some( ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -195,7 +199,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -225,7 +229,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -247,7 +251,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -263,7 +267,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -279,7 +283,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -295,7 +299,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -308,7 +312,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -321,7 +325,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -334,7 +338,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -369,7 +373,9 @@ Some( ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -382,7 +388,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -412,7 +418,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -434,7 +440,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -450,7 +456,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -466,7 +472,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -482,7 +488,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -495,7 +501,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -515,7 +521,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -531,7 +537,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -547,7 +553,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -563,7 +569,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -576,7 +582,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -589,7 +595,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -602,7 +608,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -637,7 +643,9 @@ Some( ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -650,7 +658,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -683,7 +691,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -699,7 +707,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -712,7 +720,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -747,7 +755,9 @@ Some( ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -760,7 +770,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -790,7 +800,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -812,7 +822,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -828,7 +838,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -844,7 +854,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -860,7 +870,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -873,7 +883,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -886,7 +896,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -899,7 +909,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -934,7 +944,9 @@ Some( ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -947,7 +959,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -977,7 +989,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -999,7 +1011,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1015,7 +1027,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1031,7 +1043,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1047,7 +1059,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1060,7 +1072,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1080,7 +1092,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1096,7 +1108,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1112,7 +1124,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1128,7 +1140,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1141,7 +1153,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1154,7 +1166,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1167,7 +1179,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1202,7 +1214,9 @@ Some( ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -1215,7 +1229,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1252,7 +1266,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1268,7 +1282,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -1283,7 +1297,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1296,7 +1310,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1331,7 +1345,9 @@ Some( ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -1344,7 +1360,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1399,6 +1415,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1428,6 +1445,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1457,6 +1475,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1486,6 +1505,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1515,6 +1535,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1544,6 +1565,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1573,6 +1595,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1602,6 +1625,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1631,6 +1655,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1660,6 +1685,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1692,6 +1718,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1721,6 +1748,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1746,6 +1774,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1775,6 +1804,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1800,6 +1830,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1825,6 +1856,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1858,6 +1890,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1887,6 +1920,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1916,6 +1950,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1945,6 +1980,7 @@ Some( ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, diff --git a/zellij-server/src/plugins/zellij_exports.rs b/zellij-server/src/plugins/zellij_exports.rs index c50f33b5..2ba461b3 100644 --- a/zellij-server/src/plugins/zellij_exports.rs +++ b/zellij-server/src/plugins/zellij_exports.rs @@ -511,6 +511,12 @@ fn host_run_plugin_command(mut caller: Caller<'_, PluginEnv>) { .collect(), ) }, + PluginCommand::TogglePaneBorderless(pane_id) => { + toggle_pane_borderless(env, pane_id.into()) + }, + PluginCommand::SetPaneBorderless(pane_id, borderless) => { + set_pane_borderless(env, pane_id.into(), borderless) + }, PluginCommand::OpenFileNearPlugin(file_to_open, context) => { open_file_near_plugin(env, file_to_open, context) }, @@ -2585,6 +2591,20 @@ fn change_floating_panes_coordinates( )); } +fn toggle_pane_borderless(env: &PluginEnv, pane_id: PaneId) { + let _ = env + .senders + .send_to_screen(ScreenInstruction::TogglePaneBorderless(pane_id, None)); +} + +fn set_pane_borderless(env: &PluginEnv, pane_id: PaneId, borderless: bool) { + let _ = env + .senders + .send_to_screen(ScreenInstruction::SetPaneBorderless( + pane_id, borderless, None, + )); +} + fn scan_host_folder(env: &PluginEnv, folder_to_scan: PathBuf) { if !folder_to_scan.starts_with("/host") { log::error!( @@ -3776,6 +3796,8 @@ fn check_command_permission( | PluginCommand::SetFloatingPanePinned(..) | PluginCommand::StackPanes(..) | PluginCommand::ChangeFloatingPanesCoordinates(..) + | PluginCommand::TogglePaneBorderless(..) + | PluginCommand::SetPaneBorderless(..) | PluginCommand::GroupAndUngroupPanes(..) | PluginCommand::HighlightAndUnhighlightPanes(..) | PluginCommand::CloseMultiplePanes(..) diff --git a/zellij-server/src/route.rs b/zellij-server/src/route.rs index df9fd305..99fee4f1 100644 --- a/zellij-server/src/route.rs +++ b/zellij-server/src/route.rs @@ -1518,6 +1518,26 @@ pub(crate) fn route_action( )) .with_context(err_context)?; }, + Action::TogglePaneBorderless { pane_id } => { + senders + .send_to_screen(ScreenInstruction::TogglePaneBorderless( + pane_id.into(), + Some(NotificationEnd::new(completion_tx)), + )) + .with_context(err_context)?; + }, + Action::SetPaneBorderless { + pane_id, + borderless, + } => { + senders + .send_to_screen(ScreenInstruction::SetPaneBorderless( + pane_id.into(), + borderless, + Some(NotificationEnd::new(completion_tx)), + )) + .with_context(err_context)?; + }, Action::TogglePaneInGroup => { senders .send_to_screen(ScreenInstruction::TogglePaneInGroup( diff --git a/zellij-server/src/screen.rs b/zellij-server/src/screen.rs index 51d3804d..2eb2c416 100644 --- a/zellij-server/src/screen.rs +++ b/zellij-server/src/screen.rs @@ -496,6 +496,8 @@ pub enum ScreenInstruction { Vec<(PaneId, FloatingPaneCoordinates)>, Option<NotificationEnd>, ), + TogglePaneBorderless(PaneId, Option<NotificationEnd>), + SetPaneBorderless(PaneId, bool, Option<NotificationEnd>), AddHighlightPaneFrameColorOverride(Vec<PaneId>, Option<String>), // Option<String> => optional // message GroupAndUngroupPanes(Vec<PaneId>, Vec<PaneId>, bool, ClientId), // panes_to_group, panes_to_ungroup, bool -> for all clients @@ -728,6 +730,8 @@ impl From<&ScreenInstruction> for ScreenContext { ScreenInstruction::ChangeFloatingPanesCoordinates(..) => { ScreenContext::ChangeFloatingPanesCoordinates }, + ScreenInstruction::TogglePaneBorderless(..) => ScreenContext::TogglePaneBorderless, + ScreenInstruction::SetPaneBorderless(..) => ScreenContext::SetPaneBorderless, ScreenInstruction::AddHighlightPaneFrameColorOverride(..) => { ScreenContext::AddHighlightPaneFrameColorOverride }, @@ -2903,6 +2907,7 @@ impl Screen { width: Some(PercentOrFixed::Fixed(pane.cols())), height: Some(PercentOrFixed::Fixed(pane.rows())), pinned: Some(pane.current_geom().is_pinned), + borderless: Some(pane.borderless()), }; new_active_tab.add_floating_pane( pane, @@ -3230,6 +3235,22 @@ impl Screen { } } } + pub fn toggle_pane_borderless(&mut self, pane_id: PaneId) { + for (_tab_id, tab) in self.tabs.iter_mut() { + if tab.has_pane_with_pid(&pane_id) { + tab.toggle_pane_borderless(&pane_id).non_fatal(); + break; + } + } + } + pub fn set_pane_borderless(&mut self, pane_id: PaneId, borderless: bool) { + for (_tab_id, tab) in self.tabs.iter_mut() { + if tab.has_pane_with_pid(&pane_id) { + tab.set_pane_borderless(&pane_id, borderless).non_fatal(); + break; + } + } + } pub fn handle_mouse_event(&mut self, event: MouseEvent, client_id: ClientId) { match self .get_active_tab_mut(client_id) @@ -6491,6 +6512,14 @@ pub(crate) fn screen_thread_main( screen.change_floating_panes_coordinates(pane_ids_and_coordinates); let _ = screen.render(None); }, + ScreenInstruction::TogglePaneBorderless(pane_id, _completion_tx) => { + screen.toggle_pane_borderless(pane_id); + let _ = screen.render(None); + }, + ScreenInstruction::SetPaneBorderless(pane_id, borderless, _completion_tx) => { + screen.set_pane_borderless(pane_id, borderless); + let _ = screen.render(None); + }, ScreenInstruction::GroupAndUngroupPanes( pane_ids_to_group, pane_ids_to_ungroup, diff --git a/zellij-server/src/tab/layout_applier.rs b/zellij-server/src/tab/layout_applier.rs index a0f30da8..40eb4a11 100644 --- a/zellij-server/src/tab/layout_applier.rs +++ b/zellij-server/src/tab/layout_applier.rs @@ -541,7 +541,7 @@ impl<'a> LayoutApplier<'a> { new_plugin.handle_pty_bytes("\n\r".as_bytes().into()); } - new_plugin.set_borderless(layout.borderless); + new_plugin.set_borderless(layout.borderless.unwrap_or(false)); if let Some(exclude_from_sync) = layout.exclude_from_sync { new_plugin.set_exclude_from_sync(exclude_from_sync); } @@ -589,8 +589,11 @@ impl<'a> LayoutApplier<'a> { new_pane.handle_pty_bytes(pane_initial_contents.as_bytes().into()); new_pane.handle_pty_bytes("\n\r".as_bytes().into()); } - new_pane.set_borderless(false); - new_pane.set_content_offset(Offset::frame(1)); + if floating_pane_layout.borderless.unwrap_or(false) { + new_pane.set_borderless(true); + } else { + new_pane.set_borderless(false); + } resize_pty!( new_pane, self.os_api, @@ -641,8 +644,11 @@ impl<'a> LayoutApplier<'a> { new_pane.handle_pty_bytes(pane_initial_contents.as_bytes().into()); new_pane.handle_pty_bytes("\n\r".as_bytes().into()); } - new_pane.set_borderless(false); - new_pane.set_content_offset(Offset::frame(1)); + if floating_pane_layout.borderless.unwrap_or(false) { + new_pane.set_borderless(true); + } else { + new_pane.set_borderless(false); + } if let Some(held_command) = hold_for_command { new_pane.hold(None, true, held_command.clone()); } @@ -707,7 +713,7 @@ impl<'a> LayoutApplier<'a> { new_pane.handle_pty_bytes(pane_initial_contents.as_bytes().into()); new_pane.handle_pty_bytes("\n\r".as_bytes().into()); } - new_pane.set_borderless(layout.borderless); + new_pane.set_borderless(layout.borderless.unwrap_or(false)); if let Some(exclude_from_sync) = layout.exclude_from_sync { new_pane.set_exclude_from_sync(exclude_from_sync); } @@ -1298,6 +1304,9 @@ impl<'a> PaneApplier<'a> { if floating_panes_layout.focus.unwrap_or(false) { self.new_focused_pane_id = Some(pane.pid()); } + if let Some(should_be_borderless) = floating_panes_layout.borderless { + pane.set_borderless(should_be_borderless); + } self.apply_position_and_size_to_floating_pane(pane, position_and_size); Ok(()) } @@ -1374,7 +1383,9 @@ impl<'a> PaneApplier<'a> { if let Some(position_and_size) = position_and_size { pane.set_geom(position_and_size); } - pane.set_borderless(layout.borderless); + if let Some(should_be_borderless) = layout.borderless { + pane.set_borderless(should_be_borderless); + } if let Some(pane_title) = layout.name.as_ref() { pane.set_title(pane_title.into()); } diff --git a/zellij-server/src/tab/mod.rs b/zellij-server/src/tab/mod.rs index 696a0d2f..e1ec2aa1 100644 --- a/zellij-server/src/tab/mod.rs +++ b/zellij-server/src/tab/mod.rs @@ -886,6 +886,8 @@ impl Tab { .set_swap_tiled_layouts(new_swap_tiled_layouts); self.swap_layouts .set_swap_floating_layouts(new_swap_floating_layouts); + self.swap_layouts + .set_base_layout((layout.clone(), floating_panes_layout.clone())); match LayoutApplier::new( &self.viewport, &self.senders, @@ -5374,18 +5376,26 @@ impl Tab { ) -> Result<()> { let err_context = || format!("failed to add floating pane"); if let Some(mut new_pane_geom) = self.floating_panes.find_room_for_new_pane() { - if let Some(floating_pane_coordinates) = floating_pane_coordinates { + if let Some(floating_pane_coordinates) = &floating_pane_coordinates { let viewport = self.viewport.borrow(); if let Some(pinned) = floating_pane_coordinates.pinned.as_ref() { pane.set_pinned(*pinned); } - new_pane_geom.adjust_coordinates(floating_pane_coordinates, *viewport); + new_pane_geom.adjust_coordinates(floating_pane_coordinates.clone(), *viewport); self.swap_layouts.set_is_floating_damaged(); } pane.set_active_at(Instant::now()); pane.set_geom(new_pane_geom); - pane.set_content_offset(Offset::frame(1)); // floating panes always have a frame - pane.render_full_viewport(); // to make sure the frame is re-rendered + let is_borderless = floating_pane_coordinates + .and_then(|c| c.borderless) + .unwrap_or(false); + if is_borderless { + pane.set_content_offset(Offset::frame(0)); + pane.set_borderless(true); + } else { + pane.set_content_offset(Offset::frame(1)); // floating panes always have a frame + pane.render_full_viewport(); // to make sure the frame is re-rendered + } resize_pty!(pane, self.os_api, self.senders, self.character_cell_size) .with_context(err_context)?; self.floating_panes.add_pane(pane_id, pane); @@ -5742,6 +5752,84 @@ impl Tab { self.swap_layouts.set_is_floating_damaged(); Ok(()) } + pub fn toggle_pane_borderless(&mut self, pane_id: &PaneId) -> Result<()> { + if let Some(pane) = self.floating_panes.get_pane_mut(*pane_id) { + let is_borderless = pane.borderless(); + if is_borderless { + pane.set_content_offset(Offset::frame(1)); + } else { + pane.set_content_offset(Offset::default()); + } + pane.set_borderless(!is_borderless); + self.set_force_render(); + return Ok(()); + } + + if let Some(pane) = self.tiled_panes.get_pane_mut(*pane_id) { + let is_borderless = pane.borderless(); + if is_borderless { + pane.set_content_offset(Offset::frame(1)); + } else { + pane.set_content_offset(Offset::default()); + } + pane.set_borderless(!is_borderless); + self.set_force_render(); + return Ok(()); + } + + if let Some(pane) = self.suppressed_panes.get_mut(pane_id) { + let is_borderless = pane.1.borderless(); + if is_borderless { + pane.1.set_content_offset(Offset::frame(1)); + } else { + pane.1.set_content_offset(Offset::default()); + } + pane.1.set_borderless(!is_borderless); + return Ok(()); + } + + log::error!("Pane with id {:?} not found", pane_id); + Ok(()) + } + pub fn set_pane_borderless(&mut self, pane_id: &PaneId, borderless: bool) -> Result<()> { + // Try floating panes first + if let Some(pane) = self.floating_panes.get_pane_mut(*pane_id) { + if borderless { + pane.set_content_offset(Offset::default()); // Borderless: no offset + } else { + pane.set_content_offset(Offset::frame(1)); // Bordered: 1-char offset + } + pane.set_borderless(borderless); + self.set_force_render(); + return Ok(()); + } + + // Try tiled panes + if let Some(pane) = self.tiled_panes.get_pane_mut(*pane_id) { + if borderless { + pane.set_content_offset(Offset::default()); + } else { + pane.set_content_offset(Offset::frame(1)); + } + pane.set_borderless(borderless); + self.set_force_render(); + return Ok(()); + } + + // Try suppressed panes + if let Some(pane) = self.suppressed_panes.get_mut(pane_id) { + if borderless { + pane.1.set_content_offset(Offset::default()); + } else { + pane.1.set_content_offset(Offset::frame(1)); + } + pane.1.set_borderless(borderless); + return Ok(()); + } + + log::error!("Pane with id {:?} not found", pane_id); + Ok(()) + } pub fn get_viewport(&self) -> Viewport { self.viewport.borrow().clone() } diff --git a/zellij-server/src/tab/unit/snapshots/zellij_server__tab__layout_applier_tests__override_viewport_adjustment_with_borderless.snap b/zellij-server/src/tab/unit/snapshots/zellij_server__tab__layout_applier_tests__override_viewport_adjustment_with_borderless.snap index 2bef48e7..7636e0ae 100644 --- a/zellij-server/src/tab/unit/snapshots/zellij_server__tab__layout_applier_tests__override_viewport_adjustment_with_borderless.snap +++ b/zellij-server/src/tab/unit/snapshots/zellij_server__tab__layout_applier_tests__override_viewport_adjustment_with_borderless.snap @@ -13,7 +13,7 @@ TILED PANES (2) run: None selectable: true title: Pane #1 - borderless: false + borderless: true Terminal(2): geom: x=0, y=20, cols=120, rows=20 diff --git a/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__borderless_floating_pane.snap b/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__borderless_floating_pane.snap new file mode 100644 index 00000000..dee14412 --- /dev/null +++ b/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__borderless_floating_pane.snap @@ -0,0 +1,24 @@ +--- +source: zellij-server/src/tab/./unit/tab_integration_tests.rs +expression: snapshot +--- +00 (C): ┌ Pane #1 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +01 (C): │ │ +02 (C): │ │ +03 (C): │ │ +04 (C): │ │ +05 (C): │ │ +06 (C): │ │ +07 (C): │ │ +08 (C): │ I am borderless │ +09 (C): │ │ +10 (C): │ │ +11 (C): │ │ +12 (C): │ │ +13 (C): │ │ +14 (C): │ │ +15 (C): │ │ +16 (C): │ │ +17 (C): │ │ +18 (C): │ │ +19 (C): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ diff --git a/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__borderless_pane_content_fills_edges.snap b/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__borderless_pane_content_fills_edges.snap new file mode 100644 index 00000000..4f3b2b83 --- /dev/null +++ b/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__borderless_pane_content_fills_edges.snap @@ -0,0 +1,24 @@ +--- +source: zellij-server/src/tab/./unit/tab_integration_tests.rs +expression: snapshot +--- +00 (C): ┌ Pane #1 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +01 (C): │ │ +02 (C): │ │ +03 (C): │ │ +04 (C): │ │ +05 (C): │ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX │ +06 (C): │ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX │ +07 (C): │ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX │ +08 (C): │ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX │ +09 (C): │ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX │ +10 (C): │ │ +11 (C): │ │ +12 (C): │ │ +13 (C): │ │ +14 (C): │ │ +15 (C): │ │ +16 (C): │ │ +17 (C): │ │ +18 (C): │ │ +19 (C): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ diff --git a/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__borderless_pinned_floating_pane.snap b/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__borderless_pinned_floating_pane.snap new file mode 100644 index 00000000..ec4394b8 --- /dev/null +++ b/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__borderless_pinned_floating_pane.snap @@ -0,0 +1,24 @@ +--- +source: zellij-server/src/tab/./unit/tab_integration_tests.rs +expression: snapshot +--- +00 (C): ┌ Pane #1 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +01 (C): │Content behind pinned pane │ +02 (C): │ │ +03 (C): │ │ +04 (C): │ │ +05 (C): │ │ +06 (C): │ │ +07 (C): │ Pinned borderless pane │ +08 (C): │ │ +09 (C): │ │ +10 (C): │ │ +11 (C): │ │ +12 (C): │ │ +13 (C): │ │ +14 (C): │ │ +15 (C): │ │ +16 (C): │ │ +17 (C): │ │ +18 (C): │ │ +19 (C): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ diff --git a/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__swap_layouts_including_plugin_panes_absent_from_existing_layout.snap b/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__swap_layouts_including_plugin_panes_absent_from_existing_layout.snap index df1a8e09..c58418f0 100644 --- a/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__swap_layouts_including_plugin_panes_absent_from_existing_layout.snap +++ b/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__swap_layouts_including_plugin_panes_absent_from_existing_layout.snap @@ -1,6 +1,5 @@ --- source: zellij-server/src/tab/./unit/tab_integration_tests.rs -assertion_line: 4966 expression: snapshot --- 00 (C): @@ -14,13 +13,12 @@ expression: snapshot 08 (C): │ │ 09 (C): │ │ 10 (C): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -11 (C): ┌ Pane #3 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ -12 (C): │ │ -13 (C): │ │ -14 (C): │ │ -15 (C): │ │ -16 (C): │ │ -17 (C): │ │ -18 (C): │ │ -19 (C): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ - +11 (C): +12 (C): +13 (C): +14 (C): +15 (C): +16 (C): +17 (C): +18 (C): +19 (C): diff --git a/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__swap_layouts_not_including_plugin_panes_present_in_existing_layout.snap b/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__swap_layouts_not_including_plugin_panes_present_in_existing_layout.snap index 48031c36..9856ff38 100644 --- a/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__swap_layouts_not_including_plugin_panes_present_in_existing_layout.snap +++ b/zellij-server/src/tab/unit/snapshots/zellij_server__tab__tab_integration_tests__swap_layouts_not_including_plugin_panes_present_in_existing_layout.snap @@ -1,26 +1,24 @@ --- source: zellij-server/src/tab/./unit/tab_integration_tests.rs -assertion_line: 7019 expression: snapshot --- -00 (C): ┌ zellij:tab-bar ───────────────────────────────────────────────────────────────────────────────────────────────────────┐ -01 (C): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ +00 (C): I am a +01 (C): status bar 02 (C): ┌ command1 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ 03 (C): │ │ 04 (C): │ Waiting to run: command1 │ 05 (C): │ │ 06 (C): │ <ENTER> run, <ESC> drop to shell, <Ctrl-c> exit │ 07 (C): └─ <ENTER> run, <ESC> drop to shell, <Ctrl-c> exit ─────────────────────────────────────────────────────────────────────┘ -08 (C): ┌ zellij:status-bar ────────────────────────────────────────────────────────────────────────────────────────────────────┐ -09 (C): │I am a │ -10 (C): │status bar │ +08 (C): ┌ command2 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ +09 (C): │ │ +10 (C): │ Waiting to run: command2 │ 11 (C): │ │ -12 (C): │ │ +12 (C): │ <ENTER> run, <ESC> drop to shell, <Ctrl-c> exit │ 13 (C): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ 14 (C): ┌ Pane #2 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ 15 (C): │ │ 16 (C): │ │ 17 (C): │ │ 18 (C): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ -19 (C): ┌ command2 ─────────────────────────────────────────────────────────────────────────────────────────────────────────────┐ - +19 (C): I am a tab bar diff --git a/zellij-server/src/tab/unit/tab_integration_tests.rs b/zellij-server/src/tab/unit/tab_integration_tests.rs index d80fb8b7..eb160f7c 100644 --- a/zellij-server/src/tab/unit/tab_integration_tests.rs +++ b/zellij-server/src/tab/unit/tab_integration_tests.rs @@ -23,8 +23,8 @@ use zellij_utils::data::WebSharing; use zellij_utils::envs::set_session_name; use zellij_utils::errors::{prelude::*, ErrorContext}; use zellij_utils::input::layout::{ - FloatingPaneLayout, Layout, PluginUserConfiguration, RunPluginLocation, RunPluginOrAlias, - SwapFloatingLayout, SwapTiledLayout, TiledPaneLayout, + FloatingPaneLayout, Layout, PercentOrFixed, PluginUserConfiguration, RunPluginLocation, + RunPluginOrAlias, SwapFloatingLayout, SwapTiledLayout, TiledPaneLayout, }; use zellij_utils::input::mouse::MouseEvent; use zellij_utils::input::plugins::PluginTag; @@ -42,7 +42,7 @@ use std::rc::Rc; use interprocess::local_socket::LocalSocketStream; use zellij_utils::{ - data::{InputMode, ModeInfo, NewPanePlacement, Palette, Style}, + data::{FloatingPaneCoordinates, InputMode, ModeInfo, NewPanePlacement, Palette, Style}, input::command::{RunCommand, TerminalAction}, ipc::{ClientToServerMsg, ServerToClientMsg}, }; @@ -1053,7 +1053,6 @@ fn increase_tiled_pane_sizes_with_stacked_resizes_into_uneven_panes() { size.cols, Palette::default(), ); - eprintln!("increase: \n{}", snapshot); assert_snapshot!(snapshot); } @@ -1068,7 +1067,6 @@ fn increase_tiled_pane_sizes_with_stacked_resizes_into_uneven_panes() { size.cols, Palette::default(), ); - eprintln!("decrease: \n{}", snapshot); assert_snapshot!(snapshot); } } @@ -8252,11 +8250,15 @@ fn swap_layouts_not_including_plugin_panes_present_in_existing_layout() { layout { swap_tiled_layout { tab { - pane size=2 + pane size=2 borderless=true { + plugin location="zellij:status-bar" + } pane pane pane - pane size=1 + pane size=1 borderless=true { + plugin location="zellij:tab-bar" + } } } } @@ -8476,7 +8478,6 @@ fn new_pane_in_stacked_resizes() { size.cols, Palette::default(), ); - eprintln!("{}", snapshot); let (expected_x, expected_y) = expected_cursor_coordinates.remove(0); assert_eq!( cursor_coordinates, @@ -9879,3 +9880,150 @@ fn can_define_expanded_pane_in_stack() { ); assert_snapshot!(snapshot); } + +#[test] +fn borderless_floating_pane() { + let size = Size { + cols: 121, + rows: 20, + }; + let client_id = 1; + let mut tab = create_new_tab(size, ModeInfo::default()); + let new_pane_id = PaneId::Terminal(2); + let mut output = Output::default(); + + // Create borderless floating pane + let coordinates = FloatingPaneCoordinates { + x: Some(PercentOrFixed::Fixed(10)), + y: Some(PercentOrFixed::Fixed(5)), + width: Some(PercentOrFixed::Fixed(50)), + height: Some(PercentOrFixed::Fixed(10)), + pinned: None, + borderless: Some(true), + }; + + tab.new_floating_pane( + new_pane_id, + None, + None, + false, + true, + Some(coordinates), + None, + ) + .unwrap(); + + tab.handle_pty_bytes( + 2, + Vec::from("\n\n\n I am borderless".as_bytes()), + ) + .unwrap(); + + tab.render(&mut output, None).unwrap(); + let snapshot = take_snapshot( + output.serialize().unwrap().get(&client_id).unwrap(), + size.rows, + size.cols, + Palette::default(), + ); + assert_snapshot!(snapshot); +} + +#[test] +fn borderless_pane_content_fills_edges() { + let size = Size { + cols: 121, + rows: 20, + }; + let client_id = 1; + let mut tab = create_new_tab(size, ModeInfo::default()); + let new_pane_id = PaneId::Terminal(2); + let mut output = Output::default(); + + let coordinates = FloatingPaneCoordinates { + x: Some(PercentOrFixed::Fixed(10)), + y: Some(PercentOrFixed::Fixed(5)), + width: Some(PercentOrFixed::Fixed(30)), + height: Some(PercentOrFixed::Fixed(5)), + pinned: None, + borderless: Some(true), + }; + + tab.new_floating_pane( + new_pane_id, + None, + None, + false, + true, + Some(coordinates), + None, + ) + .unwrap(); + + // Fill with X's to verify content reaches edges + tab.handle_pty_bytes( + 2, + Vec::from("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\r\nXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX".as_bytes()), + ) + .unwrap(); + + tab.render(&mut output, None).unwrap(); + let snapshot = take_snapshot( + output.serialize().unwrap().get(&client_id).unwrap(), + size.rows, + size.cols, + Palette::default(), + ); + assert_snapshot!(snapshot); +} + +#[test] +fn borderless_pinned_floating_pane() { + let size = Size { + cols: 121, + rows: 20, + }; + let client_id = 1; + let mut tab = create_new_tab(size, ModeInfo::default()); + let borderless_pane_id = PaneId::Terminal(2); + let mut output = Output::default(); + + let coordinates = FloatingPaneCoordinates { + x: Some(PercentOrFixed::Fixed(30)), + y: Some(PercentOrFixed::Fixed(5)), + width: Some(PercentOrFixed::Fixed(60)), + height: Some(PercentOrFixed::Fixed(8)), + pinned: Some(true), + borderless: Some(true), + }; + + tab.new_floating_pane( + borderless_pane_id, + None, + None, + false, + true, + Some(coordinates), + None, + ) + .unwrap(); + + // Toggle floating panes off to test pinned behavior + tab.toggle_floating_panes(Some(client_id), None, None) + .unwrap(); + + tab.handle_pty_bytes(1, Vec::from("Content behind pinned pane".as_bytes())) + .unwrap(); + + tab.handle_pty_bytes(2, Vec::from("\n\nPinned borderless pane".as_bytes())) + .unwrap(); + + tab.render(&mut output, None).unwrap(); + let snapshot = take_snapshot( + output.serialize().unwrap().get(&client_id).unwrap(), + size.rows, + size.cols, + Palette::default(), + ); + assert_snapshot!(snapshot); +} diff --git a/zellij-server/src/unit/screen_tests.rs b/zellij-server/src/unit/screen_tests.rs index ff41230a..e22656d2 100644 --- a/zellij-server/src/unit/screen_tests.rs +++ b/zellij-server/src/unit/screen_tests.rs @@ -1449,6 +1449,7 @@ fn open_new_floating_pane_with_custom_coordinates() { width: Some(PercentOrFixed::Percent(1)), height: Some(PercentOrFixed::Fixed(2)), pinned: None, + borderless: Some(false), })), Some(1), None, @@ -1484,6 +1485,7 @@ fn open_new_floating_pane_with_custom_coordinates_exceeding_viewport() { width: Some(PercentOrFixed::Fixed(10)), height: Some(PercentOrFixed::Fixed(10)), pinned: None, + borderless: Some(false), })), Some(1), None, @@ -1519,6 +1521,7 @@ fn floating_pane_auto_centers_horizontally_with_only_width() { width: Some(PercentOrFixed::Fixed(60)), height: Some(PercentOrFixed::Fixed(10)), pinned: None, + borderless: Some(false), })), Some(1), None, @@ -1554,6 +1557,7 @@ fn floating_pane_auto_centers_vertically_with_only_height() { width: Some(PercentOrFixed::Fixed(50)), height: Some(PercentOrFixed::Fixed(20)), pinned: None, + borderless: Some(false), })), Some(1), None, @@ -1589,6 +1593,7 @@ fn floating_pane_auto_centers_both_axes_with_only_size() { width: Some(PercentOrFixed::Fixed(80)), height: Some(PercentOrFixed::Fixed(30)), pinned: None, + borderless: Some(false), })), Some(1), None, @@ -1624,6 +1629,7 @@ fn floating_pane_respects_explicit_coordinates_with_size() { width: Some(PercentOrFixed::Fixed(80)), height: Some(PercentOrFixed::Fixed(30)), pinned: None, + borderless: Some(false), })), Some(1), None, @@ -1659,6 +1665,7 @@ fn floating_pane_centers_with_percentage_width() { width: Some(PercentOrFixed::Percent(50)), height: Some(PercentOrFixed::Fixed(20)), pinned: None, + borderless: Some(false), })), Some(1), None, @@ -1699,6 +1706,7 @@ fn floating_pane_centers_large_pane_safely() { width: Some(PercentOrFixed::Fixed(150)), height: Some(PercentOrFixed::Fixed(50)), pinned: None, + borderless: Some(false), })), Some(1), None, @@ -2870,6 +2878,7 @@ pub fn send_cli_new_pane_action_with_default_parameters() { blocking: false, unblock_condition: None, near_current_pane: false, + borderless: Some(false), }; send_cli_action_to_server(&session_metadata, cli_new_pane_action, client_id); std::thread::sleep(std::time::Duration::from_millis(100)); // give time for actions to be @@ -2918,6 +2927,7 @@ pub fn send_cli_new_pane_action_with_split_direction() { blocking: false, unblock_condition: None, near_current_pane: false, + borderless: Some(false), }; send_cli_action_to_server(&session_metadata, cli_new_pane_action, client_id); std::thread::sleep(std::time::Duration::from_millis(100)); // give time for actions to be @@ -2966,6 +2976,7 @@ pub fn send_cli_new_pane_action_with_command_and_cwd() { blocking: false, unblock_condition: None, near_current_pane: false, + borderless: Some(false), }; send_cli_action_to_server(&session_metadata, cli_new_pane_action, client_id); std::thread::sleep(std::time::Duration::from_millis(100)); // give time for actions to be @@ -3025,6 +3036,7 @@ pub fn send_cli_new_pane_action_with_floating_pane_and_coordinates() { blocking: false, unblock_condition: None, near_current_pane: false, + borderless: Some(false), }; send_cli_action_to_server(&session_metadata, cli_new_pane_action, client_id); std::thread::sleep(std::time::Duration::from_millis(100)); // give time for actions to be @@ -3064,6 +3076,7 @@ pub fn send_cli_edit_action_with_default_parameters() { width: None, height: None, pinned: None, + borderless: Some(false), near_current_pane: false, }; send_cli_action_to_server(&session_metadata, cli_edit_action, client_id); @@ -3104,6 +3117,7 @@ pub fn send_cli_edit_action_with_line_number() { width: None, height: None, pinned: None, + borderless: Some(false), near_current_pane: false, }; send_cli_action_to_server(&session_metadata, cli_edit_action, client_id); @@ -3144,6 +3158,7 @@ pub fn send_cli_edit_action_with_split_direction() { width: None, height: None, pinned: None, + borderless: Some(false), near_current_pane: false, }; send_cli_action_to_server(&session_metadata, cli_edit_action, client_id); @@ -4405,6 +4420,7 @@ pub fn send_cli_change_floating_pane_coordinates_action() { width: Some("10".to_owned()), height: Some("10".to_owned()), pinned: None, + borderless: Some(false), }; send_cli_action_to_server( &session_metadata, 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 3c3d85e7..bd120b83 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 })), false, ClientId(10), Some(NotificationEnd { channel: None, exit_status: None, unblock_condition: None, affected_pane_id: 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 }), false), Exit] diff --git a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_tab_action_default_params.snap b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_tab_action_default_params.snap index 0bdf3e1d..a734c788 100644 --- a/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_tab_action_default_params.snap +++ b/zellij-server/src/unit/snapshots/zellij_server__screen__screen_tests__send_cli_new_tab_action_default_params.snap @@ -17,7 +17,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -33,7 +33,7 @@ Some( children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -46,7 +46,7 @@ Some( ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, 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 ff0a8382..d53509f4 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 @@ -20,7 +20,7 @@ NewTab( "./.", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -40,7 +40,7 @@ NewTab( "./.", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -60,7 +60,7 @@ NewTab( "./.", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -77,7 +77,7 @@ NewTab( ".", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-tile/src/shim.rs b/zellij-tile/src/shim.rs index 25180259..56687e5c 100644 --- a/zellij-tile/src/shim.rs +++ b/zellij-tile/src/shim.rs @@ -1760,6 +1760,29 @@ pub fn change_floating_panes_coordinates( unsafe { host_run_plugin_command() }; } +/// Toggle the borderless state of a pane identified by pane_id +/// +/// # Arguments +/// * `pane_id` - The ID of the pane to toggle (PaneId::Terminal or PaneId::Plugin) +pub fn toggle_pane_borderless(pane_id: PaneId) { + let plugin_command = PluginCommand::TogglePaneBorderless(pane_id); + let protobuf_plugin_command: ProtobufPluginCommand = plugin_command.try_into().unwrap(); + object_to_stdout(&protobuf_plugin_command.encode_to_vec()); + unsafe { host_run_plugin_command() }; +} + +/// Set the borderless state of a pane explicitly +/// +/// # Arguments +/// * `pane_id` - The ID of the pane (PaneId::Terminal or PaneId::Plugin) +/// * `borderless` - true for borderless, false for bordered +pub fn set_pane_borderless(pane_id: PaneId, borderless: bool) { + let plugin_command = PluginCommand::SetPaneBorderless(pane_id, borderless); + let protobuf_plugin_command: ProtobufPluginCommand = plugin_command.try_into().unwrap(); + object_to_stdout(&protobuf_plugin_command.encode_to_vec()); + unsafe { host_run_plugin_command() }; +} + pub fn start_web_server() { let plugin_command = PluginCommand::StartWebServer; let protobuf_plugin_command: ProtobufPluginCommand = plugin_command.try_into().unwrap(); diff --git a/zellij-utils/assets/prost/api.action.rs b/zellij-utils/assets/prost/api.action.rs index 52ab0ab0..b7ccb156 100644 --- a/zellij-utils/assets/prost/api.action.rs +++ b/zellij-utils/assets/prost/api.action.rs @@ -183,6 +183,8 @@ pub struct FloatingPaneLayout { pub pane_initial_contents: ::core::option::Option<::prost::alloc::string::String>, #[prost(uint32, optional, tag="11")] pub logical_position: ::core::option::Option<u32>, + #[prost(bool, optional, tag="12")] + pub borderless: ::core::option::Option<bool>, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -288,7 +290,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")] + #[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")] pub optional_payload: ::core::option::Option<action::OptionalPayload>, } /// Nested message and enum types in `Action`. @@ -394,6 +396,8 @@ pub mod action { NewInPlacePanePayload(super::NewInPlacePanePayload), #[prost(message, tag="53")] OverrideLayoutPayload(super::OverrideLayoutPayload), + #[prost(message, tag="54")] + SetPaneBorderlessPayload(super::SetPaneBorderlessPayload), } } #[allow(clippy::derive_partial_eq_without_eq)] @@ -632,6 +636,17 @@ pub struct FloatingPaneCoordinates { pub height: ::core::option::Option<SplitSize>, #[prost(bool, optional, tag="5")] pub pinned: ::core::option::Option<bool>, + #[prost(bool, optional, tag="6")] + pub borderless: ::core::option::Option<bool>, +} +/// SetPaneBorderlessPayload specifies the pane and borderless state +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] +pub struct SetPaneBorderlessPayload { + #[prost(message, optional, tag="1")] + pub pane_id: ::core::option::Option<PaneId>, + #[prost(bool, tag="2")] + pub borderless: bool, } /// NewPanePlacement specifies where a new pane should be placed #[allow(clippy::derive_partial_eq_without_eq)] @@ -1025,6 +1040,7 @@ pub enum ActionName { NewBlockingPane = 91, NewInPlacePane = 92, OverrideLayout = 93, + SetPaneBorderless = 94, } impl ActionName { /// String value of the enum field names used in the ProtoBuf definition. @@ -1124,6 +1140,7 @@ impl ActionName { ActionName::NewBlockingPane => "NewBlockingPane", ActionName::NewInPlacePane => "NewInPlacePane", ActionName::OverrideLayout => "OverrideLayout", + ActionName::SetPaneBorderless => "SetPaneBorderless", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1220,6 +1237,7 @@ impl ActionName { "NewBlockingPane" => Some(Self::NewBlockingPane), "NewInPlacePane" => Some(Self::NewInPlacePane), "OverrideLayout" => Some(Self::OverrideLayout), + "SetPaneBorderless" => Some(Self::SetPaneBorderless), _ => None, } } diff --git a/zellij-utils/assets/prost/api.plugin_command.rs b/zellij-utils/assets/prost/api.plugin_command.rs index 7caeb247..d11cc9e0 100644 --- a/zellij-utils/assets/prost/api.plugin_command.rs +++ b/zellij-utils/assets/prost/api.plugin_command.rs @@ -3,7 +3,7 @@ pub struct PluginCommand { #[prost(enumeration="CommandName", tag="1")] pub name: i32, - #[prost(oneof="plugin_command::Payload", 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, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 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, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134")] + #[prost(oneof="plugin_command::Payload", 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, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 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, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136")] pub payload: ::core::option::Option<plugin_command::Payload>, } /// Nested message and enum types in `PluginCommand`. @@ -251,6 +251,10 @@ pub mod plugin_command { DumpSessionLayoutPayload(super::DumpSessionLayoutPayload), #[prost(message, tag="134")] GetFocusedPaneInfoPayload(super::GetFocusedPaneInfoPayload), + #[prost(message, tag="135")] + TogglePaneBorderlessPayload(super::TogglePaneBorderlessPayload), + #[prost(message, tag="136")] + SetPaneBorderlessPayload(super::SetPaneBorderlessPayload), } } #[allow(clippy::derive_partial_eq_without_eq)] @@ -461,6 +465,20 @@ pub struct SetFloatingPanePinnedPayload { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] +pub struct TogglePaneBorderlessPayload { + #[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 SetPaneBorderlessPayload { + #[prost(message, optional, tag="1")] + pub pane_id: ::core::option::Option<PaneId>, + #[prost(bool, tag="2")] + pub borderless: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct ChangeHostFolderPayload { #[prost(string, tag="1")] pub new_host_folder: ::prost::alloc::string::String, @@ -891,6 +909,8 @@ pub struct FloatingPaneCoordinates { pub height: ::core::option::Option<FixedOrPercentValue>, #[prost(bool, optional, tag="5")] pub pinned: ::core::option::Option<bool>, + #[prost(bool, optional, tag="6")] + pub borderless: ::core::option::Option<bool>, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -1392,6 +1412,8 @@ pub enum CommandName { RenameLayout = 181, GetLayoutDir = 182, GetFocusedPaneInfo = 183, + TogglePaneBorderless = 184, + SetPaneBorderless = 185, } impl CommandName { /// String value of the enum field names used in the ProtoBuf definition. @@ -1563,6 +1585,8 @@ impl CommandName { CommandName::RenameLayout => "RenameLayout", CommandName::GetLayoutDir => "GetLayoutDir", CommandName::GetFocusedPaneInfo => "GetFocusedPaneInfo", + CommandName::TogglePaneBorderless => "TogglePaneBorderless", + CommandName::SetPaneBorderless => "SetPaneBorderless", } } /// Creates an enum from field names used in the ProtoBuf definition. @@ -1731,6 +1755,8 @@ impl CommandName { "RenameLayout" => Some(Self::RenameLayout), "GetLayoutDir" => Some(Self::GetLayoutDir), "GetFocusedPaneInfo" => Some(Self::GetFocusedPaneInfo), + "TogglePaneBorderless" => Some(Self::TogglePaneBorderless), + "SetPaneBorderless" => Some(Self::SetPaneBorderless), _ => None, } } diff --git a/zellij-utils/assets/prost_ipc/client_server_contract.rs b/zellij-utils/assets/prost_ipc/client_server_contract.rs index 8d3680c2..51f8aca3 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")] + #[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, 95, 96, 90, 91, 92, 93, 94")] pub action_type: ::core::option::Option<action::ActionType>, } /// Nested message and enum types in `Action`. @@ -305,6 +305,10 @@ pub mod action { StackPanes(super::StackPanesAction), #[prost(message, tag="89")] ChangeFloatingPaneCoordinates(super::ChangeFloatingPaneCoordinatesAction), + #[prost(message, tag="95")] + TogglePaneBorderless(super::TogglePaneBorderlessAction), + #[prost(message, tag="96")] + SetPaneBorderless(super::SetPaneBorderlessAction), #[prost(message, tag="90")] TogglePaneInGroup(super::TogglePaneInGroupAction), #[prost(message, tag="91")] @@ -987,6 +991,20 @@ pub struct ChangeFloatingPaneCoordinatesAction { } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] +pub struct TogglePaneBorderlessAction { + #[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 SetPaneBorderlessAction { + #[prost(message, optional, tag="1")] + pub pane_id: ::core::option::Option<PaneId>, + #[prost(bool, tag="2")] + pub borderless: bool, +} +#[allow(clippy::derive_partial_eq_without_eq)] +#[derive(Clone, PartialEq, ::prost::Message)] pub struct Position { /// Changed from uint32 to int32 to support negative line numbers #[prost(int32, tag="1")] @@ -1148,10 +1166,8 @@ pub struct OpenFilePayload { pub file_to_open: ::prost::alloc::string::String, #[prost(uint32, optional, tag="2")] pub line_number: ::core::option::Option<u32>, - /// Renumbered after removing column_number #[prost(string, optional, tag="3")] pub cwd: ::core::option::Option<::prost::alloc::string::String>, - /// Added missing originating_plugin field #[prost(message, optional, tag="4")] pub originating_plugin: ::core::option::Option<OriginatingPlugin>, } @@ -1166,9 +1182,10 @@ pub struct FloatingPaneCoordinates { pub width: ::core::option::Option<FloatingCoordinate>, #[prost(message, optional, tag="4")] pub height: ::core::option::Option<FloatingCoordinate>, - /// Added missing pinned field #[prost(bool, optional, tag="5")] pub pinned: ::core::option::Option<bool>, + #[prost(bool, optional, tag="6")] + pub borderless: ::core::option::Option<bool>, } #[allow(clippy::derive_partial_eq_without_eq)] #[derive(Clone, PartialEq, ::prost::Message)] @@ -1225,8 +1242,8 @@ pub struct TiledPaneLayout { pub split_size: ::core::option::Option<SplitSize>, #[prost(message, optional, tag="5")] pub run: ::core::option::Option<Run>, - #[prost(bool, tag="6")] - pub borderless: bool, + #[prost(bool, optional, tag="6")] + pub borderless: ::core::option::Option<bool>, #[prost(string, optional, tag="7")] pub focus: ::core::option::Option<::prost::alloc::string::String>, #[prost(bool, optional, tag="8")] @@ -1268,6 +1285,8 @@ pub struct FloatingPaneLayout { pub pane_initial_contents: ::core::option::Option<::prost::alloc::string::String>, #[prost(uint32, optional, tag="11")] pub logical_position: ::core::option::Option<u32>, + #[prost(bool, optional, tag="12")] + pub borderless: ::core::option::Option<bool>, } #[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 d5070f2f..3704ca56 100644 --- a/zellij-utils/src/cli.rs +++ b/zellij-utils/src/cli.rs @@ -438,6 +438,10 @@ pub enum Sessions { /// if set, will open the pane near the current one rather than following the user's focus #[clap(long)] near_current_pane: bool, + /// start this pane without a border (warning: will make it impossible to move with the + /// mouse) + #[clap(short, long, value_parser)] + borderless: Option<bool>, }, /// Load a plugin #[clap(visible_alias = "p")] @@ -483,6 +487,10 @@ pub enum Sessions { /// Whether to pin a floating pane so that it is always on top #[clap(long, requires("floating"))] pinned: Option<bool>, + /// start this pane without a border (warning: will make it impossible to move with the + /// mouse) + #[clap(short, long, value_parser)] + borderless: Option<bool>, }, /// Edit file with default $EDITOR / $VISUAL #[clap(visible_alias = "e")] @@ -534,6 +542,10 @@ pub enum Sessions { /// if set, will open the pane near the current one rather than following the user's focus #[clap(long)] near_current_pane: bool, + /// start this pane without a border (warning: will make it impossible to move with the + /// mouse) + #[clap(short, long, value_parser)] + borderless: Option<bool>, }, ConvertConfig { old_config_file: PathBuf, @@ -749,6 +761,10 @@ pub enum CliAction { /// if set, will open the pane near the current one rather than following the user's focus #[clap(long)] near_current_pane: bool, + /// start this pane without a border (warning: will make it impossible to move with the + /// mouse) + #[clap(short, long, value_parser)] + borderless: Option<bool>, }, /// Open the specified file in a new zellij pane with your default EDITOR Edit { @@ -799,6 +815,10 @@ pub enum CliAction { /// if set, will open the pane near the current one rather than following the user's focus #[clap(long)] near_current_pane: bool, + /// start this pane without a border (warning: will make it impossible to move with the + /// mouse) + #[clap(short, long, value_parser)] + borderless: Option<bool>, }, /// Switch input mode of all connected clients [locked|pane|tab|resize|move|search|session] SwitchMode { @@ -1098,6 +1118,23 @@ tail -f /tmp/my-live-logfile | zellij action pipe --name logs --plugin https://e /// Whether to pin a floating pane so that it is always on top #[clap(long)] pinned: Option<bool>, + /// change this pane to be with/without a border (warning: will make it impossible to move with the + /// mouse if without a border) + #[clap(short, long, value_parser)] + borderless: Option<bool>, + }, + TogglePaneBorderless { + /// The pane_id of the pane, eg. terminal_1, plugin_2 or 3 (equivalent to terminal_3) + #[clap(short, long, value_parser)] + pane_id: String, + }, + SetPaneBorderless { + /// The pane_id of the pane, eg. terminal_1, plugin_2 or 3 (equivalent to terminal_3) + #[clap(short, long, value_parser)] + pane_id: String, + /// Whether the pane should be borderless (flag present) or bordered (flag absent) + #[clap(short, long, value_parser)] + borderless: bool, }, /// Detach from the current session Detach, diff --git a/zellij-utils/src/client_server_contract/common_types.proto b/zellij-utils/src/client_server_contract/common_types.proto index 3435718f..eae6b937 100644 --- a/zellij-utils/src/client_server_contract/common_types.proto +++ b/zellij-utils/src/client_server_contract/common_types.proto @@ -225,6 +225,8 @@ message Action { TogglePanePinnedAction toggle_pane_pinned = 87; StackPanesAction stack_panes = 88; ChangeFloatingPaneCoordinatesAction change_floating_pane_coordinates = 89; + TogglePaneBorderlessAction toggle_pane_borderless = 95; + SetPaneBorderlessAction set_pane_borderless = 96; TogglePaneInGroupAction toggle_pane_in_group = 90; ToggleGroupMarkingAction toggle_group_marking = 91; SwitchSessionAction switch_session = 92; @@ -575,6 +577,15 @@ message ChangeFloatingPaneCoordinatesAction { FloatingPaneCoordinates coordinates = 2; } +message TogglePaneBorderlessAction { + PaneId pane_id = 1; +} + +message SetPaneBorderlessAction { + PaneId pane_id = 1; + bool borderless = 2; +} + // Supporting enums and messages enum InputMode { INPUT_MODE_UNSPECIFIED = 0; @@ -715,8 +726,8 @@ enum ExitReason { message OpenFilePayload { string file_to_open = 1; optional uint32 line_number = 2; - optional string cwd = 3; // Renumbered after removing column_number - optional OriginatingPlugin originating_plugin = 4; // Added missing originating_plugin field + optional string cwd = 3; + optional OriginatingPlugin originating_plugin = 4; } message FloatingPaneCoordinates { @@ -724,7 +735,8 @@ message FloatingPaneCoordinates { optional FloatingCoordinate y = 2; optional FloatingCoordinate width = 3; optional FloatingCoordinate height = 4; - optional bool pinned = 5; // Added missing pinned field + optional bool pinned = 5; + optional bool borderless = 6; } message FloatingCoordinate { @@ -751,7 +763,7 @@ message TiledPaneLayout { repeated TiledPaneLayout children = 3; optional SplitSize split_size = 4; optional Run run = 5; - bool borderless = 6; + optional bool borderless = 6; optional string focus = 7; optional bool exclude_from_sync = 8; bool children_are_stacked = 9; @@ -774,6 +786,7 @@ message FloatingPaneLayout { bool already_running = 9; optional string pane_initial_contents = 10; optional uint32 logical_position = 11; + optional bool borderless = 12; } message SwapTiledLayout { diff --git a/zellij-utils/src/data.rs b/zellij-utils/src/data.rs index b5cbcf8d..6c6237c1 100644 --- a/zellij-utils/src/data.rs +++ b/zellij-utils/src/data.rs @@ -2768,6 +2768,7 @@ pub struct FloatingPaneCoordinates { pub width: Option<PercentOrFixed>, pub height: Option<PercentOrFixed>, pub pinned: Option<bool>, + pub borderless: Option<bool>, } impl FloatingPaneCoordinates { @@ -2777,6 +2778,7 @@ impl FloatingPaneCoordinates { width: Option<String>, height: Option<String>, pinned: Option<bool>, + borderless: Option<bool>, ) -> Option<Self> { // Parse x/y coordinates - allows 0% or 0 let x = x.and_then(|x| PercentOrFixed::from_str(&x).ok()); @@ -2802,7 +2804,13 @@ impl FloatingPaneCoordinates { }) }); - if x.is_none() && y.is_none() && width.is_none() && height.is_none() && pinned.is_none() { + if x.is_none() + && y.is_none() + && width.is_none() + && height.is_none() + && pinned.is_none() + && borderless.is_none() + { None } else { Some(FloatingPaneCoordinates { @@ -2811,6 +2819,7 @@ impl FloatingPaneCoordinates { width, height, pinned, + borderless, }) } } @@ -2872,6 +2881,7 @@ impl From<PaneGeom> for FloatingPaneCoordinates { width: Some(PercentOrFixed::Fixed(pane_geom.cols.as_usize())), height: Some(PercentOrFixed::Fixed(pane_geom.rows.as_usize())), pinned: Some(pane_geom.is_pinned), + borderless: None, } } } @@ -3204,6 +3214,8 @@ pub enum PluginCommand { SetFloatingPanePinned(PaneId, bool), // bool -> should be pinned StackPanes(Vec<PaneId>), ChangeFloatingPanesCoordinates(Vec<(PaneId, FloatingPaneCoordinates)>), + TogglePaneBorderless(PaneId), + SetPaneBorderless(PaneId, bool), OpenCommandPaneNearPlugin(CommandToRun, Context), OpenTerminalNearPlugin(FileToOpen), OpenTerminalFloatingNearPlugin(FileToOpen, Option<FloatingPaneCoordinates>), diff --git a/zellij-utils/src/errors.rs b/zellij-utils/src/errors.rs index 06f69e06..081baf8b 100644 --- a/zellij-utils/src/errors.rs +++ b/zellij-utils/src/errors.rs @@ -380,6 +380,8 @@ pub enum ScreenContext { SetFloatingPanePinned, StackPanes, ChangeFloatingPanesCoordinates, + TogglePaneBorderless, + SetPaneBorderless, AddHighlightPaneFrameColorOverride, GroupAndUngroupPanes, HighlightAndUnhighlightPanes, diff --git a/zellij-utils/src/input/actions.rs b/zellij-utils/src/input/actions.rs index caeadf4d..bcf79f03 100644 --- a/zellij-utils/src/input/actions.rs +++ b/zellij-utils/src/input/actions.rs @@ -451,6 +451,13 @@ pub enum Action { pane_id: PaneId, coordinates: FloatingPaneCoordinates, }, + TogglePaneBorderless { + pane_id: PaneId, + }, + SetPaneBorderless { + pane_id: PaneId, + borderless: bool, + }, TogglePaneInGroup, ToggleGroupMarking, } @@ -548,6 +555,7 @@ impl Action { blocking, unblock_condition, near_current_pane, + borderless, } => { let current_dir = get_current_dir(); // cwd should only be specified in a plugin alias if it was explicitly given to us, @@ -582,7 +590,7 @@ impl Action { let placement = if floating { NewPanePlacement::Floating(FloatingPaneCoordinates::new( - x, y, width, height, pinned, + x, y, width, height, pinned, borderless, )) } else if in_place { NewPanePlacement::InPlace { @@ -629,7 +637,9 @@ impl Action { pane_name: name, skip_cache: skip_plugin_cache, cwd, - coordinates: FloatingPaneCoordinates::new(x, y, width, height, pinned), + coordinates: FloatingPaneCoordinates::new( + x, y, width, height, pinned, borderless, + ), }]) } else if in_place { Ok(vec![Action::NewInPlacePluginPane { @@ -671,7 +681,9 @@ impl Action { Ok(vec![Action::NewFloatingPane { command: Some(run_command_action), pane_name: name, - coordinates: FloatingPaneCoordinates::new(x, y, width, height, pinned), + coordinates: FloatingPaneCoordinates::new( + x, y, width, height, pinned, borderless, + ), near_current_pane, }]) } else if in_place { @@ -701,7 +713,9 @@ impl Action { Ok(vec![Action::NewFloatingPane { command: None, pane_name: name, - coordinates: FloatingPaneCoordinates::new(x, y, width, height, pinned), + coordinates: FloatingPaneCoordinates::new( + x, y, width, height, pinned, borderless, + ), near_current_pane, }]) } else if in_place { @@ -741,6 +755,7 @@ impl Action { height, pinned, near_current_pane, + borderless, } => { let mut file = file; let current_dir = get_current_dir(); @@ -759,7 +774,9 @@ impl Action { floating, in_place, start_suppressed, - coordinates: FloatingPaneCoordinates::new(x, y, width, height, pinned), + coordinates: FloatingPaneCoordinates::new( + x, y, width, height, pinned, borderless, + ), near_current_pane, }]) }, @@ -1204,8 +1221,10 @@ impl Action { width, height, pinned, + borderless, } => { - let Some(coordinates) = FloatingPaneCoordinates::new(x, y, width, height, pinned) + let Some(coordinates) = + FloatingPaneCoordinates::new(x, y, width, height, pinned, borderless) else { return Err(format!("Failed to parse floating pane coordinates")); }; @@ -1225,6 +1244,42 @@ impl Action { } } }, + CliAction::TogglePaneBorderless { pane_id } => { + let parsed_pane_id = PaneId::from_str(&pane_id); + match parsed_pane_id { + Ok(parsed_pane_id) => { + Ok(vec![Action::TogglePaneBorderless { + pane_id: parsed_pane_id, + }]) + }, + Err(_e) => { + Err(format!( + "Malformed pane id: {}, expecting either a bare integer (eg. 1), a terminal pane id (eg. terminal_1) or a plugin pane id (eg. plugin_1)", + pane_id + )) + } + } + }, + CliAction::SetPaneBorderless { + pane_id, + borderless, + } => { + let parsed_pane_id = PaneId::from_str(&pane_id); + match parsed_pane_id { + Ok(parsed_pane_id) => { + Ok(vec![Action::SetPaneBorderless { + pane_id: parsed_pane_id, + borderless, + }]) + }, + Err(_e) => { + Err(format!( + "Malformed pane id: {}, expecting either a bare integer (eg. 1), a terminal pane id (eg. terminal_1) or a plugin pane id (eg. plugin_1)", + pane_id + )) + } + } + }, CliAction::Detach => Ok(vec![Action::Detach]), CliAction::SwitchSession { name, diff --git a/zellij-utils/src/input/layout.rs b/zellij-utils/src/input/layout.rs index a7b2ebc6..75b1e70b 100644 --- a/zellij-utils/src/input/layout.rs +++ b/zellij-utils/src/input/layout.rs @@ -790,6 +790,7 @@ pub struct FloatingPaneLayout { pub x: Option<PercentOrFixed>, pub y: Option<PercentOrFixed>, pub pinned: Option<bool>, + pub borderless: Option<bool>, pub run: Option<Run>, pub focus: Option<bool>, pub already_running: bool, @@ -806,6 +807,7 @@ impl FloatingPaneLayout { x: None, y: None, pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -846,7 +848,7 @@ pub struct TiledPaneLayout { pub children: Vec<TiledPaneLayout>, pub split_size: Option<SplitSize>, pub run: Option<Run>, - pub borderless: bool, + pub borderless: Option<bool>, pub focus: Option<bool>, pub external_children_index: Option<usize>, pub children_are_stacked: bool, diff --git a/zellij-utils/src/input/unit/layout_test.rs b/zellij-utils/src/input/unit/layout_test.rs index 8a86247f..f0cbae7b 100644 --- a/zellij-utils/src/input/unit/layout_test.rs +++ b/zellij-utils/src/input/unit/layout_test.rs @@ -601,7 +601,7 @@ fn layout_with_borderless_panes() { template: Some(( TiledPaneLayout { children: vec![TiledPaneLayout { - borderless: true, + borderless: Some(true), ..Default::default() }], ..Default::default() @@ -2373,6 +2373,7 @@ fn floating_pane_coordinates_allows_zero_percent_for_x_y() { Some("50%".to_string()), Some("50%".to_string()), None, + Some(false), ); assert!(coords.is_some()); @@ -2394,6 +2395,7 @@ fn floating_pane_coordinates_rejects_zero_percent_for_width() { Some("0%".to_string()), Some("50%".to_string()), None, + Some(false), ); // Should have coords but width will be None due to rejection @@ -2414,6 +2416,7 @@ fn floating_pane_coordinates_rejects_zero_percent_for_height() { Some("50%".to_string()), Some("0%".to_string()), None, + Some(false), ); // Should have coords but height will be None due to rejection @@ -2434,6 +2437,7 @@ fn floating_pane_coordinates_static_zero_works() { Some("100".to_string()), Some("100".to_string()), None, + Some(false), ); assert!(coords.is_some()); @@ -2455,6 +2459,7 @@ fn floating_pane_coordinates_one_percent_works() { Some("50%".to_string()), Some("50%".to_string()), None, + Some(false), ); assert!(coords.is_some()); diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_added_to_args_in_template.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_added_to_args_in_template.snap index 84d969b1..92117f30 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_added_to_args_in_template.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_added_to_args_in_template.snap @@ -29,7 +29,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -60,7 +60,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -73,7 +73,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_override_args_in_template.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_override_args_in_template.snap index 6abf533a..50cb55ff 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_override_args_in_template.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__args_override_args_in_template.snap @@ -32,7 +32,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -63,7 +63,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -76,7 +76,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_a_stack_with_an_expanded_pane.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_a_stack_with_an_expanded_pane.snap index 6a7e9aa6..b9c0bbf2 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_a_stack_with_an_expanded_pane.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_a_stack_with_an_expanded_pane.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/input/./unit/layout_test.rs -assertion_line: 1926 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -22,7 +21,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -38,7 +37,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -54,7 +53,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -67,7 +66,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: true, @@ -80,7 +79,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_node.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_node.snap index cb37a62e..1bc75b25 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_node.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_node.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/input/./unit/layout_test.rs -assertion_line: 1894 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -22,7 +21,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -38,7 +37,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -51,7 +50,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: true, @@ -64,7 +63,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_template.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_template.snap index a73fa6bf..3de11489 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_template.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_define_stacked_children_for_pane_template.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/input/./unit/layout_test.rs -assertion_line: 1911 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -26,7 +25,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -42,7 +41,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -55,7 +54,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: true, @@ -68,7 +67,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: true, @@ -81,7 +80,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_load_swap_layouts_from_a_different_file.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_load_swap_layouts_from_a_different_file.snap index 605b099f..164ddb71 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_load_swap_layouts_from_a_different_file.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__can_load_swap_layouts_from_a_different_file.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/input/./unit/layout_test.rs -assertion_line: 1938 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -18,7 +17,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -31,7 +30,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -81,7 +80,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -105,7 +106,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -121,7 +122,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -136,7 +137,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -149,7 +150,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -186,7 +187,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -199,7 +202,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -242,7 +245,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -266,7 +271,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -288,7 +293,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -304,7 +309,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -320,7 +325,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -336,7 +341,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -349,7 +354,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -362,7 +367,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -375,7 +380,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -412,7 +417,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -425,7 +432,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -468,7 +475,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -492,7 +501,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -514,7 +523,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -530,7 +539,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -546,7 +555,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -562,7 +571,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -575,7 +584,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -595,7 +604,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -611,7 +620,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -627,7 +636,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -643,7 +652,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -656,7 +665,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -669,7 +678,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -682,7 +691,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -719,7 +728,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -732,7 +743,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__children_not_as_first_child_of_pane_template.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__children_not_as_first_child_of_pane_template.snap index 40bb0581..d8debed4 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__children_not_as_first_child_of_pane_template.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__children_not_as_first_child_of_pane_template.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/input/./unit/layout_test.rs -assertion_line: 975 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -28,7 +27,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -48,7 +47,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -64,7 +63,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -77,7 +76,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -90,7 +89,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -106,7 +105,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -119,7 +118,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -143,7 +142,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -156,7 +155,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 1, @@ -174,7 +173,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -187,7 +186,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -200,7 +199,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__children_not_as_first_child_of_tab_template.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__children_not_as_first_child_of_tab_template.snap index 9dde780b..668489c1 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__children_not_as_first_child_of_tab_template.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__children_not_as_first_child_of_tab_template.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/input/./unit/layout_test.rs -assertion_line: 927 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -23,7 +22,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -43,7 +42,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -59,7 +58,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -72,7 +71,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -85,7 +84,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -101,7 +100,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -114,7 +113,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -142,7 +141,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -155,7 +154,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 1, @@ -173,7 +172,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -186,7 +185,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -208,7 +207,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__close_on_exit_added_to_close_on_exit_in_template.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__close_on_exit_added_to_close_on_exit_in_template.snap index 6241564a..afde0f8f 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__close_on_exit_added_to_close_on_exit_in_template.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__close_on_exit_added_to_close_on_exit_in_template.snap @@ -29,7 +29,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -57,7 +57,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -70,7 +70,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__close_on_exit_overrides_close_on_exit_in_template.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__close_on_exit_overrides_close_on_exit_in_template.snap index 6241564a..afde0f8f 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__close_on_exit_overrides_close_on_exit_in_template.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__close_on_exit_overrides_close_on_exit_in_template.snap @@ -29,7 +29,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -57,7 +57,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -70,7 +70,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__combined_tab_and_pane_template_both_with_children.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__combined_tab_and_pane_template_both_with_children.snap index 85b2dcfe..d1eba165 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__combined_tab_and_pane_template_both_with_children.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__combined_tab_and_pane_template_both_with_children.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/input/./unit/layout_test.rs -assertion_line: 1027 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -23,7 +22,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -45,7 +44,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -58,7 +57,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -74,7 +73,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -87,7 +86,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -107,7 +106,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -123,7 +122,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -136,7 +135,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -149,7 +148,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -177,7 +176,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -199,7 +198,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -212,7 +211,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -228,7 +227,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -241,7 +240,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -257,7 +256,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -270,7 +269,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -292,7 +291,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__cwd_added_to_cwd_in_template.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__cwd_added_to_cwd_in_template.snap index 129cfe2b..f506e101 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__cwd_added_to_cwd_in_template.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__cwd_added_to_cwd_in_template.snap @@ -29,7 +29,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -59,7 +59,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -72,7 +72,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__cwd_override_cwd_in_template.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__cwd_override_cwd_in_template.snap index 9d8bb4f0..62a41cf5 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__cwd_override_cwd_in_template.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__cwd_override_cwd_in_template.snap @@ -31,7 +31,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -61,7 +61,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -74,7 +74,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__env_var_expansion.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__env_var_expansion.snap index 2c5b1bdc..926c98b9 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__env_var_expansion.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__env_var_expansion.snap @@ -20,7 +20,7 @@ Layout { "/abs/path/relative", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -40,7 +40,7 @@ Layout { "/another/abs", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -60,7 +60,7 @@ Layout { "/another/abs", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -80,7 +80,7 @@ Layout { "/abs/path/relative", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -110,7 +110,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -134,7 +134,7 @@ Layout { ), ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -158,7 +158,7 @@ Layout { ), ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -188,7 +188,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -212,7 +212,7 @@ Layout { ), ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -229,7 +229,7 @@ Layout { "/abs/path", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -259,7 +259,7 @@ Layout { "/abs/path/relative", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -279,7 +279,7 @@ Layout { "/another/abs", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -299,7 +299,7 @@ Layout { "/another/abs", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -319,7 +319,7 @@ Layout { "/abs/path/relative", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -349,7 +349,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -373,7 +373,7 @@ Layout { ), ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -397,7 +397,7 @@ Layout { ), ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -427,7 +427,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -451,7 +451,7 @@ Layout { ), ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -468,7 +468,7 @@ Layout { "/abs/path", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd.snap index 7d3c782f..100723b0 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd.snap @@ -20,7 +20,7 @@ Layout { "/tmp/./foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -50,7 +50,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -67,7 +67,7 @@ Layout { "/tmp/./foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -89,7 +89,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd_in_pane_templates.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd_in_pane_templates.snap index b5e33434..a904f8b8 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd_in_pane_templates.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd_in_pane_templates.snap @@ -24,7 +24,7 @@ Layout { "/tmp/./foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -54,7 +54,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -78,7 +78,7 @@ Layout { "/tmp/./foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -95,7 +95,7 @@ Layout { "/tmp/./foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -112,7 +112,7 @@ Layout { "/tmp/./foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -129,7 +129,7 @@ Layout { "/tmp/./foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -151,7 +151,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd_in_tab_templates.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd_in_tab_templates.snap index c9826972..c295617a 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd_in_tab_templates.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_and_tab_cwd_prepended_to_panes_with_and_without_cwd_in_tab_templates.snap @@ -20,7 +20,7 @@ Layout { "/tmp/./foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -50,7 +50,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -74,7 +74,7 @@ Layout { "/tmp/./foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -91,7 +91,7 @@ Layout { "/tmp/./foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -108,7 +108,7 @@ Layout { "/tmp/./foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -130,7 +130,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_given_to_panes_without_cwd.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_given_to_panes_without_cwd.snap index eca5399e..dd93444f 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_given_to_panes_without_cwd.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_given_to_panes_without_cwd.snap @@ -20,7 +20,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -50,7 +50,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -67,7 +67,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -97,7 +97,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -127,7 +127,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -144,7 +144,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_passed_from_layout_constructor.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_passed_from_layout_constructor.snap index 0d5a8d8c..be32b092 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_passed_from_layout_constructor.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_passed_from_layout_constructor.snap @@ -21,7 +21,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -51,7 +51,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -68,7 +68,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_passed_from_layout_constructor_overrides_global_cwd_in_layout_file.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_passed_from_layout_constructor_overrides_global_cwd_in_layout_file.snap index fd0fc3a7..8f71561f 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_passed_from_layout_constructor_overrides_global_cwd_in_layout_file.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_passed_from_layout_constructor_overrides_global_cwd_in_layout_file.snap @@ -20,7 +20,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -50,7 +50,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -67,7 +67,7 @@ Layout { "/home", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -97,7 +97,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -127,7 +127,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -144,7 +144,7 @@ Layout { "/home", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_prepended_to_panes_with_cwd.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_prepended_to_panes_with_cwd.snap index 62bce0d4..5561302c 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_prepended_to_panes_with_cwd.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_prepended_to_panes_with_cwd.snap @@ -20,7 +20,7 @@ Layout { "/tmp/foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -50,7 +50,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -67,7 +67,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -97,7 +97,7 @@ Layout { "/tmp/foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -127,7 +127,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -144,7 +144,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_with_tab_cwd_given_to_panes_without_cwd.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_with_tab_cwd_given_to_panes_without_cwd.snap index 2fe2a45d..ea72b0f3 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_with_tab_cwd_given_to_panes_without_cwd.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__global_cwd_with_tab_cwd_given_to_panes_without_cwd.snap @@ -20,7 +20,7 @@ Layout { "/tmp/./foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -50,7 +50,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -67,7 +67,7 @@ Layout { "/tmp/./foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -89,7 +89,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_command_panes_and_close_on_exit.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_command_panes_and_close_on_exit.snap index e4d1e6e7..54bf2a0c 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_command_panes_and_close_on_exit.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_command_panes_and_close_on_exit.snap @@ -29,7 +29,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -42,7 +42,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_command_panes_and_start_suspended.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_command_panes_and_start_suspended.snap index 6241ad1b..fb72c8d7 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_command_panes_and_start_suspended.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_command_panes_and_start_suspended.snap @@ -29,7 +29,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -42,7 +42,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_default_tab_template.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_default_tab_template.snap index 81abc998..5534df4c 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_default_tab_template.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_default_tab_template.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/input/./unit/layout_test.rs -assertion_line: 786 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -19,7 +18,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -39,7 +38,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -55,7 +54,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -68,7 +67,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -84,7 +83,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -97,7 +96,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -123,7 +122,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -143,7 +142,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -159,7 +158,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -172,7 +171,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -188,7 +187,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -201,7 +200,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -225,7 +224,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -241,7 +240,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -257,7 +256,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -270,7 +269,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -296,7 +295,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -312,7 +311,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -328,7 +327,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -341,7 +340,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_nested_branched_pane_templates.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_nested_branched_pane_templates.snap index 42983dee..d840f90c 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_nested_branched_pane_templates.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_nested_branched_pane_templates.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/input/./unit/layout_test.rs -assertion_line: 881 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -22,7 +21,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -38,7 +37,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -58,7 +57,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -74,7 +73,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -87,7 +86,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -107,7 +106,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -123,7 +122,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -139,7 +138,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -152,7 +151,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -165,7 +164,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -178,7 +177,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_nested_pane_templates.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_nested_pane_templates.snap index 06102b00..bf4f7934 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_nested_pane_templates.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_nested_pane_templates.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/input/./unit/layout_test.rs -assertion_line: 855 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -22,7 +21,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -38,7 +37,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -58,7 +57,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -74,7 +73,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -87,7 +86,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -103,7 +102,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -116,7 +115,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -129,7 +128,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_new_tab_template.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_new_tab_template.snap index 701dd1b4..1b32a429 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_new_tab_template.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_new_tab_template.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/input/./unit/layout_test.rs -assertion_line: 846 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -19,7 +18,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -35,7 +34,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -48,7 +47,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -74,7 +73,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -90,7 +89,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -103,7 +102,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -123,7 +122,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -153,7 +152,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -169,7 +168,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -182,7 +181,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -195,7 +194,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_pane_excluded_from_sync.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_pane_excluded_from_sync.snap index 1b56c2e8..81d7fd34 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_pane_excluded_from_sync.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_pane_excluded_from_sync.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/input/./unit/layout_test.rs -assertion_line: 1038 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -18,7 +17,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -33,7 +32,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_pane_templates.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_pane_templates.snap index 7a836351..4cd8c5f6 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_pane_templates.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_pane_templates.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/input/./unit/layout_test.rs -assertion_line: 813 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -22,7 +21,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -42,7 +41,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -55,7 +54,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -71,7 +70,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -84,7 +83,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -104,7 +103,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -124,7 +123,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -140,7 +139,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -153,7 +152,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -169,7 +168,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -182,7 +181,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -202,7 +201,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -222,7 +221,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -238,7 +237,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -251,7 +250,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -267,7 +266,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -280,7 +279,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -300,7 +299,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -316,7 +315,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -332,7 +331,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -345,7 +344,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -358,7 +357,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_tab_and_pane_templates.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_tab_and_pane_templates.snap index 5a9cdc96..c5d1e092 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_tab_and_pane_templates.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_tab_and_pane_templates.snap @@ -20,7 +20,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -52,7 +52,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -65,7 +65,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -81,7 +81,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -94,7 +94,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -107,7 +107,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -129,7 +129,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_tabs_and_floating_panes.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_tabs_and_floating_panes.snap index 95f60225..87d7ec68 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_tabs_and_floating_panes.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__layout_with_tabs_and_floating_panes.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/input/./unit/layout_test.rs -assertion_line: 305 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -17,7 +16,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -30,7 +29,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -48,6 +47,7 @@ Layout { x: None, y: None, pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -68,7 +68,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -81,7 +81,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -99,6 +99,7 @@ Layout { x: None, y: None, pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -112,6 +113,7 @@ Layout { x: None, y: None, pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -130,7 +132,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_is_overriden_by_its_consumers_bare_cwd.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_is_overriden_by_its_consumers_bare_cwd.snap index 1698b575..4813f482 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_is_overriden_by_its_consumers_bare_cwd.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_is_overriden_by_its_consumers_bare_cwd.snap @@ -30,7 +30,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -47,7 +47,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -87,7 +87,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -104,7 +104,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_overriden_by_its_consumers_command_cwd.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_overriden_by_its_consumers_command_cwd.snap index ea74b798..eee14300 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_overriden_by_its_consumers_command_cwd.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_overriden_by_its_consumers_command_cwd.snap @@ -30,7 +30,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -47,7 +47,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -87,7 +87,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -104,7 +104,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_remains_when_its_consumer_command_does_not_have_a_cwd.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_remains_when_its_consumer_command_does_not_have_a_cwd.snap index 4ab7252f..68cc0653 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_remains_when_its_consumer_command_does_not_have_a_cwd.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_with_cwd_remains_when_its_consumer_command_does_not_have_a_cwd.snap @@ -30,7 +30,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -47,7 +47,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -87,7 +87,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -104,7 +104,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_without_cwd_is_overriden_by_its_consumers_cwd.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_without_cwd_is_overriden_by_its_consumers_cwd.snap index 4ab7252f..68cc0653 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_without_cwd_is_overriden_by_its_consumers_cwd.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_without_cwd_is_overriden_by_its_consumers_cwd.snap @@ -30,7 +30,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -47,7 +47,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -87,7 +87,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -104,7 +104,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_without_cwd_receives_its_consumers_bare_cwd.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_without_cwd_receives_its_consumers_bare_cwd.snap index 1698b575..4813f482 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_without_cwd_receives_its_consumers_bare_cwd.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_command_without_cwd_receives_its_consumers_bare_cwd.snap @@ -30,7 +30,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -47,7 +47,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -87,7 +87,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -104,7 +104,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_cwd_overriden_by_its_consumers_bare_cwd.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_cwd_overriden_by_its_consumers_bare_cwd.snap index 9ff94a33..3663a4de 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_cwd_overriden_by_its_consumers_bare_cwd.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_cwd_overriden_by_its_consumers_bare_cwd.snap @@ -20,7 +20,7 @@ Layout { "/tmp/bar", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -37,7 +37,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -67,7 +67,7 @@ Layout { "/tmp/bar", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -84,7 +84,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_command_with_cwd.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_command_with_cwd.snap index 1698b575..4813f482 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_command_with_cwd.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_command_with_cwd.snap @@ -30,7 +30,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -47,7 +47,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -87,7 +87,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -104,7 +104,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_command_without_cwd.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_command_without_cwd.snap index a33edb62..b6e8054b 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_command_without_cwd.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_command_without_cwd.snap @@ -30,7 +30,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -47,7 +47,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -87,7 +87,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -104,7 +104,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_edit.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_edit.snap index b12ec15b..dedbca10 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_edit.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_bare_propagated_to_its_consumer_edit.snap @@ -24,7 +24,7 @@ Layout { ), ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -41,7 +41,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -75,7 +75,7 @@ Layout { ), ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -92,7 +92,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_command_propagated_to_its_consumer_edit.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_command_propagated_to_its_consumer_edit.snap index c716ad07..407aa8df 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_command_propagated_to_its_consumer_edit.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__pane_template_with_command_propagated_to_its_consumer_edit.snap @@ -24,7 +24,7 @@ Layout { ), ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -41,7 +41,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -75,7 +75,7 @@ Layout { ), ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -92,7 +92,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__tab_cwd_given_to_panes_without_cwd.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__tab_cwd_given_to_panes_without_cwd.snap index 712b4697..e281ddf0 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__tab_cwd_given_to_panes_without_cwd.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__tab_cwd_given_to_panes_without_cwd.snap @@ -20,7 +20,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -50,7 +50,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -67,7 +67,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -89,7 +89,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__tab_cwd_prepended_to_panes_with_cwd.snap b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__tab_cwd_prepended_to_panes_with_cwd.snap index aa4821ba..babaab58 100644 --- a/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__tab_cwd_prepended_to_panes_with_cwd.snap +++ b/zellij-utils/src/input/unit/snapshots/zellij_utils__input__layout__layout_test__tab_cwd_prepended_to_panes_with_cwd.snap @@ -20,7 +20,7 @@ Layout { "/tmp/./foo", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -50,7 +50,7 @@ Layout { }, ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -67,7 +67,7 @@ Layout { "/tmp", ), ), - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -89,7 +89,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/ipc/protobuf_conversion.rs b/zellij-utils/src/ipc/protobuf_conversion.rs index 7539fa15..4b02cc7e 100644 --- a/zellij-utils/src/ipc/protobuf_conversion.rs +++ b/zellij-utils/src/ipc/protobuf_conversion.rs @@ -730,13 +730,14 @@ impl From<crate::input::actions::Action> RenameSessionAction, RenameTabAction, RenameTerminalPaneAction, ResizeAction, RunAction, ScrollDownAction, ScrollDownAtAction, ScrollToBottomAction, ScrollToTopAction, ScrollUpAction, ScrollUpAtAction, SearchAction, SearchInputAction, - SearchToggleOptionAction, SkipConfirmAction, StackPanesAction, + SearchToggleOptionAction, SetPaneBorderlessAction, SkipConfirmAction, StackPanesAction, StartOrReloadPluginAction, SwitchFocusAction, SwitchModeForAllClientsAction, SwitchSessionAction, SwitchToModeAction, TabNameInputAction, ToggleActiveSyncTabAction, ToggleFloatingPanesAction, ToggleFocusFullscreenAction, ToggleGroupMarkingAction, - ToggleMouseModeAction, TogglePaneEmbedOrFloatingAction, TogglePaneFramesAction, - TogglePaneInGroupAction, TogglePanePinnedAction, ToggleTabAction, UndoRenamePaneAction, - UndoRenameTabAction, WriteAction, WriteCharsAction, + ToggleMouseModeAction, TogglePaneBorderlessAction, TogglePaneEmbedOrFloatingAction, + TogglePaneFramesAction, TogglePaneInGroupAction, TogglePanePinnedAction, + ToggleTabAction, UndoRenamePaneAction, UndoRenameTabAction, WriteAction, + WriteCharsAction, }; use std::collections::HashMap; @@ -1282,6 +1283,18 @@ impl From<crate::input::actions::Action> pane_id: Some(pane_id.into()), coordinates: Some(coordinates.into()), }), + crate::input::actions::Action::TogglePaneBorderless { pane_id } => { + ActionType::TogglePaneBorderless(TogglePaneBorderlessAction { + pane_id: Some(pane_id.into()), + }) + }, + crate::input::actions::Action::SetPaneBorderless { + pane_id, + borderless, + } => ActionType::SetPaneBorderless(SetPaneBorderlessAction { + pane_id: Some(pane_id.into()), + borderless, + }), crate::input::actions::Action::TogglePaneInGroup => { ActionType::TogglePaneInGroup(TogglePaneInGroupAction {}) }, @@ -1876,6 +1889,23 @@ impl TryFrom<crate::client_server_contract::client_server_contract::Action> .try_into()?, }, ), + ActionType::TogglePaneBorderless(toggle_borderless_action) => { + Ok(crate::input::actions::Action::TogglePaneBorderless { + pane_id: toggle_borderless_action + .pane_id + .ok_or_else(|| anyhow!("TogglePaneBorderless missing pane_id"))? + .try_into()?, + }) + }, + ActionType::SetPaneBorderless(set_borderless_action) => { + Ok(crate::input::actions::Action::SetPaneBorderless { + pane_id: set_borderless_action + .pane_id + .ok_or_else(|| anyhow!("SetPaneBorderless missing pane_id"))? + .try_into()?, + borderless: set_borderless_action.borderless, + }) + }, ActionType::TogglePaneInGroup(_) => { Ok(crate::input::actions::Action::TogglePaneInGroup) }, @@ -2491,6 +2521,7 @@ impl From<crate::data::FloatingPaneCoordinates> width: coords.width.map(|w| w.into()), height: coords.height.map(|h| h.into()), pinned: coords.pinned, + borderless: coords.borderless, } } } @@ -2509,6 +2540,7 @@ impl TryFrom<crate::client_server_contract::client_server_contract::FloatingPane width: coords.width.map(|w| w.try_into()).transpose()?, height: coords.height.map(|h| h.try_into()).transpose()?, pinned: coords.pinned, + borderless: coords.borderless, }) } } @@ -2883,6 +2915,7 @@ impl From<crate::input::layout::FloatingPaneLayout> already_running: layout.already_running, pane_initial_contents: layout.pane_initial_contents, logical_position: layout.logical_position.map(|l| l as u32), + borderless: layout.borderless, } } } @@ -3307,6 +3340,7 @@ impl TryFrom<crate::client_server_contract::client_server_contract::FloatingPane already_running: layout.already_running, pane_initial_contents: layout.pane_initial_contents, logical_position: layout.logical_position.map(|p| p as usize), + borderless: layout.borderless, }) } } diff --git a/zellij-utils/src/ipc/tests/roundtrip_tests.rs b/zellij-utils/src/ipc/tests/roundtrip_tests.rs index 01275198..a16759e3 100644 --- a/zellij-utils/src/ipc/tests/roundtrip_tests.rs +++ b/zellij-utils/src/ipc/tests/roundtrip_tests.rs @@ -1088,7 +1088,7 @@ fn test_client_messages() { floating: true, in_place: true, start_suppressed: true, - coordinates: FloatingPaneCoordinates::new(None, None, None, None, None), + coordinates: FloatingPaneCoordinates::new(None, None, None, None, None, Some(false)), near_current_pane: false, }, terminal_id: Some(1), @@ -1116,7 +1116,8 @@ fn test_client_messages() { None, None, None, - None + None, + Some(false), ), near_current_pane: false, }, @@ -1145,7 +1146,8 @@ fn test_client_messages() { None, None, None, - None + None, + Some(false), ), near_current_pane: false, }, @@ -1174,7 +1176,8 @@ fn test_client_messages() { Some("50%".to_owned()), Some("10".to_owned()), Some("20".to_owned()), - Some(true) + Some(true), + Some(false), ), near_current_pane: false, }, @@ -1198,7 +1201,14 @@ fn test_client_messages() { floating: true, in_place: true, start_suppressed: true, - coordinates: FloatingPaneCoordinates::new(None, None, None, None, Some(false)), + coordinates: FloatingPaneCoordinates::new( + None, + None, + None, + None, + Some(false), + Some(false) + ), near_current_pane: false, }, terminal_id: Some(1), @@ -1234,7 +1244,8 @@ fn test_client_messages() { None, None, None, - None + None, + Some(false), ), near_current_pane: false, }, @@ -1264,7 +1275,8 @@ fn test_client_messages() { None, None, None, - None + None, + Some(false), ), near_current_pane: false, }, @@ -1944,6 +1956,7 @@ fn test_client_messages() { x: Some(PercentOrFixed::Percent(30)), y: Some(PercentOrFixed::Percent(40)), pinned: Some(true), + borderless: None, run: Some(Run::Cwd(PathBuf::from("/path/to/cwd"))), focus: Some(true), already_running: true, @@ -2405,7 +2418,8 @@ fn test_client_messages() { Some("10%".to_owned()), None, None, - Some(true) + Some(true), + Some(false), ), }, terminal_id: Some(1), @@ -2650,7 +2664,25 @@ fn test_client_messages() { None, None, Some("10%".to_owned()), - Some(false) + Some(false), + Some(false), + ) + .unwrap(), + }, + terminal_id: Some(1), + client_id: Some(100), + is_cli_client: true, + }); + test_client_roundtrip!(ClientToServerMsg::Action { + action: Action::ChangeFloatingPaneCoordinates { + pane_id: PaneId::Terminal(0), + coordinates: FloatingPaneCoordinates::new( + None, + None, + None, + Some("10%".to_owned()), + Some(false), + Some(true), ) .unwrap(), }, diff --git a/zellij-utils/src/kdl/kdl_layout_parser.rs b/zellij-utils/src/kdl/kdl_layout_parser.rs index 38cda189..6e1e2c76 100644 --- a/zellij-utils/src/kdl/kdl_layout_parser.rs +++ b/zellij-utils/src/kdl/kdl_layout_parser.rs @@ -573,7 +573,7 @@ impl<'a> KdlLayoutParser<'a> { }) }); Ok(TiledPaneLayout { - borderless: borderless.unwrap_or_default(), + borderless, focus, name, split_size, @@ -598,6 +598,7 @@ impl<'a> KdlLayoutParser<'a> { let x = self.parse_percent_or_fixed(kdl_node, "x", true)?; let y = self.parse_percent_or_fixed(kdl_node, "y", true)?; let pinned = kdl_get_bool_property_or_child_value_with_error!(kdl_node, "pinned"); + let borderless = kdl_get_bool_property_or_child_value_with_error!(kdl_node, "borderless"); let run = self.parse_command_plugin_or_edit_block(kdl_node)?; let focus = kdl_get_bool_property_or_child_value_with_error!(kdl_node, "focus"); let name = kdl_get_string_property_or_child_value_with_error!(kdl_node, "name") @@ -622,6 +623,7 @@ impl<'a> KdlLayoutParser<'a> { run, focus, pinned, + borderless, pane_initial_contents, ..Default::default() }) @@ -747,7 +749,7 @@ impl<'a> KdlLayoutParser<'a> { pane_template_run_command.add_start_suspended(start_suspended); }; if let Some(borderless) = borderless { - pane_template.borderless = borderless; + pane_template.borderless = Some(borderless); } if let Some(focus) = focus { pane_template.focus = Some(focus); @@ -1135,7 +1137,7 @@ impl<'a> KdlLayoutParser<'a> { template_name, ( PaneOrFloatingPane::Pane(TiledPaneLayout { - borderless: borderless.unwrap_or_default(), + borderless, focus, split_size, run, diff --git a/zellij-utils/src/kdl/mod.rs b/zellij-utils/src/kdl/mod.rs index 16d75073..f6b8aaa6 100644 --- a/zellij-utils/src/kdl/mod.rs +++ b/zellij-utils/src/kdl/mod.rs @@ -1912,11 +1912,15 @@ impl TryFrom<(&KdlNode, &Options)> for Action { .map(|s| s.to_owned()); let pinned = command_metadata.and_then(|c_m| kdl_child_bool_value_for_entry(c_m, "pinned")); + let borderless = command_metadata + .and_then(|c_m| kdl_child_bool_value_for_entry(c_m, "borderless")); if floating { Ok(Action::NewFloatingPane { command: Some(run_command_action), pane_name: name, - coordinates: FloatingPaneCoordinates::new(x, y, width, height, pinned), + coordinates: FloatingPaneCoordinates::new( + x, y, width, height, pinned, borderless, + ), near_current_pane: false, }) } else if in_place { diff --git a/zellij-utils/src/plugin_api/action.proto b/zellij-utils/src/plugin_api/action.proto index 6b899b48..f8061bb6 100644 --- a/zellij-utils/src/plugin_api/action.proto +++ b/zellij-utils/src/plugin_api/action.proto @@ -121,6 +121,7 @@ message FloatingPaneLayout { bool already_running = 9; optional string pane_initial_contents = 10; optional uint32 logical_position = 11; + optional bool borderless = 12; } message SwapTiledLayout { @@ -230,6 +231,7 @@ message Action { NewTabPayload new_tab_payload = 51; NewInPlacePanePayload new_in_place_pane_payload = 52; OverrideLayoutPayload override_layout_payload = 53; + SetPaneBorderlessPayload set_pane_borderless_payload = 54; } } @@ -447,6 +449,7 @@ enum ActionName { NewBlockingPane = 91; NewInPlacePane = 92; OverrideLayout = 93; + SetPaneBorderless = 94; } message Position { @@ -477,6 +480,13 @@ message FloatingPaneCoordinates { optional SplitSize width = 3; optional SplitSize height = 4; optional bool pinned = 5; + optional bool borderless = 6; +} + +// SetPaneBorderlessPayload specifies the pane and borderless state +message SetPaneBorderlessPayload { + PaneId pane_id = 1; + bool borderless = 2; } // UnblockCondition specifies when a blocking pane should unblock diff --git a/zellij-utils/src/plugin_api/action.rs b/zellij-utils/src/plugin_api/action.rs index 96074948..2253d526 100644 --- a/zellij-utils/src/plugin_api/action.rs +++ b/zellij-utils/src/plugin_api/action.rs @@ -1769,6 +1769,8 @@ impl TryFrom<Action> for ProtobufAction { pane_id: _, coordinates: _, } + | Action::TogglePaneBorderless { pane_id: _ } + | Action::SetPaneBorderless { .. } | Action::SkipConfirm { action: _ } | Action::SwitchSession { .. } => Err("Unsupported action"), } @@ -2248,6 +2250,7 @@ impl TryFrom<ProtobufFloatingPaneCoordinates> for FloatingPaneCoordinates { width: protobuf_coords.width.and_then(|w| w.try_into().ok()), height: protobuf_coords.height.and_then(|h| h.try_into().ok()), pinned: protobuf_coords.pinned, + borderless: protobuf_coords.borderless, }) } } @@ -2261,6 +2264,7 @@ impl TryFrom<FloatingPaneCoordinates> for ProtobufFloatingPaneCoordinates { width: coords.width.and_then(|w| w.try_into().ok()), height: coords.height.and_then(|h| h.try_into().ok()), pinned: coords.pinned, + borderless: coords.borderless, }) } } @@ -2802,7 +2806,7 @@ impl TryFrom<ProtobufTiledPaneLayout> for TiledPaneLayout { children, split_size, run, - borderless: protobuf.borderless, + borderless: Some(protobuf.borderless), focus, external_children_index: protobuf.external_children_index.map(|i| i as usize), children_are_stacked: protobuf.children_are_stacked, @@ -2834,7 +2838,7 @@ impl TryFrom<TiledPaneLayout> for ProtobufTiledPaneLayout { children, split_size, run, - borderless: internal.borderless, + borderless: internal.borderless.unwrap_or(false), focus, external_children_index: internal.external_children_index.map(|i| i as u32), children_are_stacked: internal.children_are_stacked, @@ -2866,6 +2870,7 @@ impl TryFrom<ProtobufFloatingPaneLayout> for FloatingPaneLayout { already_running: protobuf.already_running, pane_initial_contents: protobuf.pane_initial_contents, logical_position: protobuf.logical_position.map(|p| p as usize), + borderless: protobuf.borderless, }) } } @@ -2890,6 +2895,7 @@ impl TryFrom<FloatingPaneLayout> for ProtobufFloatingPaneLayout { already_running: internal.already_running, pane_initial_contents: internal.pane_initial_contents, logical_position: internal.logical_position.map(|p| p as u32), + borderless: internal.borderless, }) } } diff --git a/zellij-utils/src/plugin_api/plugin_command.proto b/zellij-utils/src/plugin_api/plugin_command.proto index 0a0ad2b0..9c529013 100644 --- a/zellij-utils/src/plugin_api/plugin_command.proto +++ b/zellij-utils/src/plugin_api/plugin_command.proto @@ -176,6 +176,8 @@ enum CommandName { RenameLayout = 181; GetLayoutDir = 182; GetFocusedPaneInfo = 183; + TogglePaneBorderless = 184; + SetPaneBorderless = 185; } message PluginCommand { @@ -301,6 +303,8 @@ message PluginCommand { GetLayoutDirPayload get_layout_dir_payload = 132; DumpSessionLayoutPayload dump_session_layout_payload = 133; GetFocusedPaneInfoPayload get_focused_pane_info_payload = 134; + TogglePaneBorderlessPayload toggle_pane_borderless_payload = 135; + SetPaneBorderlessPayload set_pane_borderless_payload = 136; } } @@ -432,6 +436,15 @@ message SetFloatingPanePinnedPayload { bool should_be_pinned = 2; } +message TogglePaneBorderlessPayload { + PaneId pane_id = 1; +} + +message SetPaneBorderlessPayload { + PaneId pane_id = 1; + bool borderless = 2; +} + message ChangeHostFolderPayload { string new_host_folder = 1; } @@ -711,6 +724,7 @@ message FloatingPaneCoordinates { optional FixedOrPercentValue width = 3; optional FixedOrPercentValue height = 4; optional bool pinned = 5; + optional bool borderless = 6; } message FixedOrPercentValue { diff --git a/zellij-utils/src/plugin_api/plugin_command.rs b/zellij-utils/src/plugin_api/plugin_command.rs index d26ab7ec..da0f4599 100644 --- a/zellij-utils/src/plugin_api/plugin_command.rs +++ b/zellij-utils/src/plugin_api/plugin_command.rs @@ -46,9 +46,10 @@ pub use super::generated_api::api::{ RunActionPayload, RunCommandPayload, SaveLayoutPayload, SaveLayoutResponse as ProtobufSaveLayoutResponse, ScrollDownInPaneIdPayload, ScrollToBottomInPaneIdPayload, ScrollToTopInPaneIdPayload, ScrollUpInPaneIdPayload, - SetFloatingPanePinnedPayload, SetSelfMouseSelectionSupportPayload, SetTimeoutPayload, - ShowCursorPayload, ShowPaneWithIdPayload, StackPanesPayload, SubscribePayload, - SwitchSessionPayload, SwitchTabToPayload, TogglePaneEmbedOrEjectForPaneIdPayload, + SetFloatingPanePinnedPayload, SetPaneBorderlessPayload, + SetSelfMouseSelectionSupportPayload, SetTimeoutPayload, ShowCursorPayload, + ShowPaneWithIdPayload, StackPanesPayload, SubscribePayload, SwitchSessionPayload, + SwitchTabToPayload, TogglePaneBorderlessPayload, TogglePaneEmbedOrEjectForPaneIdPayload, TogglePaneIdFullscreenPayload, UnsubscribePayload, WebRequestPayload, WriteCharsToPaneIdPayload, WriteToPaneIdPayload, }, @@ -117,6 +118,7 @@ impl Into<FloatingPaneCoordinates> for ProtobufFloatingPaneCoordinates { } }), pinned: self.pinned, + borderless: self.borderless, } } } @@ -169,6 +171,7 @@ impl Into<ProtobufFloatingPaneCoordinates> for FloatingPaneCoordinates { None => None, }, pinned: self.pinned, + borderless: self.borderless, } } } @@ -1682,6 +1685,29 @@ impl TryFrom<ProtobufPluginCommand> for PluginCommand { _ => Err("Mismatched payload for ChangeFloatingPanesCoordinates"), } }, + Some(CommandName::TogglePaneBorderless) => match protobuf_plugin_command.payload { + Some(Payload::TogglePaneBorderlessPayload(toggle_payload)) => { + match toggle_payload.pane_id { + Some(pane_id) => { + Ok(PluginCommand::TogglePaneBorderless(pane_id.try_into()?)) + }, + None => Err("Malformed TogglePaneBorderless payload"), + } + }, + _ => Err("Mismatched payload for TogglePaneBorderless"), + }, + Some(CommandName::SetPaneBorderless) => match protobuf_plugin_command.payload { + Some(Payload::SetPaneBorderlessPayload(payload)) => { + match (payload.pane_id, payload.borderless) { + (Some(pane_id), borderless) => Ok(PluginCommand::SetPaneBorderless( + pane_id.try_into()?, + borderless, + )), + _ => Err("Malformed SetPaneBorderless payload"), + } + }, + _ => Err("Mismatched payload for SetPaneBorderless"), + }, Some(CommandName::OpenCommandPaneNearPlugin) => match protobuf_plugin_command.payload { Some(Payload::OpenCommandPaneNearPluginPayload(command_to_run_payload)) => { match command_to_run_payload.command_to_run { @@ -3067,6 +3093,23 @@ impl TryFrom<PluginCommand> for ProtobufPluginCommand { }, )), }), + PluginCommand::TogglePaneBorderless(pane_id) => Ok(ProtobufPluginCommand { + name: CommandName::TogglePaneBorderless as i32, + payload: Some(Payload::TogglePaneBorderlessPayload( + TogglePaneBorderlessPayload { + pane_id: Some(pane_id.try_into()?), + }, + )), + }), + PluginCommand::SetPaneBorderless(pane_id, borderless) => Ok(ProtobufPluginCommand { + name: CommandName::SetPaneBorderless as i32, + payload: Some(Payload::SetPaneBorderlessPayload( + SetPaneBorderlessPayload { + pane_id: Some(pane_id.try_into()?), + borderless, + }, + )), + }), PluginCommand::OpenCommandPaneNearPlugin(command_to_run, context) => { let context: Vec<_> = context .into_iter() diff --git a/zellij-utils/src/session_serialization.rs b/zellij-utils/src/session_serialization.rs index 837a3bf2..bb61b42f 100644 --- a/zellij-utils/src/session_serialization.rs +++ b/zellij-utils/src/session_serialization.rs @@ -363,7 +363,7 @@ fn serialize_tiled_layout_attributes( None => (), }; } - if layout.borderless { + if layout.borderless.unwrap_or(false) { kdl_node .entries_mut() .push(KdlEntry::new_prop("borderless", KdlValue::Bool(true))); @@ -721,14 +721,14 @@ fn tiled_pane_layout_from_manifest( } ( run, - g.is_borderless, + Some(g.is_borderless), g.geom.is_stacked() && g.geom.rows.inner > 1, g.title.clone(), Some(g.is_focused), g.pane_contents.clone(), ) }) - .unwrap_or((None, false, false, None, None, None)); + .unwrap_or((None, None, false, None, None, None)); TiledPaneLayout { split_size, run, @@ -844,6 +844,7 @@ fn get_floating_panes_layout_from_panegeoms( already_running: false, pane_initial_contents: m.pane_contents.clone(), logical_position: None, + borderless: Some(m.is_borderless), } }) .collect() diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options-2.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options-2.snap index 276c2fb3..690ba613 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options-2.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__cli_arguments_override_layout_options-2.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/setup.rs -assertion_line: 715 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -14,7 +13,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-2.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-2.snap index b8708784..191e8ba4 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-2.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__default_config_with_no_cli_arguments-2.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/setup.rs -assertion_line: 756 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -37,7 +36,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -53,7 +54,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -88,7 +89,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -101,7 +104,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -149,7 +152,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -173,7 +178,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -189,7 +194,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -204,7 +209,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -217,7 +222,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -252,7 +257,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -265,7 +272,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -306,7 +313,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -330,7 +339,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -352,7 +361,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -368,7 +377,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -384,7 +393,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -400,7 +409,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -413,7 +422,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -426,7 +435,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -439,7 +448,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -474,7 +483,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -487,7 +498,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -528,7 +539,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -552,7 +565,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -574,7 +587,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -590,7 +603,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -606,7 +619,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -622,7 +635,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -635,7 +648,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -655,7 +668,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -671,7 +684,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -687,7 +700,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -703,7 +716,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -716,7 +729,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -729,7 +742,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -742,7 +755,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -777,7 +790,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -790,7 +805,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -838,7 +853,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -858,7 +875,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -874,7 +891,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -887,7 +904,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -922,7 +939,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -935,7 +954,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -976,7 +995,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -1000,7 +1021,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -1022,7 +1043,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1038,7 +1059,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1054,7 +1075,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1070,7 +1091,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1083,7 +1104,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1096,7 +1117,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1109,7 +1130,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1144,7 +1165,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -1157,7 +1180,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1198,7 +1221,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -1222,7 +1247,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -1244,7 +1269,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1260,7 +1285,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1276,7 +1301,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1292,7 +1317,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1305,7 +1330,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1325,7 +1350,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1341,7 +1366,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1357,7 +1382,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1373,7 +1398,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1386,7 +1411,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1399,7 +1424,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1412,7 +1437,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1447,7 +1472,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -1460,7 +1487,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1508,7 +1535,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -1532,7 +1561,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1548,7 +1577,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: Some( 0, @@ -1563,7 +1592,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1576,7 +1605,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1611,7 +1640,9 @@ Layout { ), ), ), - borderless: true, + borderless: Some( + true, + ), focus: None, external_children_index: None, children_are_stacked: false, @@ -1624,7 +1655,7 @@ Layout { ], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, @@ -1677,6 +1708,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1706,6 +1738,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1735,6 +1768,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1764,6 +1798,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1793,6 +1828,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1822,6 +1858,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1851,6 +1888,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1880,6 +1918,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1909,6 +1948,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1938,6 +1978,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1970,6 +2011,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -1999,6 +2041,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -2024,6 +2067,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -2053,6 +2097,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -2078,6 +2123,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -2103,6 +2149,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -2136,6 +2183,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -2165,6 +2213,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -2194,6 +2243,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, @@ -2223,6 +2273,7 @@ Layout { ), ), pinned: None, + borderless: None, run: None, focus: None, already_running: false, diff --git a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options-2.snap b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options-2.snap index a57f4fd5..690ba613 100644 --- a/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options-2.snap +++ b/zellij-utils/src/snapshots/zellij_utils__setup__setup_test__layout_options_override_config_options-2.snap @@ -1,6 +1,5 @@ --- source: zellij-utils/src/setup.rs -assertion_line: 697 expression: "format!(\"{:#?}\", layout)" --- Layout { @@ -14,7 +13,7 @@ Layout { children: [], split_size: None, run: None, - borderless: false, + borderless: None, focus: None, external_children_index: None, children_are_stacked: false, |
