screen_snapshot: Create a deterministic screen snapshot

View source: R/export.R

screen_snapshotR Documentation

Create a deterministic screen snapshot

Description

The returned base R list is independent of jsonlite and has a stable schema_version field. Runs are row-major and represent adjacent cells with the same foreground, background, and attribute mask.

Usage

screen_snapshot(x, width = 80, height = 24)

Arguments

x

A widget, Screen, App, or ScreenBuffer.

width, height

Frame size in cells.

Value

A termr_screen_snapshot list.

Examples

screen_snapshot(label("Hello"), width = 20, height = 2)

termr documentation built on Oct. 21, 2026, 5:13 p.m.