Window.resize
Resize the window to an exact size in cells.
Source and package
-
Description#
Use
Window::resize_by()to move one edge instead.Errors
Returns an error when tmux refuses the size.
Examples#
let session = server.new_session("sized").await?;let mut window = session.windows().await?.remove(0);window.resize(100, 40).await?;assert_eq!((window.width(), window.height()), (100, 40));
tmux command#
The tmux commands behind resize.
tmux C API#
The C declarations in tmux that implement these commands.
In other ports#
Resize a window
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Ruby | Lib |
| Lua | libtmux |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | window |
| Go | tmux |
| Java | io |
| C# | Lib |
| C++ | libtmux:: |
| Swift | both Server.resize overloads size a pane, not a window |
| OCaml | Libtmux |
| 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#.