# Libtmux_eio.Client.cycle_layout

- **Module:** Libtmux_eio
- **Package:** libtmux-eio
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/eio/libtmux_eio.mli#L537
- **Public owner:** Libtmux_eio
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_eio-client-cycle_layout/

```
val cycle_layout :
  t ->
  Libtmux.Window.target ->
  [ `Next | `Previous ] -> (unit, Libtmux.Error.t) result
```

Select the next or previous tmux preset layout for this window.

## Parameters

- `arg1` (`t`)
- `arg2` (`Libtmux.Window.target`)
- `arg3` (``[ `Next | `Previous ]``)

## tmux command

The tmux commands behind `cycle_layout`.

- [`next-layout`](/en/tmux/latest/manual/next-layout/) (direction is `Next)
- [`previous-layout`](/en/tmux/latest/manual/previous-layout/) (direction is `Previous)

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_next_layout_entry`](/en/tmux/latest/reference/c-variable-cmd_next_layout_entry/) (attribute)
- [`cmd_select_layout_exec`](/en/tmux/latest/reference/c-function-cmd-select-layout-c-cmd_select_layout_exec/) (function)
- [`cmd_previous_layout_entry`](/en/tmux/latest/reference/c-variable-cmd_previous_layout_entry/) (attribute)
