Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

class libtmux-java latest

ControlEvent

Something tmux volunteered, rather than an answer to a request.

Source and package
Qualified name
io.github.libtmux.control.ControlEvent
Package
io.github.libtmux.control
Distribution
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/control/ControlEvent.java
class io.github.libtmux.control.ControlEvent ( kind: String, fields: List<String>, value: Optional<String>, notification: Notification )

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 a Notification.Unknown case 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

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-add or subscription-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.
Esc

Type to search.

Reference previewOpen reference