# Libtmux_eio.Client.select_layout

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

```
val select_layout :
  t ->
  Libtmux.Window.target -> Libtmux.Layout.t -> (unit, Libtmux.Error.t) result
```

Apply a preset or validated custom layout to the window. Pane geometry follows tmux layout rules; capture again to observe the result.

## Parameters

- `arg1` (`t`)
- `arg2` (`Libtmux.Window.target`)
- `arg3` (`Libtmux.Layout.t`)

## tmux command

The tmux commands behind `select_layout`.

- [`select-layout`](/en/tmux/latest/manual/select-layout/)

## tmux C API

The C declarations in tmux that implement these commands.

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

## In other ports

Set a window's pane layout

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.select_layout`](/en/py/latest/reference/libtmux-window-select_layout/) (method) |
| Ruby | [`LibTmux::Window#select_layout`](/en/ruby/latest/reference/libtmux-window-select_layout/) (method) |
| Lua | [`libtmux.Window:layout`](/en/lua/latest/reference/libtmux-window-layout/) (method) |
| Erlang | [`tmux_window:select_layout/2`](/en/erlang/latest/reference/tmux_window-select_layout-2/) (function) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`window.Window.selectLayout`](/en/ts/latest/reference/window-window-selectlayout/) (method) |
| Rust | [`window.Window.select_layout`](/en/rs/latest/reference/window-window-select_layout/) (method) |
| Go | [`tmux.Window.SelectLayout`](/en/go/latest/reference/tmux-window-selectlayout/) (method) |
| Java | [`io.github.libtmux.Window.selectLayout`](/en/java/latest/reference/io-github-libtmux-window-window-selectlayout/) (method) |
| C# | [`LibTmux.Window.SelectLayoutAsync`](/en/csharp/latest/reference/libtmux-window-selectlayoutasync/) (method) |
| C++ | [`libtmux::Window::select_layout`](/en/cxx/latest/reference/libtmux-window-select_layout/) (method) |
| Swift | [`Server.selectLayout(_:_:)`](/en/swift/latest/reference/server-selectlayout(_-_-)/) (method) |
| Perl | [`LibTmux::Server::select_layout`](/en/perl/latest/reference/libtmux-server-select_layout/) (method). Explicit Server operation. Captured entities remain local observations; use a new snapshot to observe changes. |

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