aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/sciteco.7.template
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2025-02-27 11:38:42 +0300
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2025-02-27 11:38:42 +0300
commitf421c8fcf3c47c78c666906165006969ff21429e (patch)
tree38ffdfdb6e8e7dac00767494b62014a0ddb9e9a0 /doc/sciteco.7.template
parent08a7f8fb56d0713db26540add4a78437c0c54f0e (diff)
downloadsciteco-f421c8fcf3c47c78c666906165006969ff21429e.tar.gz
implemented ncurses clipboard support via external processes
* As an alternative to OSC-52, which is rarely supported by terminal emulators. * Makes the new mouse support much more useful since you rely on good builtin clipboard support. You can no longer e.g. just double-click a word to copy it into the "primary" selection as terminal emulators do by default. * Set $SCITECO_CLIPBOARD_SET/GET e.g. to xclip, way-copy, pbcopy or some wrapper script. * This is currently using POSIX-specific popen() API, so it behaves a bit different to command execution via EC/EG. I am not sure if it's worth rewriting with the GSpawn-API, since it will be used only on POSIX anyway and a GSpawn-based implementation is likely to be a bit larger. * Should there be some small command-line utility for interacting (esp. pasting) via OSC-52, built-in OSC-52 support could well be removed from SciTECO. Currently, I know only of https://github.com/theimpostor/osc/ and it requires very recent Go compilers. (I still haven't tested it. Quite possibly, pasting when run as a piped command is impossible.)
Diffstat (limited to 'doc/sciteco.7.template')
-rw-r--r--doc/sciteco.7.template21
1 files changed, 14 insertions, 7 deletions
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