# libtmux:next-layout

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

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

Cycle WINDOW to tmux's next layout; return an outcome and optional replacement.
Unzooms the window. Captured values remain unchanged. Signals STALE-TARGET or
an operational condition; follow-up acquisition failure is retained separately.

## Parameters

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

## tmux command

The tmux commands behind `next-layout`.

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

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_next_layout_entry`](/en/tmux/latest/reference/c-variable-cmd_next_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 `next-layout`.

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