pub struct GridLayoutBuilder<'a> { /* private fields */ }Expand description
Builder for a single-window pane grid.
Implementations§
Source§impl<'a> GridLayoutBuilder<'a>
impl<'a> GridLayoutBuilder<'a>
Sourcepub const fn replace_existing_root_process(self, replace: bool) -> Self
pub const fn replace_existing_root_process(self, replace: bool) -> Self
Controls whether the first pane spec may replace the existing root pane process.
The default is true because newly-created app sessions already have
a placeholder shell in pane 0; a command on the first declared pane
is expected to replace that placeholder. Set this to false when
applying a layout to an existing session should surface
RmuxError::ProcessStillRunning instead of replacing the root
process.
Sourcepub const fn replace_existing_panes(self, replace: bool) -> Self
pub const fn replace_existing_panes(self, replace: bool) -> Self
Allows applying the grid to a window that already contains multiple panes by closing every pane except the first listed pane before creating the requested layout.
The default is false, which keeps the builder conservative on
existing workspaces. When enabled, cleanup happens before any new split
is created; if cleanup fails, the builder returns that error without
attempting a partial layout.
Sourcepub fn pane(self, title: impl Into<String>) -> LayoutPaneBuilder<'a>
pub fn pane(self, title: impl Into<String>) -> LayoutPaneBuilder<'a>
Adds one pane declaration with a UX title label.
Titles remain labels only; the returned handles are addressed by stable pane id after the layout is applied.