# LibTmux::Model::WindowRef.rotate

- **Module:** LibTmux::Model
- **Package:** LibTmux
- **Language:** Raku
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-raku/blob/0b5dd3d32e20f83a0069874e33eab0eb48f55962/lib/LibTmux/Model.rakumod#L208
- **Page:** https://libtmux.org/en/raku/latest/reference/libtmux-model-windowref-rotate/

```
method rotate(Bool :$reverse = False, Bool :$preserve-zoom = False --> Result:D)
```

Rotate panes in the layout; reverse changes the rotation direction.

Rotate panes in the layout; reverse changes the rotation direction.

## Parameters

- `$reverse?` (`Bool`)
- `$preserve-zoom?` (`Bool`)

## tmux command

The tmux commands behind `rotate`.

- [`rotate-window`](/en/tmux/latest/manual/rotate-window/)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_rotate_window_entry`](/en/tmux/latest/reference/c-variable-cmd_rotate_window_entry/) (attribute)
- [`cmd_rotate_window_exec`](/en/tmux/latest/reference/c-function-cmd-rotate-window-c-cmd_rotate_window_exec/) (function)

## In other ports

Rotate panes within a window

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.rotate`](/en/py/latest/reference/libtmux-window-rotate/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`window.Window.rotate`](/en/ts/latest/reference/window-window-rotate/) (method) |
| Rust | [`window.Window.rotate`](/en/rs/latest/reference/window-window-rotate/) (method) |
| Go | [`tmux.Window.Rotate`](/en/go/latest/reference/tmux-window-rotate/) (method) |
| Java | [`io.github.libtmux.Window.rotate`](/en/java/latest/reference/io-github-libtmux-window-window-rotate/) (method) |
| C# | [`LibTmux.Window.RotateAsync`](/en/csharp/latest/reference/libtmux-window-rotateasync/) (method) |
| C++ | [`libtmux::Window::rotate`](/en/cxx/latest/reference/libtmux-window-rotate/) (method) |
| Swift | [`Server.rotate(_:upward:)`](/en/swift/latest/reference/server-rotate(_-upward-)/) (method) |
| OCaml | [`Libtmux_unix.Client.rotate_panes`](/en/ocaml/latest/reference/libtmux_unix-client-rotate_panes/) (function) |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |

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