Window.layout
An opaque token: hand it back to select_layout() exactly as received, and do not parse its shape.
Source and package
- [[
C++ nodiscard attributeAsks the compiler to warn when a result is discarded. An explicit cast to void acknowledges that the result is intentionally ignored.]] std::string layout() const noexcept;_view -
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— whichConnection::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 ownselect_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
| Language | Equivalent |
|---|---|
| Python | libtmux |
| Lua | libtmux |
| Elixir | Lib |
| Haskell | No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing. |
| TypeScript | no equivalent on Window |
| Rust | window |
| Go | tmux |
| Java | io |
| C# | no equivalent on Window |
| Swift | no equivalent on Window |
| OCaml | Libtmux |
| Perl | Lib 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#.