Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

window.Window.resize

View as Markdown

Module
window
Declared in
Window
Package
libtmux
Source
crates/libtmux/src/window.rs
Other languages
PythonTypeScriptGoJava.NETC++ Swift
resize ( mut , width : u32 , height : u32 ) → Result<&mut Self, Error>
method [source]
method [source]
resize

Resize the window to an exact size in cells.

Use Window::resize_by to move one edge instead.

Errors

Returns an error when tmux refuses the size.

In other ports Resize a window

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));
await window.resize({ height: 30, width: 100 });

0 declared, 0 inherited

Esc

Type to search.