# window.PaneSize

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

How much space a new pane gets.

## Example

```rust
use libtmux::{PaneSize, SplitDirection, SplitOptions};

// A size renders as tmux's own `-l` argument, cells bare and shares suffixed.
assert_eq!(PaneSize::Cells(20).to_string(), "20");
assert_eq!(PaneSize::Percent(25).to_string(), "25%");

let guard = libtmux::test::TestServer::new().await?;
let session = guard.server().new_session("work").await?;
let window = session.active_window().await?.expect("a session has a window");

let pane = window
    .split(SplitOptions::new(SplitDirection::Below).size(PaneSize::Percent(25)))
    .await?;
assert!(pane.height() > 0);

guard.shutdown().await?;
```

## Members

- `Cells` (constant): A number of rows or columns, depending on the split direction.
- `Percent` (constant): A share of the space being divided, as a percentage.
