# Libtmux_unix.Client.resize_window

- **Module:** Libtmux_unix
- **Package:** libtmux-unix
- **Language:** OCaml
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-ocaml/blob/205dfda49742592b479247049d186956e4a4cfe9/unix/libtmux_unix.mli#L673
- **Public owner:** Libtmux_unix
- **Page:** https://libtmux.org/en/ocaml/latest/reference/libtmux_unix-client-resize_window/

```
val resize_window :
  ?cancel:Cancellation.t ->
  ?width:int ->
  ?height:int -> t -> Libtmux.Window.target -> (unit, Libtmux.Error.t) result
```

Request positive cell dimensions, supplying at least one dimension. Omit either dimension to retain it. Client-size and window-size policies can affect subsequent sizing.

## Parameters

- `cancel?` (`Cancellation.t`)
- `width?` (`int`)
- `height?` (`int`)
- `arg1` (`t`)
- `arg2` (`Libtmux.Window.target`)

## tmux command

The tmux commands behind `resize_window`.

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

## tmux C API

The C declarations in tmux that implement these commands.

- [`cmd_resize_window_entry`](/en/tmux/latest/reference/c-variable-cmd_resize_window_entry/) (attribute)
- [`cmd_resize_window_exec`](/en/tmux/latest/reference/c-function-cmd-resize-window-c-cmd_resize_window_exec/) (function)

## In other ports

Resize a window

| Language | Equivalent |
| --- | --- |
| Python | [`libtmux.Window.resize`](/en/py/latest/reference/libtmux-window-resize/) (method) |
| Ruby | [`LibTmux::Window#resize`](/en/ruby/latest/reference/libtmux-window-resize/) (method) |
| Lua | [`libtmux.Window:resize`](/en/lua/latest/reference/libtmux-window-resize/) (method) |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | [`window.Window.resize`](/en/ts/latest/reference/window-window-resize/) (method) |
| Rust | [`window.Window.resize`](/en/rs/latest/reference/window-window-resize/) (method) |
| Go | [`tmux.Window.Resize`](/en/go/latest/reference/tmux-window-resize/) (method) |
| Java | [`io.github.libtmux.Window.resizeTo`](/en/java/latest/reference/io-github-libtmux-window-window-resizeto/) (method) |
| C# | [`LibTmux.Window.ResizeAsync`](/en/csharp/latest/reference/libtmux-window-resizeasync/) (method) |
| C++ | [`libtmux::Window::resize`](/en/cxx/latest/reference/libtmux-window-resize/) (method) |
| Swift | both `Server.resize` overloads size a pane, not a window |
| Perl | No dedicated equivalent in the selected Perl surface. Explicit Server::cmd remains available for native tmux commands. |

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