# control.ControlSender.watch_only

- **Module:** control.ControlSender
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/8a648c0894dfffc9303583f753b6c8ae01f2fe76/crates/libtmux/src/control.rs#L922
- **Page:** https://libtmux.org/reference/rs/control-controlsender-watch_only/

```
control.ControlSender.watch_only(self, panes: &[PaneId]) -> Result<(), Error>
```

Receive output from these panes and no others.

Lists panes over this same connection, so the answer cannot disagree
with the connection it configures, then mutes every pane not named.
See [`Self::mute_pane`] for why this beats filtering what arrives.

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`].
