TUIOSTUIOS

Screenshots

Capture a pane, a region or the whole screen as a styled PNG, SVG, HTML or text file.

TUIOS renders screenshots from the pane's own cells, not from pixels on your screen. Colours, bold, italics and links are exact, and it works over SSH, in the browser, and on a detached session. A PNG or SVG gets a frame: padding, a background derived from the theme, rounded corners, a shadow and a title bar.

In the app

HowWhat it captures
Ctrl+B CEnter capture mode, then pick a pane
Palette: Screenshot this windowThe focused pane, at once
Palette: Screenshot a regionEnter capture mode and drag over the area you want
Palette: Screenshot the screenThe whole screen: panes, rail and dock
Right-click a pane: Screenshot this windowThat pane

In capture mode:

KeyAction
Tab, arrows, hjklMove between panes
Enter or SpaceCapture the highlighted pane
Mouse dragCapture a region
fCapture the full screen
Esc, qCancel

After a capture a preview panel opens (screenshot.preview). On a terminal with kitty graphics it shows the framed image. Elsewhere it shows the cells.

KeyAction
Enter, qKeep the file and close
EscDelete the file and close
cCopy the image to the clipboard
oOpen the file
rRetake
Arrows, PgUp/PgDn, HomeScroll the preview

Files are saved under screenshot.directory, which defaults to ~/Pictures/tuios.

The action names screenshot_window and screenshot_screen have no default key. Bind them in [keybindings] if you want one-key captures.

From the command line

tuios screenshot asks the daemon to render a pane, so nobody needs to be attached.

# The focused pane, as a PNG in screenshot.directory
tuios screenshot

# A named pane in a named session
tuios screenshot -s work -w build

# Include the last 200 lines of history above the screen
tuios screenshot --scrollback --lines 200

# An SVG for a README
tuios screenshot --format svg --out demo.svg

# Render in a different theme
tuios screenshot --theme catppuccin_mocha
FlagMeaning
-s, --sessionTarget session
-w, --windowTarget pane, by name or id
-f, --formatpng, svg, html, ansi or txt
--framewindow, plain or none
--themeRender in this theme instead of the session's
-o, --outOutput path instead of a generated name
-S, --scrollbackPut the pane's history above the screen
--linesLimit the history to the last N rows
--cursorDraw the cursor
--copy, --no-copyCopy to the clipboard, or do not
--jsonPrint the result as JSON: path, format, cols, rows, bytes, copied, warnings

A tape can take a screenshot too, with the Screenshot command. It renders the focused pane.

Formats

FormatWhat you get
pngAn image with the frame. screenshot.scale sets the pixel density
svgA vector image with the frame. Text stays text
htmlA page with the styled cells
ansiThe pane as text with colour escape codes, no frame
txtPlain text, no frame

Set a theme for exact colours

With no theme set, TUIOS does not know your terminal's palette, so the 16 basic colours fall back to the xterm defaults and the result says so. Set appearance.theme, or pass --theme, to render in a known palette.

The frame

Every part of the frame is a [screenshot] option. --frame, --format, --cursor and --copy/--no-copy override the matching option for one capture.

[screenshot]
format = "png"
directory = "~/Pictures/tuios"
frame = "window"         # window, plain or none
background = "auto"      # auto, none, #rrggbb, or #rrggbb..#rrggbb for a gradient
padding = 48             # pixels, 0 to 128
radius = 10              # corner radius, 0 to 32
shadow = true
controls = "auto"        # auto, macos, glyphs or none
title_format = "{title}" # {title}, {index}, {cwd}
scale = 2                # PNG size multiplier, 1 to 4
copy = true
preview = true

To draw text in a particular font, set font_family, or font_file to a font file. font_file is used for PNG and embedded in SVG and HTML. The full table is in Configuration.

On this page