# window.Window.resize

- **Module:** window
- **Package:** libtmux
- **Language:** TypeScript
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-ts/blob/073b9d7dedad900bff6f5ec0ea47794e40225870/packages/libtmux/src/window.ts#L357
- **Page:** https://libtmux.org/en/ts/latest/reference/window-window-resize/

```
resize(options: ResizeWindowOptions): Promise<void>
```

Resize this window, by a direction, to a size, or to what its clients allow.

Under tmux's default [`window-size`](/en/tmux/latest/catalog/options/window-size/) a window tracks its attached clients,
which will overwrite this the next time they change; [`window-size manual`](/en/tmux/latest/catalog/options/window-size/)
is what makes a size of your own stick.

## Examples

```ts
await window.resize({ height: 30, width: 100 });
```

## Parameters

- `options` (`ResizeWindowOptions`)

## tmux command

The tmux commands behind `resize`.

- [`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) |
| 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 |

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