# window.Layout

- **Module:** window
- **Package:** libtmux
- **Language:** Rust
- **Kind:** enum
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/window.rs#L1307
- **Page:** https://libtmux.org/en/rs/latest/reference/window-layout/

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`].

## Example

```rust
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?;
```

## Members

- `EvenHorizontal` (constant): Panes side by side, each the full height.
- `EvenVertical` (constant): Panes stacked, each the full width.
- `MainHorizontal` (constant): One large pane above a row of the rest.
- `MainHorizontalMirrored` (constant): The arrangement of [`Layout::MainHorizontal`] with the large pane below the row rather than above it.
- `MainVertical` (constant): One large pane beside a column of the rest.
- `MainVerticalMirrored` (constant): The arrangement of [`Layout::MainVertical`] with the large pane on the right rather than the left.
- `Tiled` (constant): Panes in as even a grid as their count allows.
- `as_str` (method): The name tmux knows this layout by.
- `minimum_release` (method): The first tmux release that arranges panes this way.
