ControlSender.watch_only
Receive output from these panes and no others.
Source and package
- Qualified name
-
libtmux::control:: Control Sender:: watch _only - Module
- control
- Declared in
ControlSender- Package
- libtmux
- Source
- crates/libtmux/src/control.rs
-
Description#
Lists panes in the session this connection attached to -- over this same connection, so the answer cannot disagree with it -- then mutes every one not named. See
Self::mute_pane()for why this beats filtering what arrives, and why the listing must not reach past this connection's own session:offstops tmux reading a muted pane's pty for every client, not just this connection, so muting a pane outside this session would widen the change to whatever else is watching it, and a control client is sent only its attached session's output in the first place, so panes outside it were never part of this stream.A pane created after this call is not muted, because tmux publishes no notification for a pane appearing. Repeat this whenever
Event::may_have_added_a_pane()answerstrue.Errors
Returns an error when the connection has closed, tmux would not list a pane, returned an unreadable pane ID, or a later mute fails. A failure after an accepted mute is
Error::AfterEffect.Cancel safety
The effect can be partial: panes are muted one at a time, so a dropped call can leave some muted and others not. Muting is idempotent, so calling again finishes the job.
tmux command#
The tmux commands behind watch_only.
list-panes -s session scope, cmd_list_panes_session tmux C API#
The C declarations in tmux that implement these commands.
Guides#
Pages that discuss watch_only.