On this page
tmux.ControlClient.Notifications
- Module
- tmux
- Declared in
- ControlClient
- Package
- github.com/libtmux/libtmux-go/tmux
- Source
- tmux/control_stream.go
- Notifications ( ctx : context.Context ) iter.Seq2[ControlNotification, error]
-
Notifications returns an iterator over what tmux says without being asked: pane output, and the events behind
ControlNotification.It is
ControlClient.NextNotificationas a range loop; exactly one iterator or direct notification read may run at a time.for notification, err := range client.Notifications(ctx) { if err != nil { return err } if pane, output, ok := notification.Output(); ok { handle(pane, output) } }
Malformed or unknown notifications yield their error and iteration continues. Every other error ends the stream after being yielded.
Natural tmux exit drains queued notifications and then ends without error.
Leaving early preserves queued notifications for the next read.
0 declared, 0 inherited