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

io.github.libtmux.WindowLayout.WindowLayout

Java
  • Python Unavailable
  • Ruby Unavailable
  • Lua Unavailable
  • TypeScript Unavailable
  • Rust Unavailable
  • Go Unavailable
  • Java
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
io.github.libtmux.WindowLayout
Package
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/WindowLayout.java
interface io.github.libtmux.WindowLayout.WindowLayout
interface [source]
interface [source]
interface io.github.libtmux.WindowLayout.WindowLayout

A window's layout as tmux reported it, in whichever of its two forms it used.

tmux writes a layout in its classic checksummed form — c3a4,80x24,0,0,1 — on every release before 3.8, and as JSON from 3.8, which also names the pane in each cell. The same window therefore reports a differently shaped string depending on the server, and a caller that parses it needs to know which it has. This says, so the compiler can carry what used to be a comment:

Either form is an opaque token to hand back to tmux, which Window#applyLayout(WindowLayout) does; parsing one is tmux's job, and #value() is the text for a caller who wants to anyway.

Examples

switch (window.layout()) {
case WindowLayout.Json json -> restorePanes(json.value());
case WindowLayout.Classic classic -> restoreGeometry(classic.value());
}

4 declared, 0 inherited

Members

  • Classic struct The checksummed form every release writes before 3.8. It carries geometry and no pane ids.
  • Json struct The JSON form tmux writes from 3.8, which names the pane in each cell.
  • of method Which form a reported layout is in.
  • value method The layout exactly as tmux reported it.
Esc

Type to search.