# io.github.libtmux.SplitSpec.SplitSpec

- **Module:** io.github.libtmux.SplitSpec
- **Package:** io.github.libtmux:libtmux
- **Language:** Java
- **Kind:** class
- **Source:** https://github.com/libtmux/libtmux-java/blob/c3517519ee799428a809ce6deb1708c8be289cd1/libtmux/src/main/java/io/github/libtmux/SplitSpec.java#L33
- **Page:** https://libtmux.org/reference/java/io-github-libtmux-splitspec-splitspec/

How a pane should be split.

<p>A description rather than an action: it can be built once, named, and applied to as many panes
as it suits. Nothing here contacts tmux, so a spec can be assembled on a machine that has none,
and the version rules it depends on are checked when it is applied rather than when it is written
— the same spec is legal against one server and not another.

<p>A builder-built class rather than a record for the reason {@link ServerConfig} gives: a
record's canonical constructor is public API, and tmux keeps adding flags to {@code split-window}
— six of them in 3.7 alone.

<pre>{@code
Pane side = pane.split(s -> s.toRight().percent(30));

SplitSpec sidebar = SplitSpec.builder().toRight().percent(25).build();
left.split(sidebar);
right.split(sidebar);
}</pre>

## Members

- `builder` (method) — A builder holding tmux's own defaults: below the target, half its size, running a shell.
- `direction` (method) — Where the new pane goes.
- `size` (method) — How big the new pane should be, or empty to let tmux halve the target.
- `start` (method) — What runs in the new pane.
- `directory` (method) — Where the new pane starts, or empty to inherit.
- `environment` (method) — Variables set for the new pane, in the order they were given.
- `detached` (method) — Whether the new pane is left unfocused.
- `fullWindow` (method) — Whether the split spans the whole window rather than just the target pane.
- `zoomed` (method) — Whether the new pane is zoomed on arrival.
- `keepOnExit` (method) — Whether the pane stays after its command exits. Requires tmux 3.7.
- `exitMessage` (method) — What a kept pane shows once its command has exited. Requires tmux 3.7.
- `style` (method) — The new pane's {@code window-style}. Requires tmux 3.7.
- `activeBorderStyle` (method) — The new pane's {@code pane-active-border-style}. Requires tmux 3.7.
- `inactiveBorderStyle` (method) — The new pane's {@code pane-border-style}. Requires tmux 3.7.
- `argv` (method) — The command that performs this split, reporting the new pane through {@code format}.
- `toString` (method)
- `Builder` (class) — Collects the choices, each named for what it does rather than for the field it sets.
