Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

control.ControlSender.watch_only

Rust
  • Python Unavailable
  • TypeScript Unavailable
  • Rust
  • Go Unavailable
  • Java Unavailable
  • .NET Unavailable
  • C++ Unavailable
  • Swift Unavailable

View as Markdown

Module
control
Declared in
ControlSender
Package
libtmux
Source
crates/libtmux/src/control.rs
watch_only ( self , panes : &[PaneId] ) → Result<(), Error>
method [source]
method [source]
watch_only

Receive output from these panes and no others.

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: off stops 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 answers true.

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.

0 declared, 0 inherited

Esc

Type to search.