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.

MoreLess about this notice

method libtmux-ts

Server.validateLayouts

Check every planned window layout before setup scripts or mutations.

Source and package
Qualified name
Server.validateLayouts
Module
server
Declared in
Server
Package
libtmux
Source
packages/libtmux/src/server.ts
validateLayouts( layouts: readonly { readonly layout: string; readonly panes: number; }[], options?: CommandOptions, ): Promise<void>

Description

Names accept unique abbreviations. Only version-sensitive layouts query the daemon; a cold endpoint uses the selected client. Checksums, bounded tree structure and pane counts are checked locally; tmux owns geometry and pruning. Custom layouts are limited to 8192 characters and 256 classic groups. JSON layouts require tmux 3.8 and permit at most 200 nested objects.

Parameters
Errors
  • TypeError – when a layout, pane count or version reply is invalid.

  • TmuxCommandError – when the daemon or client version cannot be read.

  • TmuxTransportError – when validation is cancelled or a version probe fails.

Examples

await server.validateLayouts([
{ layout: "even-h", panes: 2 },
{ layout: "tiled", panes: 1 },
]);

Recorded calls

source calls
No call edges in the TypeScript model.

The TypeScript reference records declarations, not calls, so this page shows no callers or callees. That is a limit of the extracted data, not a statement that nothing calls server.Server.validateLayouts.

tmux command

task material

The tmux commands behind validateLayouts.

run-shell (layouts that depend on the tmux version)

tmux C API

task material

The C declarations in tmux that implement these commands.

Esc
Search in

Type to search.

Reference previewOpen reference