Commit graph

335 commits

Author SHA1 Message Date
ant
84a920d545 change default colors 2025-11-30 15:17:58 +01:00
ant
48defe07d2 Add darkman patch
a patch to choose between two color themes by executing a command
2025-11-30 15:17:58 +01:00
ant
d44ab2a9a2 font default to caskadia 2025-11-30 15:17:58 +01:00
Antoine Vaure
b8131450b0 config: increase scroll speed 2025-11-30 15:17:58 +01:00
ant
ec1b8b0ac0 fontfeature patch 2025-11-30 15:17:58 +01:00
Javier
37bc089f1d Add selectionbg-alpha patch (#188) 2025-10-28 10:18:15 +01:00
Bakkeby
e77d5e1b3b sync patch: add DECRQM 80 and 8452 for sixel patch ref. #179 2025-10-26 00:22:53 +02:00
Bakkeby
d12d2ad1c2 sync patch: remove redundant inner #if for DECRQM -- DEC Request Mode case statement ref. #179 2025-10-25 14:04:52 +02:00
Bakkeby
46a5982e9d Removing utils.h, leftover from the vim browse patch 2025-10-14 16:03:38 +02:00
Lady Alice
1d5c8a1595
reflow: enable keyboard scrolling by default (#187) 2025-10-14 14:26:45 +02:00
Bakkeby
bdb21ddb8b bump version to 0.9.3
https://git.suckless.org/st/commit/5a4666c19e3956069147aee43a06b326d998366e.html

add a few comments

https://git.suckless.org/st/commit/5a4666c19e3956069147aee43a06b326d998366e.html

Support OSC 110, 111, and 112 for resetting colors

This adds support for OSC 110, 111, and 112 escape sequences to reset
the foreground, background, and cursor colors in the terminal. The
changes include handling these sequences in the `strhandle` function of
`st.c`, allowing applications to reset colors to their default values.

The OSC sequences originated from Xterm control sequences and are now
widely used in terminal applications and supported by many terminal
emulators. For applications, this allows them to reset colors to
default values without needing to know the colors beforehand.

https://git.suckless.org/st/commit/d6c431859c6c0201e0668ed24a9f17cebf0a68f5.html
2025-08-10 15:44:48 +02:00
Bakkeby
9328548866 xresources: removing focus change ttywrite ref. #182 2025-08-03 22:19:37 +02:00
Bakkeby
92e6c003f7 Eat up "CSI 58" sequences
This is used in the wild by systemd systemctl for example and st
misinterpreted it as "blink", because it didn't know "58", then saw "5"
as "blink", and then didn't know "245".

This should print "foo" as normal text:

    printf '\e[58:5:245mfoo\n'
    printf '\e[58:2:50💯200mfoo\n'

Ref.
https://git.suckless.org/st/commit/f114bcedd113017d907aad32031db92c050f4bf3.html
2025-07-27 20:48:20 +02:00
Bakkeby
fba8d10417 Bump to 98610fc 2025-07-09 09:47:04 +02:00
Laurent Cheylus
f17e1dcf31
Do not interpret CSI ? u as DECRC (#181)
The kitty keyboard protocol docs recommend CSI ? u to query support for
that protocol, see https://sw.kovidgoyal.net/kitty/keyboard-protocol/

For better or worse, fish shell uses this query to work around bugs
in other terminals triggered by requesting that protocol via CSI = 5 u.

Unfortunately, st interprets CSI ? u as DECRC (restore cursor
position). reproduce with 'printf "\x1b[?u"; cat'.

fish could work around this by switching to the alternate screen
before running this query; but that might cause tearing on terminals
that don't support Synchronized Output. I'm not sure.

In the meantime, let's correct our parser.

This adds a redundant else-after-return, for consistency with the
surrounding code.

ref. https://git.suckless.org/st/commit/98610fcd37f655d44586323dc86c1d013c2798ce.html

Signed-off-by: Laurent Cheylus <foxy@free.fr>
2025-07-09 09:45:24 +02:00
Bakkeby
7c28c7868a sync: add support for DECRQM queries for synchronization ref. #179 2025-07-08 19:17:57 +02:00
Bakkeby
9edaa4c149 sync: mode 2026 correction ref. #179 2025-07-08 15:11:17 +02:00
Bakkeby
4000b47a10 sync: adding mode 2026 for the sync patch to allow syncing to be controlled by programs ref. #179 2025-07-08 10:42:24 +02:00
Bakkeby
dd9784883f boxdraw: fix for rendering errors following commit f8e451e ref. #180 2025-07-08 10:27:50 +02:00
Bakkeby
43d9be991b OpenBSD compatibility changes 2025-06-16 22:53:48 +02:00
Bakkeby
f8e451e26c Refactoring Xft clipping ref. #175 2025-05-06 14:41:20 +02:00
veltza
cb91e175ba
Prevent SelectionRequests from interfering with blinking cursor (#173)
Some old clipboard managers, such as greenclip and parcellite,
constantly poll applications with SelectionRequest events, which breaks
the internal timer and blinking cursor. This fix prevents these events
from causing any disruption.

Fixes #172
2025-04-22 09:53:53 +02:00
Bakkeby
da81ae1704 dynamic padding - add explicit dependency on the ANYSIZE_PATCH ref. #168 2025-03-04 10:12:43 +01:00
Bakkeby
dc64384989 dynamic cursor color: visual bug on selection ref. #169 2025-02-27 21:57:48 +01:00
Bakkeby
d60f1b355f Adding dynamic padding patch - a variant of anysize that do not alter size hints ref. #168 2025-02-26 22:36:24 +01:00
Bakkeby
75da349fb3 selection colors vs dynamic cursor color patch compatibility issue ref. #167 2025-02-26 21:58:05 +01:00
Bakkeby
c4af76a9cc reflow: addressing selection clearing bug when selection includes the prompt ref. #166 2025-02-26 21:23:09 +01:00
Bakkeby
978e25f23b Adding open selected text patch 2025-02-20 22:36:51 +01:00
Bakkeby
08b53c4960 Adding drag-n-drop patch 2025-02-20 10:18:17 +01:00
Bakkeby
b77fb11b76 Clear screen: Fix edge case
With sequence \e[1J, if cursor is on second line, clear the first line.

ref.
https://git.suckless.org/st/commit/6009e6e25bdff9548f085e9ae562b1ca305d3a0b.html
2024-12-06 23:06:38 +01:00
Stein Gunnar Bakkeby
4dec55eead
Refactoring sigchld ref. #156 (#159) 2024-11-25 20:48:52 +01:00
Utkarsh Verma
c4c5113fbd
osc7: initial patch implementation (#154)
* osc7: initial patch implementation

Closes #153

* osc7: avoid redundant use of realpath()

* osc7: fix styling

* Changing position of the OSC7_PATCH toggle in patches.def.h

---------

Co-authored-by: Bakkeby <bakkeby@gmail.com>
2024-10-15 09:54:45 +02:00
Bakkeby
3f1a5ed034 Revert "undercurl: support semicolons in SGR character attributes ref. #148"
This reverts commit 398aeb1cd6.
2024-10-01 23:17:07 +02:00
Bakkeby
c9390f2ca7 osc133 - changing default configuration options to Ctrl + PgUp/PgDown 2024-10-01 21:39:50 +02:00
Bakkeby
398aeb1cd6 undercurl: support semicolons in SGR character attributes ref. #148
Back in May 2024 support for colons in SGR character attributes was
added to allow both colons and semicolons to be used to separate the
subparameters in SGR escape codes.

The undercurl patch only read colons to separate parameters. This
commit allows for semicolons to be used as well when using escape
codes for undercurl.

https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
https://git.suckless.org/st/commit/5dbcca49263be094fc38159c297458ae323ef647.html
https://st.suckless.org/patches/undercurl/
2024-10-01 21:35:46 +02:00
Utkarsh Verma
fe065cc366
osc133: initial patch implementation (#127)
* osc133: initial patch implementation

* Specify dependency on reflow or scrollback patch
2024-10-01 21:35:30 +02:00
lmccartneystar
e7bdaa65d7
mouse shortcuts: use XK_ANY_MOD with altscreen mouse scrollback patch (#151) 2024-09-29 10:08:38 +02:00
veltza
aaaa59eb77
sixel: fix image deletion issue (#150)
This fixes the current implementation, which does not delete an image if
an application first erases the image and then spawns a new transparent
image in its place. The reason it didn't work before was because the two
operations were handled at different stages in the rendering pipeline.
2024-09-20 09:21:30 +02:00
veltza
5d2d1d818c
sixel: prevent images from piling up (#149)
Old images are automatically deleted if a new image is spawned over
them. This prevents them from piling up and choking the terminal when
viewing animated gifs.

Now if you use the latest version of Chafa to view the gifs, it
will set the transparency attribute (P2=1) to all sixel images
regardless of whether they are transparent or not. This prevents the
auto-delete from working because if the image is transparent, we can't
delete any images behind it.

The solution is that since Chafa fills the animation frames with an
opaque black background color, we treat the images as non-transparent if
they don't have any transparent pixels. This keeps the auto-delete
running with the new Chafa.

Although the solution works now, it may not be a long-term solution.
2024-09-20 09:17:15 +02:00
Bakkeby
8a024a15b0 fix BadMatch error when embedding on some windows
When embedded, st fails with BadMatch error if the embedder's window has
non-default colormap/depth/visual.  This commit fixes that by creating
st's window inside root and then reparent it into embedder.

The reference window for dc.gc is also changed to match root's visuals.

A similar commit had been made for dmenu[1].
See this issue[2] on github for context.

[1]: https://git.suckless.org/dmenu/commit/0fe460dbd469a1d5b6a7140d0e1801935e4a923b.html
[2]: https://github.com/phillbush/xfiles/issues/47

Ref.
https://git.suckless.org/st/commit/a0274bc20e11d8672bb2953fdd1d3010c0e708c5.html
2024-08-09 22:06:40 +02:00
veltza
714fcffaa8
Fix issue with columns and reflow that breaks sixels (#146)
Fixes #145
2024-08-09 09:12:51 +02:00
veltza
7a581fe4e1
sixel: improve the renderer (#143)
In the current implementation, when text is written over an image, we
have to cut the entire text line out of the image, regardless of how
long the text is. It doesn't look good, but it was a design choice for
the following reasons:
1) To keep the sixel engine as fast as possible
2) Most applications do not write text on the images anyway

To bring the st terminal in line with other terminals that support
sixels, I have now improved the sixel renderer so that the images can
now have gaps, which allows the text to be printed inside the images.
The changes should not affect performance in normal cases. Only when the
renderer has to deal with the text there might be some performance hits
depending on how many gaps there are in the images.
2024-07-07 21:18:09 +02:00
veltza
48c85cdcf5
sixel: refactor the sixel display mode (#142)
This does not change the current behavior of SDM.
2024-07-05 11:30:55 +02:00
veltza
546dd288c0
sixel: scale images on both screens when zooming in/out (#141)
This fixes an issue where images on the main screen don't scale when you
increase or decrease the font size on the alt screen.
2024-06-14 18:16:32 +02:00
veltza
a414f4a707
sixel: prevent drawing on search bar (#140)
It's annoying to use the search bar when it's behind an image. So this
fix prevents that from happening.
2024-06-13 19:22:01 +02:00
Bakkeby
8aee31444a Adding the anygeometry patch ref. #137 2024-05-31 22:47:52 +02:00
Bakkeby
aa5957495d support colons in SGR character attributes
Patch by Mikhail Kot <to@myrrc.dev>
With some modifications to behave more like xterm (see note below).

Example:

	printf '\033[48;2;255:0:0mtest\n'

https://invisible-island.net/xterm/ctlseqs/ctlseqs.html

Some notes:

"CSI Pm m  Character Attributes (SGR).
[...]
o   xterm allows either colons (standard) or semicolons
(legacy) to separate the subparameters (but after the
first colon, colons must be used).
2024-05-02 09:28:20 +02:00
veltza
118e965d0c
sixel: add support for fully transparent bg (P2=1) (#132)
P2 selects how the terminal draws the background color.

P2                  Meaning
0 or 2 (default)    Pixel positions specified as 0 are set to the
                    current background color.
1                   Pixel positions specified as 0 remain at their
                    current color.

Both modes are now supported.

Ref. https://www.vt100.net/docs/vt3xx-gp/chapter14.html
2024-04-17 18:04:27 +02:00
Bakkeby
dd8675943d Reset title when an empty title string is given
With this patch, st will reset its window title when an empty string is
given as the terminal title. For example:
	printf "\033]0;\007"

Some applications, like termdown, expect this functionality. xterm
implements it, but it seems that most other terminal emulators don't.
In any case, I don't see why there should ever be a case where the st
window doesn't have a title property.

Ref.
https://git.suckless.org/st/commit/497a75638291454875ba1ec8d484c7f3d6f41d66.html
2024-04-03 21:43:56 +02:00
veltza
9b463ac36d
sixel: prevent crashing when size is zero (#129)
Crashing happens when you zoom out and the width or height of an image
becomes zero.
2024-04-02 20:05:32 +02:00