diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/sciteco.1.in | 24 | ||||
-rw-r--r-- | doc/sciteco.7.template | 21 |
2 files changed, 38 insertions, 7 deletions
diff --git a/doc/sciteco.1.in b/doc/sciteco.1.in index cc17237..b7084c5 100644 --- a/doc/sciteco.1.in +++ b/doc/sciteco.1.in @@ -324,6 +324,30 @@ environment before initializing Curses, so these variables can be modified in the profile macro. . .LP +.SCITECO_TOPIC "$SCITECO_CLIPBOARD_SET" "$SCITECO_CLIPBOARD_GET" +On ncurses, in addition to the OSC-52 protocol, you can use external +processes to drive the built-in clipboard Q-Registers (\(lq~\(rq and so on). +For that you can set the \fBSCITECO_CLIPBOARD_SET\fP and \fBSCITECO_CLIPBOARD_GET\fP +environment variables or their corresponding Q-Registers to shell commands, +that receive the clipboard contents on stdin or output the requested clipboard on stdout. +In the configured commands, the string \(lq{}\(rq is replaced with a single +letter code of the clipboard to set: +\(lqc\(rq, \(lqp\(rq or \(lqs\(rq as in the clipboard register names. +The given commands will always be executed by \fB/bin/sh\fP, regardless of +the \fBSHELL\fP environment variable or +the value of bit 8 (128) in the \fBED\fP flags. +The spawned processes also do not currently inherit the environment from the +Q-Register environment variables, i.e. you cannot change the process environment +via \*(ST code. +\# That would only be possible by rewriting everything with GSpawn. +.SCITECO_TOPIC xclip +See +.B @scitecodatadir@/sample.teco_ini +for an example of how to integrate the X11 clipboard via +.BR xclip (1). +Integrating with Wayland and the Mac OS clipboards is of course also possible. +. +.LP .SCITECO_TOPIC "$GTK_CSD" On GTK+, you may turn off the infamous client-side window decorations by setting the environment variable \fBGTK_CSD\fP to \(lq0\(rq. diff --git a/doc/sciteco.7.template b/doc/sciteco.7.template index 95c3503..b274715 100644 --- a/doc/sciteco.7.template +++ b/doc/sciteco.7.template @@ -1580,10 +1580,10 @@ The existence of a clipboard register can thus be checked in macros to determine whether getting and modifying that particular clipboard is supported natively. .br +\*(ST supports two ways of driving the clipboard on ncurses. .SCITECO_TOPIC OSC-52 xterm -\*(ST does \fBnot\fP generally support clipboards on ncurses, -but has special support for OSC-52 escape sequences, as were -introduced by sufficiently recent versions of +First of all, there is built-in support for OSC-52 escape sequences, +as were introduced by sufficiently recent versions of .BR xterm (1) and have since been adopted by several other terminal emulators. Since the operability of OSC-52 clipboards cannot be tested @@ -1593,6 +1593,7 @@ configured. .BR xterm (1) for instance must be configured for allowing the \fISetSelection\fP and \fIGetSelection\fP window operations. +It is nevertheless observed to be a very buggy and unreliable feature. If running under .BR xterm (1), \*(ST will still check whether the XTerm version is sufficient. @@ -1601,10 +1602,16 @@ Other terminal emulators like Kitty may ask for permission to read the clipboard (\fBread-clipboard-ask\fP). This is not supported by \*(ST and must be disabled (use \fBread-clipboard\fP instead). -.SCITECO_TOPIC xclip -If native clipboard support is unavailable, users may -still fall back to using external tools like \fBxclip\fP(1) -with the \fBEC\fP command. +.br +Alternatively, if OSC-52 clipboards are disabled, you can set the +\fB$SCITECO_CLIPBOARD_SET\fP and \fB$SCITECO_CLIPBOARD_GET\fP +environment variables (or corresponding Q-Registers) to shell +commands, that receive the clipboard +contents on stdin and output the requested clipboard on stdout. +This allows integrating with various windowing environments. +See \fBENVIRONMENT\fP in +.BR sciteco (1) +for more details. .br Setting the string part of a clipboard register will set that clipboard. \*(ST will perform automatic EOL-translation according |