# window.Window.rotate

- **Module:** window.Window
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/3fe1ca654b81b8cbf4a13b777a001a3298c87a6f/packages/libtmux/src/window.ts#L330
- **Page:** https://libtmux.org/en/ts/latest/reference/window-window-rotate/

```
window.Window.rotate(direction: : "forward" | "backward" = "forward") -> Promise<void>
```

Rotate the panes within this window.

The layout stays put and the panes move through it, so this reorders what
occupies each position rather than trading two panes.

## Example

```ts
await window.rotate("forward");
```
