Core LibraryalphaAPI Reference

Choose documentation 3

latest

Current version

latest
English

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

method libtmux-ts latest

Server.validateLayouts

Check every planned window layout before setup scripts or mutations.

Source and package
Qualified name
server.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-rc2 and permit at most 200 nested objects.

Examples#

await server.validateLayouts([
{ layout: "even-h", panes: 2 },
{ layout: "tiled", panes: 1 },
]);
Parameters
Raises
  • 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.

Esc

Type to search.

Reference preview Open reference