# libtmux::Window::next_layout

- **Module:** libtmux::Window
- **Package:** libtmux-cxx
- **Language:** C++
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-cxx/blob/393d4b0ad666f18a6581f1eb281741a75a7503f0/include/libtmux/entities.hpp#L608
- **Page:** https://libtmux.org/en/cxx/latest/reference/libtmux-window-next_layout/

```
libtmux::Window::next_layout() -> expected< void, CommandFailure >
```

Step through tmux's preset arrangements, and turn the panes within the one in use.

The layouts are tmux's list, not a caller's: asking for "the next one" is the only way to reach them without naming each. Rotating is a different act — it moves which pane occupies which cell and leaves the cells where they are.

None of the three refuses a window holding a single pane. tmux accepts all of them there and changes nothing, which is worth knowing before treating success as evidence that something moved.
