# libtmux.Window.next_layout

- **Module:** libtmux
- **Package:** libtmux
- **Language:** Python
- **Kind:** method
- **Source:** https://github.com/tmux-python/libtmux/blob/38e368c11117fb4aeb2f082d552cd4f210eae06a/src/libtmux/window.py#L917
- **Page:** https://libtmux.org/en/py/stable/reference/libtmux-window-next_layout/

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

```
libtmux.Window.next_layout(self) -> Window
```

Cycle to the next layout via [`$ tmux next-layout`](/en/tmux/latest/manual/next-layout/).

```python
>>> pane1 = window.active_pane
>>> pane2 = window.split()
>>> window.next_layout()
Window(...)
```

## In other ports

### Apply a window's next layout preset

- TypeScript: [`window.Window.nextLayout`](/en/ts/latest/reference/window-window-nextlayout/) (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.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)
