ControlEvent
Something tmux volunteered, rather than an answer to a request.
Source and package
- Qualified name
-
io.github .libtmux .control. Control Event - Package
- io.github.libtmux.control
- Distribution
- io.github.libtmux:libtmux
- Source
- libtmux/src/main/java/io/github/libtmux/control/ControlEvent.java
-
Description#
A control client is told about changes as they happen — a window appearing, a session being renamed, a layout moving — without anything asking. That is the difference between watching a server and polling one.
Two readings of one line.
#notification()is typed, for matching on: a sealed set of what tmux sends, with aNotification.Unknowncase so that a notification a newer tmux adds still arrives rather than being dropped.#kind(),#fields()and#value()are what tmux wrote, word by word, for anything the typed reading does not cover.- Parameters
-
-
kind(String) # – the notification name, such aswindow-addorsubscription-changed -
fields(List<String>) # – the words that followed it, before any:separator -
value(Optional<String>) # – what followed a:separator, which only a subscription carries -
notification(Notification) # – the same notification, typed
-
Members9#
- ControlEvent method An event from its words, with the typed reading taken from them.
- fields method the words that followed it, before any
:separator - kind method the notification name, such as
window-addorsubscription-changed - notification method the same notification, typed
- paneId method The first field naming a pane, which is how an event says which pane it is about.
- parse method Reads one notification line.
- subscription method The name a subscription was registered under, for an event that came from one.
- value method what followed a
:separator, which only a subscription carries - windowId method The first field naming a window.