tui.watch
tui.watch PANE CMD [SEC] [ID]
Runs a shell command every SEC seconds in the background and shows its latest output in a pane, like watch.
Parameters
CMD: shell code, evaluated withevalin a background subshell.SEC: interval. Default:2. Minimum0.05.ID: watch id. Default:watch_PANE.
Returns: 1 when PANE or CMD is empty.
Notes
- The UI never waits for
CMD. Only the newest complete output is shown; stderr is discarded. - Starting a watch with an existing
IDrestarts it. - Stopped on page change, on exit, and when
PANEno longer exists.
Example
tui.watch disk "df -h /" 5
See also: tui.watch.stop, tui.watch.now
