contour icon indicating copy to clipboard operation
contour copied to clipboard

VT sequence: screenshot

Open christianparpart opened this issue 4 years ago • 0 comments
trafficstars

Syntax: OSC 533 ; top ; left ; bottom ; right ; format ST

If not region is specified, the whole main page area is taken. Leaving out individual region parameters will be filled to respect the former statement.

Format defaults to PNG. Supported should be

  • plain text
  • VT sequences
  • SIXEL
  • PNG
  • GIF
  • BMP (or similar for automated testing)

The terminal will reply with the taken screenshot using the following sequence.

OSC 533 ; top ; left ; lines ; columns ; format ; Pt ST

Where Pt will be the actual screenshot data and the remaining parameters match the input parameters (filled with the defaulted values).

Security: this VT sequence may want a config option for permission testing:

screenshot: allow/deny/ask. (Per profile, default: ask)

A script could be provided to take screenshots and safe them to disk or clipboard (could be part of contour executable: contour screenshot [args ...])

For the ask-option, the popup dialog could also preview the image to be copied by the application.

christianparpart avatar Jan 23 '21 22:01 christianparpart