# libtmux:select-layout

- **Package:** libtmux
- **Language:** Common Lisp
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-lisp/blob/c2e5fc4ed3befda21f45dfa5d5868c38fd138311/src/geometry.lisp#L76
- **Public owner:** libtmux
- **Page:** https://libtmux.org/en/lisp/latest/reference/libtmux-select-layout/

```
(select-layout client window layout &key (observe t) cancel-token timeout output-limit)
```

Apply LAYOUT to physical WINDOW; return an outcome and optional replacement.
LAYOUT is :EVEN-HORIZONTAL, :EVEN-VERTICAL, :MAIN-HORIZONTAL, :MAIN-VERTICAL,
:TILED, or (:CUSTOM string) containing a tmux layout description. Legacy custom
text requires four ASCII hex digits, a comma and a nonempty body; JSON-object
layouts require a live tmux daemon at least 3.8. Header checks precede I/O;
the existing target preflight checks the daemon version before dispatch.
Text is literal; tmux validates its checksum, JSON and geometry. This unzooms
the window. Signals INVALID-ARGUMENT, UNSUPPORTED-CAPABILITY, STALE-TARGET or
an operational condition. Does not change earlier captured values.

See also: `libtmux:next-layout`, `libtmux:outcome-value`, `libtmux:previous-layout`.

## Parameters

- `client`
- `window`
- `layout`
- `observe?`
- `cancel-token?`
- `timeout?`
- `output-limit?`

## tmux command

The tmux commands behind `select-layout`.

- [`select-layout`](/en/tmux/latest/manual/select-layout/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_select_layout_entry`](/en/tmux/latest/reference/c-variable-cmd_select_layout_entry/) (attribute)
- [`cmd_select_layout_exec`](/en/tmux/latest/reference/c-function-cmd-select-layout-c-cmd_select_layout_exec/) (function)

## Guides

Pages that discuss `select-layout`.

- [Explicit operations](/en/lisp/latest/guides/operations/)
