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.

method libtmux-java latest

ControlClient.watch

Asks tmux to report a format whenever its value changes.

Source and package
Qualified name
io.github.libtmux.control.ControlClient.watch
Package
io.github.libtmux.control
Declared in
ControlClient
Distribution
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/control/ControlClient.java

Description#

tmux re-expands the format about once a second and writes a subscription-changed event only when the result differs from last time, so the comparison happens in the server and a client that subscribes does nothing at all between changes. This is what makes watching a server cost nothing while it is idle.

Parameters
  • name (String) # – what to call it; registering the same name again replaces the old one

  • target (String) # – %* for every pane, @* for every window, a specific %id or @id, or the attached session (pass "" - see below)

  • format (String) # – a tmux format, such as #{pane_current_command}

tmux command#

The tmux commands behind watch.

tmux C API#

The C declarations in tmux that implement these commands.

Esc

Type to search.

Reference previewOpen reference