libtmux Reference MCP Search
On this page

io.github.libtmux.control.ControlClient.ControlClient.watch

View as Markdown

Module
io.github.libtmux.control.ControlClient
Declared in
ControlClient
Package
io.github.libtmux:libtmux
Source
libtmux/src/main/java/io/github/libtmux/control/ControlClient.java
watch ( name : String , target : String , format : String ) ControlReply
method [source]
method [source]
watch

Asks tmux to report a format whenever its value changes.

<p>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 anything else for the attached session

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

0 declared, 0 inherited

Esc

Type to search.