Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux-java latest

Window.applyLayout

Restores an exact arrangement previously read from #layout().

Source and package
Qualified name
io.github.libtmux.Window.applyLayout
Package
io.github.libtmux
Declared in
Window
Distribution
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/Window.java

Description#

The string is checked here rather than by tmux, because tmux 3.3a does not survive being handed one it cannot parse: it ends the server and every session on the socket. Every other supported release answers invalid layout. The classic form carries tmux's own checksum, so a wrong one is detectable without asking; since 3.8 tmux may instead hand back JSON, which carries no checksum, so that shape is only trusted from a server new enough to have written it.

"Exact" holds in full only for a JSON layout, since that is the one form carrying each pane's id. A classic string — every release before 3.8, or an older reader against a newer server — restores the geometry but names no pane, so which process lands in which cell can differ from where it started; whether it does depends on whether the pane list still happens to match the order the layout was saved in. Confirmed by hand on 3.7c.

Parameters
Raises

tmux command#

The tmux commands behind applyLayout.

tmux C API#

The C declarations in tmux that implement these commands.

Esc

Type to search.

Reference previewOpen reference