#[non_exhaustive]pub enum Layout {
EvenHorizontal,
EvenVertical,
MainHorizontal,
MainHorizontalMirrored,
MainVertical,
MainVerticalMirrored,
Tiled,
}Expand description
One of the pane arrangements tmux knows by name.
tmux has exactly these, so a layout that does not exist is a compile error
rather than a refusal at the far end of a round trip. A saved layout
string is a different thing and goes through LayoutSpec::Saved.
§Examples
use libtmux::Layout;
let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("arranged").await?;
let mut window = session.active_window().await?.expect("a window");
window.select_layout(Layout::EvenHorizontal).await?;
assert_eq!(Layout::EvenHorizontal.as_str(), "even-horizontal");
guard.shutdown().await?;Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EvenHorizontal
Panes side by side, each the full height.
EvenVertical
Panes stacked, each the full width.
MainHorizontal
One large pane above a row of the rest.
MainHorizontalMirrored
The arrangement of Layout::MainHorizontal with the large pane
below the row rather than above it.
MainVertical
One large pane beside a column of the rest.
MainVerticalMirrored
The arrangement of Layout::MainVertical with the large pane on
the right rather than the left.
Tiled
Panes in as even a grid as their count allows.
Implementations§
Source§impl Layout
impl Layout
Sourcepub const fn minimum_release(self) -> ReleaseVersion
pub const fn minimum_release(self) -> ReleaseVersion
The first tmux release that arranges panes this way.
The mirrored pair arrived in 3.5; the rest predate everything this crate supports.