Notification
What a control-mode notification says, typed, for matching on.
Source and package
- Qualified name
-
io.github .libtmux .control. Notification - Package
- io.github.libtmux.control
- Distribution
- io.github.libtmux:libtmux
- Source
- libtmux/src/main/java/io/github/libtmux/control/Notification.java
-
Description#
Sealed, with
Unknownas the case for everything else. tmux adds notifications between releases, and a closed set with nowhere to put a new one would drop it; here a notification this library does not model yet still arrives, asUnknown, andControlEvent#kind()andControlEvent#fields()still carry what tmux wrote.The forms are tmux's own, from
control-notify.c. A name — of a window, a session, a client — is everything after the id, spaces included, as tmux writes it.Examples#
switch (event.notification()) {case Notification.WindowRenamed(WindowId window, String name, boolean attached) -> relabel(window, name);case Notification.SessionsChanged changed -> refreshSessions();default -> {}}
Members22#
- ClientDetached class
%client-detached: a client detached. - ClientSessionChanged class
%client-session-changed: another client is now attached to this session. - ConfigError class
%config-error: a configuration file tmux loaded for this client had an error. tmux 3.4 and later. - Continue class
%continue: a paused pane's output flows to this client again. - Exit class
%exit: the client is exiting, with tmux's reason when it gave one. - LayoutChanged class
%layout-change: a window's layout changed, in whichever form tmux reports it. - Message class
%message: text another client showed on this one withdisplay-message -c. tmux 3.4 and later. - PaneModeChanged class
%pane-mode-changed: a pane entered or left a mode. - PasteBufferChanged class
%paste-buffer-changed: a paste buffer was created or changed. - PasteBufferDeleted class
%paste-buffer-deleted: a paste buffer was deleted. - Pause class
%pause: tmux stopped sending a pane's output to this client, which turned flow control on withrefresh-client -f pause-after=Nand fell N seconds behind.refresh-client -A '%1:continue'resumes it. - read method Reads one notification from its kind and the text after it.
- SessionChanged class
%session-changed: the attached client is now attached to this session. - SessionRenamed class
%session-renamed: a session has a new name. - SessionsChanged class
%sessions-changed: a session was created or destroyed. - SessionWindowChanged class
%session-window-changed: a session's current window changed. - SubscriptionChanged class
%subscription-changed: a watched format has a new value. - Unknown class A notification this library does not model;
ControlEventstill carries all of it. - WindowAdded class
%window-add: a window was created;attachedis false forunlinked-window-add. - WindowClosed class
%window-close: a window was destroyed;attachedas forWindowAdded. - WindowPaneChanged class
%window-pane-changed: a window's active pane changed. - WindowRenamed class
%window-renamed: a window has a new name;attachedas forWindowAdded.