Core LibraryalphaAPI 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-cxx latest

Window.layout

An opaque token: hand it back to select_layout() exactly as received, and do not parse its shape.

Source and package
Qualified name
libtmux::Window::layout
Namespace
libtmux
Declared in
Window
Package
libtmux-cxx
Source
include/libtmux/entities.hpp
Other languages
Perlmethod Erlang PowerShell Julia Elixir Haskell Common Lisp Python Ruby Lua TypeScript RustGoJava C# Swift Kotlin Scala OCaml F# Clojure
[[C++ nodiscard attributeAsks the compiler to warn when a result is discarded. An explicit cast to void acknowledges that the result is intentionally ignored.Language documentation]] std::string_view layout() const noexcept;

Description#

tmux 3.8+ reports JSON here for a plain client, and keeps the classic layout string for a control client unless that client has asked tmux for JSON with refresh-client -f new-layouts — which Connection::connect() sends on every connection, so control mode through this library gets JSON on 3.8+ too.

A version's own layout() output round-trips through its own select_layout() on that version; see that method's comment for what "round-trips" promises and what it does not.

In other ports#

tmux's own description of a window's layout

Equivalents of tmux's own description of a window's layout in other languages
Language Equivalent
Python libtmux.Window.window_layout
Lua libtmux.SnapshotWindow.layout
Elixir LibTmux.Window.layout
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript no equivalent on Window
Rust window.Window.layout
Go tmux.Window.Layout
Java io.github.libtmux.Window.layout
C# no equivalent on Window
Swift no equivalent on Window
OCaml Libtmux.Window.layout
Perl LibTmux::Window::layout Schema-validated captured data; reading performs no tmux I/O.

No equivalent is recorded in Ruby, PowerShell, Julia, Erlang, Common Lisp, Clojure, Kotlin, Scala or F#.

Esc

Type to search.

Reference previewOpen reference