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

View as Markdown

Module
libtmux
Declared in
Window
Package
libtmux-cxx
Source
include/libtmux/entities.hpp
Other languages
PythonRubyLuaTypeScriptRustGoJava.NETSwift
select_layout ( layout : std::string_view ) → expected< void, CommandFailure >
methodreadonly [source]
methodreadonly [source]
select_layout

Rearrange the panes.

tmux names five layouts, plus two mirrored ones on tmux 3.5+, and also accepts the layout description layout() returns.

Restoring one exactly — the same pane back at the same position, not only the same shape — holds on tmux 3.8+, where the saved string is JSON and carries each pane's id. On tmux 3.7 and earlier the classic layout string restores the shape but can rotate which pane lands in which cell (measured against raw tmux; not a choice this library makes). A JSON layout is refused before 3.8, and a mirrored preset before 3.5.

Anything not shaped like one of those — a leading -, a name tmux does not know, or an incomplete layout string — is refused before reaching tmux rather than passed through: on tmux 3.3 and 3.3a, that shape crashes the server outright rather than being refused.

In other ports Set a window's pane layout

0 declared, 0 inherited

Esc

Type to search.