# tmux.Window.Rotate

- **Module:** tmux.Window
- **Package:** github.com/libtmux/libtmux-go/tmux
- **Language:** Go
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-go/blob/5f808882015a975a65acc7f9da5b3ff0d5cbdc91/tmux/window_pane_topology.go#L247
- **Page:** https://libtmux.org/reference/go/tmux-window-rotate/

```
tmux.Window.Rotate(ctx: context.Context, request: RotateWindowRequest) -> (Window, error)
```

Rotate rotates pane positions in the receiver's exact winlink without selecting the window or promising client focus. It returns a freshly materialized exact [Window] preserving the receiver SessionID, rather than a canonical ID-only view. If the command succeeds but refresh fails, Rotate returns the receiver with that error; earlier failures return zero.
