Core LibraryalphaAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

function LibTmux.jl latest

watch_screen

Source and package
Qualified name
LibTmux.watch_screen
Module
LibTmux
Package
LibTmux
Source
src/screen_wait.jl

Methods#

Take the entry read of pane's visible screen, call f(screen) with a ScreenWatch and return its value. Keys sent inside f cannot be counted as already on the entry screen, so a block can act and then wait:

watch_screen(f, server::Server, pane::PaneRef; interval=0.1, timeout=5.0,
cancel=nothing)
watch_screen(server, pane) do screen
send_keys(server, pane, "echo ready", "Enter")
wait_for_text(screen, "ready")
end

timeout is one total deadline from the entry read, shared by every wait in the block; interval is the pause between reads. cancel is a CancellationToken . Every wait in the block counts against the entry read taken when the block opened, so repeat the same text only with a new watch_screen . The entry read raises ScreenWaitEnded when the pane or server is already gone. A pane from another server, or from an earlier generation of this one, raises CrossServerReference or StaleReference . The handle is not valid after f returns.

Parameters

Guides#

Pages that discuss watch_screen.

Observing output

Esc

Type to search.

Reference previewOpen reference