- Module
- window
- Declared in
- Window
- Package
- libtmux
- Source
- crates/libtmux/src/window.rs
- Other languages
- PythonTypeScriptGoJava.NETC++Swift
-
Set the window's pane layout.
Takes a
Layouttmux knows by name, or a layout string tmux itself produced throughLayoutSpec::Saved. A&str,String, orOsStringis read as a saved layout, so a caller who already had one keeps working.Errors
Returns an error when tmux refuses the layout, and
crate::ErrorKind::UnsupportedVersionwhen a named layout needs a newer tmux than this endpoint runs. SeeLayout::minimum_release.In other ports Set a window's pane layout
Examples
use libtmux::Layout;
let guard = libtmux::test::TestServer::new().await?;let session = guard.server().new_session("arranged").await?;let mut window = session.active_window().await?.expect("a window");
window.select_layout(Layout::Tiled).await?;
guard.shutdown().await?;await window.selectLayout("even-horizontal");0 declared, 0 inherited