io.github.libtmux.Layouts.Layouts
Java
- Python Unavailable
- Ruby Unavailable
- Lua Unavailable
- TypeScript Unavailable
- Rust Unavailable
- Go Unavailable
- Java
- .NET Unavailable
- C++ Unavailable
- Swift Unavailable
- Module
- io.github.libtmux.Layouts
- Package
- io.github.libtmux:libtmux
- Source
- libtmux/src/main/java/io/github/libtmux/Layouts.java
-
Which layout names are safe to hand to tmux.
Public because every path that can reach select-layout needs it, not only the one that reads a workspace file. This check exists because an unrecognised layout name does not produce an error on every tmux: on 3.3a it crashes the server, taking down every session on that socket, including ones this program never created. A workspace file is user-supplied text, so the name has to be checked before it is dispatched rather than after tmux has had it.
tmux accepts either one of its named layouts or a serialized layout tmux itself produced. Since 3.8 that serialized form is either the classic checksummed grammar or JSON, and
select-layouttakes either back - but only JSON round-trips exactly. The classic grammar carries no pane identity, only shape, so which process lands in which cell can differ from where it started; seeWindow#applyLayout. The classic checksum is verified here; a four-hex-digit prefix alone does not make the rest safe for tmux to parse. JSON carries no such signature, so a JSON-shaped string is only trusted once the running tmux is new enough to have written it - see#requireSerialized.
3 declared, 0 inherited
Members
- builtIn method The built-in layout a name or an unambiguous prefix of one denotes, resolved against what
runningactually supports — the same resolutionTmuxVersion)applies, exposed so a caller that must choose between the enum path and a raw string (a workspace file's own dispatch) makes the same choice the guard just validated. - require method Returns the layout unchanged, having checked tmux will recognise it.
- requireSerialized method Requires an exact layout string rather than a built-in layout name.