libtmux Reference MCP Search
On this page

window.Window.resize

View as Markdown

Module
window
Declared in
Window
Package
libtmux
Source
crates/libtmux/src/window.rs
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.

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));

0 declared, 0 inherited

Esc

Type to search.