# window.Window.nextLayout

- **Module:** window
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/073b9d7dedad900bff6f5ec0ea47794e40225870/packages/libtmux/src/window.ts#L317
- **Page:** https://libtmux.org/en/ts/latest/reference/window-window-nextlayout/

```
nextLayout(): Promise<void>
```

Apply this window's next layout preset.

tmux cycles a fixed list — even-horizontal, even-vertical, main-horizontal,
main-vertical, tiled — rearranging the panes already there.

## Examples

```ts
await window.nextLayout();
```

## tmux command

The tmux commands behind `nextLayout`.

- [`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)

## In other ports

Apply a window's next layout preset

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.next_layout`](/en/py/latest/reference/libtmux-window-next_layout/) (method) |
| Rust | [`window.Window.next_layout`](/en/rs/latest/reference/window-window-next_layout/) (method) |
| Go | [`tmux.Window.NextLayout`](/en/go/latest/reference/tmux-window-nextlayout/) (method) |
| Java | [`io.github.libtmux.Window.nextLayout`](/en/java/latest/reference/io-github-libtmux-window-window-nextlayout/) (method) |
| C# | [`LibTmux.Window.SelectNextLayoutAsync`](/en/csharp/latest/reference/libtmux-window-selectnextlayoutasync/) (method) |
| C++ | [`libtmux::Window::next_layout`](/en/cxx/latest/reference/libtmux-window-next_layout/) (method) |
| Swift | [`Server.nextLayout(_:)`](/en/swift/latest/reference/server-nextlayout(_-)/) (method) |

No equivalent is recorded in Ruby, Lua, PowerShell, Julia, Elixir, Kotlin, Scala or F#.
