OSC 52: Clipboard Control (#52)

This adds support for OSC 52 -- applications can read/write the clipboard. Due to the security risk of this, the default configuration allows for writing but _not reading_. This is configurable using two new settings: `clipboard-read` and `clipboard-write` (both booleans).
This commit is contained in:
Mitchell Hashimoto
2022-11-21 15:12:00 -08:00
committed by GitHub
parent 173aff1e80
commit 56de5846f4
7 changed files with 147 additions and 6 deletions

View File

@@ -141,6 +141,12 @@ pub const Config = struct {
/// specified in the configuration "font-size" will be used.
@"window-inherit-font-size": bool = true,
/// Whether to allow programs running in the terminal to read/write to
/// the system clipboard (OSC 52, for googling). The default is to
/// disallow clipboard reading but allow writing.
@"clipboard-read": bool = false,
@"clipboard-write": bool = true,
/// Additional configuration files to read.
@"config-file": RepeatableString = .{},