OpenProgram Docs

Screenshots

A screenshot tool for people, modelled on Snow Shot: freeze the screen, select a window or area, mark it up, then copy, save, pin, read its text or send it to the chat. It is separate from the Agent's computer_use.

App (Electron) shortcut, capture overlay per display copy, save, pin attach to chat Overlay page frozen picture select, mark up PNG of the selection Worker visible windows OCR
App
shortcut, capture of every display, one overlay window each, and what happens to the result
Overlay
the frozen picture, selection, marks and toolbar
Worker
GET /api/screenshot/windows and POST /api/screenshot/ocr, local owner only

Capture and overlay

PartHow
EntryGlobal shortcut CommandOrControl+Shift+2, the tray item, the composer's + menu (screenshot.start, which waits for the menu to close).
PicturedesktopCapturer screens at each display's pixel size, matched by display_id; the BGRA bitmap goes to the overlay over IPC, which only overlay pages may read.
OverlayOne borderless window per display at screen-saver level, a non-activating panel on macOS so the App does not come forward. It loads /menu-overlay/screenshot and is hidden, not closed, so the next screenshot opens at once. It shows only after the page has painted the picture; the display under the pointer takes the keyboard.
Several displaysEach overlay selects on its own display; starting a selection on one clears the others.

Window snapping

PlatformSource
macOSCGWindowListCopyWindowInfo, layer 0, front to back, points.
WindowsEnumWindows per-monitor DPI aware; tool, non-activating and cloaked windows skipped; DWM frame bounds; pixels turned into App coordinates with screenToDipRect.
Linux, X11_NET_CLIENT_LIST_STACKING with _NET_FRAME_EXTENTS; pixels divided by the display scale.
Linux, WaylandNone: Wayland gives no other window's position. A click takes the display.

The overlays leave themselves out by their media source ids. Windows are cut at each display's edge.

Marks and toolbar

The marks (lib/annotate/marks.ts) and toolbar (components/annotate) are shared with the composer's image annotator. Marks are kept in image pixels and drawn with widths in CSS px times the image's scale, so a Retina capture and a plain image look alike and the PNG keeps the source size. Mosaic pixelates the picture under it rather than drawing a pattern.

Finished marks are drawn once into an offscreen layer; while dragging, only the mark in progress is drawn on top of it, and a pen stroke drops moves under one pixel. The magnifier and colour picker read the captured pixels directly instead of reading the canvas back.

The toolbar sits under the selection, as in Snow Shot. When there is no room it goes above, and inside the selection when neither side fits (placeToolbar), so a selection along the screen's bottom edge still has its tools.

Text, pins and results

PartHow
OCRmacOS Vision; Windows Windows.Media.Ocr through PowerShell, spaces between CJK characters removed; Linux tesseract. Boxes are drawn over the picture and the text listed beside it.
PinA frameless always-on-top window at the selection's place. The App moves it while dragging, zooms it about the pointer (0.1–5×), sets opacity with the modifier (0.25–1), and gives a native menu.
Send to chatscreenshot:attach to the App window that was in front when the screenshot began, which queues the PNG in the active composer like a dropped file, a new chat that has no key yet included.
SaveSave dialog in Pictures, named Screenshot YYYY-MM-DD HH.mm.ss.png (截图 … in Chinese).

Implementation status

Not taken from Snow Shot: screen recording, translation, scrolling (long) screenshots, measuring, and drawing a free canvas.

Last updated · 2026-11-25