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

tmux.ControlClient.Notifications

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

View as Markdown

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]
method [source]
method [source]
Notifications

Notifications returns an iterator over what tmux says without being asked: pane output, and the events behind ControlNotification .

It is ControlClient.NextNotification as 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, including the ErrControlStreamLost or os.ErrClosed ControlClient.NextNotification reports at a natural end.

Leaving early preserves queued notifications for the next read.

0 declared, 0 inherited

Esc

Type to search.