Core LibraryAPI 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.

function libtmux-cxx latest

validate_layout

Namespace libtmux::validate_layout libtmux

Check names, v1 saved-layout checksum, v1/v2 tree grammar and minimum cell count without I/O.

Source and package
Module
libtmux
Package
libtmux-cxx
Source
include/libtmux/layout.hpp
[[ C++ nodiscard attribute Asks the compiler to warn when a result is discarded. An explicit cast to void acknowledges that the result is intentionally ignored. Language documentation ]] expected<void, CommandFailure> validate_layout(std::string_view layout, std::size_t minimum_panes = 1);

Description#

Names must be valid on at least one supported tmux version; Server::validate_layouts resolves version-dependent names and requires tmux 3.8 (including 3.8-rc) or newer for v2 JSON layouts. Saved input, including floating-pane metadata, is retained unchanged. The v2 reader follows tmux's restricted JSON syntax. Geometry and resizing remain tmux's responsibility. Empty layouts are invalid.

Parameters
Esc

Type to search.

Reference preview Open reference