~petersanchez/st

ref: 4c6145f6c37e4ab4ba4fdefb20d41e4fcc65a97b st/config.def.h -rw-r--r-- 20.5 KiB
Applied alpha patch and config colors
First build ready
9162ba89 — Michael Buch 4 years ago
Port the copyurl patch to the 0.8.1 st release. Mainly fix usage of depracted selcopy
a2a70449 — Hiltjo Posthuma 2 years ago
config.def.h: add an option allowwindowops, by default off (secure)

Similar to the xterm AllowWindowOps option, this is an option to allow or
disallow certain (non-interactive) operations that can be insecure or
exploited.

NOTE: xsettitle() is not guarded by this because st does not support printing
the window title. Else this could be exploitable (arbitrary code execution).
Similar problems have been found in the past in other terminal emulators.

The sequence for base64-encoded clipboard copy is now guarded because it allows
a sequence written to the terminal to manipulate the clipboard of the running
user non-interactively, for example:

printf '\x1b]52;0;ZWNobyBoaQ0=\a'
Make shift+wheel behaves as shift+Prev/Next

St uses a very good hack where mouse wheel genereates ^Y and ^E,
that are the same keys that less and vi uses for backward and
fordward scrolling. Scroll, as many terminal emulators, use
shift+Prev/Next for scrolling, but it is also using ^E and ^Y
for scroling, characters that are reserved in the POSIX shell
in emacs mode for end of line and yanking, making scroll unsable
in st.

This patch adds a new hack, making shift+wheel returning the
same sequences than shift+Prev/Next, meaning that scroll or
any other similar program will not be able to differentiate
between them.
1d590910 — Avi Halachmi (:avih) 4 years ago
auto-sync: draw on idle to avoid flicker/tearing

st could easily tear/flicker with animation or other unattended
output. This commit eliminates most of the tear/flicker.

Before this commit, the display timing had two "modes":

- Interactively, st was waiting fixed `1000/xfps` ms after forwarding
  the kb/mouse event to the application and before drawing.

- Unattended, and specifically with animations, the draw frequency was
  throttled to `actionfps`. Animation at a higher rate would throttle
  and likely tear, and at lower rates it was tearing big frames
  (specifically, when one `read` didn't get a full "frame").

The interactive behavior was decent, but it was impossible to get good
unattended-draw behavior even with carefully chosen configuration.

This commit changes the behavior such that it draws on idle instead of
using fixed latency/frequency. This means that it tries to draw only
when it's very likely that the application has completed its output
(or after some duration without idle), so it mostly succeeds to avoid
tear, flicker, and partial drawing.

The config values minlatency/maxlatency replace xfps/actionfps and
define the range which the algorithm is allowed to wait from the
initial draw-trigger until the actual draw. The range enables the
flexibility to choose when to draw - when least likely to flicker.

It also unifies the interactive and unattended behavior and config
values, which makes the code simpler as well - without sacrificing
latency during interactive use, because typically interactively idle
arrives very quickly, so the wait is typically minlatency.

While it only slighly improves interactive behavior, for animations
and other unattended-drawing it improves greatly, as it effectively
adapts to any [animation] output rate without tearing, throttling,
redundant drawing, or unnecessary delays (sounds impossible, but it
works).
d66bd405 — Hiltjo Posthuma 2 years ago
config.def.h: add a comment for the scroll variable
21e0d6e8 — Roberto E. Vargas Caballero 2 years ago
Add support for scroll(1)

Scroll is a program that stores all the lines of its child and be used in st as
a way of implementing scrollback.

This solution is much better than implementing the scrollback in st itself
because having a different program allows to use it in any other program
without doing modifications to those programs.
d2b75db8 — Avi Halachmi (:avih) 3 years ago
mouse shortcuts: don't hardcode selpaste

Because selpaste is activated on release, a release flag was added to
mouse shortcuts which controls whether activation is on press/release,
and selpaste binding to button2 was moved to config.h .

button1 remains the only hardcoded mouse button - for selection + copy.
b6d280de — Avi Halachmi (:avih) 3 years ago
mouse shortcuts: allow override for all shortcuts

Allow forceselmod to override all mouse shortcuts rather than only
selection, and rename it to forcemousemod as it's now more appropriate.

This will affect mouse shortcuts which use mask other than XK_ANY_MOD.

This does not affect the default behavior because the default mouse
shortcuts (wheel) use XK_ANY_MOD, where forceselmod already activated
the override also before this change.

Previously, if a mouse shortcut was configured with a specific mod and
forceselmod was held, then the shortcut did not execute unless the
configured mod included forceselmod.
ba7f4d69 — Avi Halachmi (:avih) 3 years ago
mouse shortcuts: allow same functions as kb shortcuts

Previously mouse shortcuts supported only ttywrite.

This required adding an "Arg" function ttysend - which does what the
original mouse shortcuts did.
2b8333f5 — Hiltjo Posthuma 3 years ago
config.def.h: remove crlf value section

this is not used anymore.

patch sent as an ed script using RFC2549 by k0ga.
21367a04 — Hiltjo Posthuma 4 years ago
revert part of commit add0211522737b79dad990ccd65c8af63b5cc1dd

"use iswspace()/iswpunct() to find word delimiters

    this inverts the configuration logic: you no longer provide a list of
    delimiters -- all space and punctuation characters are considered
    delimiters, unless listed in extrawordchars."

Feedback from IRC and personal preference.
927621f6 — Hiltjo Posthuma 4 years ago
config.def.h: tweak extra worddelimiters

This changes the selection more like xterm.
To test try: "find /" and select a path.
add02115 — Lauri Tirkkonen 4 years ago
use iswspace()/iswpunct() to find word delimiters

this inverts the configuration logic: you no longer provide a list of
delimiters -- all space and punctuation characters are considered
delimiters, unless listed in extrawordchars.
d5efd256 — Lauri Tirkkonen 4 years ago
replace utf8strchr with wcschr
3be4cf11 — Hiltjo Posthuma 4 years ago
config: add Shift+Insert as selpaste() again

This was changed before in:
commit 20f713548de451b67db3306cf8cf7b2f38fee05c on Wed Jan 25 19:17:38 2017
67d0cb65 — Quentin Rameau 4 years ago
Remove the ISO 14755 feature

And move it to the patches section.
Keeping it would force to add an exec pledge on OpenBSD, and some
people think it's bloated, so bye!
8ed7a4b3 — Hiltjo Posthuma 4 years ago
Revert "Make cursor follow text color"

This reverts commit b51bcd5553af3db394014efbd78acf7828fa48ff.
b51bcd55 — Jules Maselbas 4 years ago
Make cursor follow text color
Next