# window.Window.rotate

- **Module:** window.Window
- **Package:** @libtmux/libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/2cb93308200da38a26b59876618116850f110607/packages/libtmux/src/window.ts#L312
- **Page:** https://libtmux.org/reference/ts/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");
```
