Layouts.require
Returns the layout unchanged, having checked tmux will recognise it.
Source and package
- Qualified name
-
io.github .libtmux .Layouts. require - Package
- io.github.libtmux
- Declared in
Layouts- Distribution
- io.github.libtmux:libtmux
- Source
- libtmux/src/main/java/io/github/libtmux/Layouts.java
-
Description#
Accepts the classic checksummed form, a JSON layout (by shape only — a running version is needed to say whether this server could have written it, which
TmuxVersion)does), a built-in name, or an unambiguous prefix of exactly one built-in name (layout_set_lookupis a prefix match, sotileandeven-happly on every tmux release). Ambiguity is judged against every name this library knows, not only the ones the eventual server will have — the version to narrow that with is not available here.- Parameters
-
-
layout(String) # forrequire(layout);require(layout, running) -
running(TmuxVersion ) # forrequire(layout, running) -
layout(String) # – a built-in name, unique abbreviation or serialized tree forrequire(layout, server, paneCount) -
server(Server) # – the endpoint which will apply the layout forrequire(layout, server, paneCount) -
paneCount(int) # – the number of panes which the layout must accommodate forrequire(layout, server, paneCount)
-
- Returns
-
a full built-in name or the unchanged serialized layout for
require(layout, server, paneCount) - Raises
-
-
Illegal
Argument – if tmux would not recognise the name, which on some versions is not a recoverable error forException require(layout) -
Illegal
Argument – if tmux would not recognise the layout forException require(layout, running) -
Unsupported
Feature – if the name or the JSON format arrived after this release forException require(layout, running) -
Illegal
Argument – if the layout is invalid or has too few pane cells forException require(layout, server, paneCount) -
Unsupported
Feature – if an exact built-in name requires a newer daemon forException require(layout, server, paneCount) -
Lib
Tmux – if the daemon or client version cannot be read forException require(layout, server, paneCount)
-