Commit Graph

312 Commits

Author SHA1 Message Date
mintycube
a673653774 update config with options for new patches 2024-10-12 12:10:33 +05:00
Minty Cube
404c7d975a
Merge branch 'bakkeby:master' into master 2024-10-05 02:40:40 +00: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
mintycube
9b7c9fe907 Merge remote-tracking branch 'upstream/master' 2024-08-11 12:48:43 +05: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
mintycube
b5218d4f77 Add gitattributes 2024-07-22 14:31:17 +05:00
mintycube
ede0ce70a0 Include patches.h for correct syntax highlighting 2024-07-20 13:27:36 +05:00
mintycube
33db255a2d Apply keyboard select patch 2024-07-10 11:34:03 +05:00
mintycube
3181d6876b add transparency and change font size
This takes effect only when using st as a scratchpad in dwm.
Otherwise transparency value from xresources is used.
Bug or a Feature??
2024-07-10 11:34:03 +05:00
Minty Cube
15639f8e0e
Merge branch 'bakkeby:master' into master 2024-07-10 10:42:52 +05: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
mintycube
6c03c605d9 Add my config 2024-06-24 15:32:04 +05: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
Bakkeby
fdae39e8b8 bump version to 0.9.1
ref.
https://git.suckless.org/st/commit/5ce971628106fb767ef91bf4386227423f5fdf98.html
2024-03-20 08:04:33 +01:00
Bakkeby
dba3d178a4 config.def.h: improve latency for the default configuration
Ref.
https://git.suckless.org/st/commit/f20e169a20f3ee761f7e09714f1d4c10916cf4c6.html
2024-03-17 15:38:45 +01:00
Bakkeby
06bb70e2d1 externalpipe + reflow: compatibility fix correction ref. #125 2024-03-14 23:26:47 +01:00
Bakkeby
f773016680 alpha: multiply each RGB value with alpha for a darker blend 2024-03-14 22:30:15 +01:00
Bakkeby
4997f1b1ae reflow: fix for scrollback buffer content getting lost following ctrl+l ref. #123 2024-03-14 16:58:22 +01:00
Bakkeby
d318b3c03f externalpipe + reflow compatibility fix ref. #122 2024-03-14 10:01:37 +01:00
Bakkeby
8e96ad302c netwmicon: correction for when including libraries 2024-03-14 09:15:57 +01:00
Bakkeby
25a28a61a3 netwmicon_ff - increase buffer size to 16 2024-03-13 11:56:11 +01:00
Bakkeby
6a5561cd76 Minor changes to description 2024-03-13 10:44:43 +01:00
Stein Gunnar Bakkeby
0b8055a271
netwmicon: upgrading patch and adding farbfeld variant (#121) 2024-03-13 10:35:17 +01:00
Stein Gunnar Bakkeby
3b87b07404
Adding reflow patch (#120) 2024-03-13 10:33:51 +01:00
veltza
9a41526bfb
Fix buffer overflow in xdrawglyph() (#119)
The buffer overflow occurs when the ligatures patch is enabled and
xmakeglyphfontspecs() returns more than one XftGlyphFontSpec.

Ref. https://github.com/cog1to/st-ligatures/issues/35
2024-03-11 22:54:16 +01:00
Bakkeby
a28f3e0d39 Adding back lines that were removed by mistake, fixes mouse double click to select 2024-03-11 22:49:20 +01:00
Bakkeby
7976e611e3 ligatures - moving hbcreatebuffer out of xresources condition ref. #118 2024-03-10 23:41:12 +01:00
Bakkeby
1da419eb35 ligatures + wide glyphs + vertcenter: compatibility fixes ref. #118 2024-03-10 22:18:05 +01:00
Bakkeby
f87d3de2cf wide glyphs: fixing compilation error following code refactoring 2024-03-10 10:05:54 +01:00
Bakkeby
3564593563 Revert "Fix cursor move with wide glyphs" ref. #118
This reverts commit 400aa4492f.
2024-03-08 19:52:11 +01:00
Bakkeby
cd37481bde sixel: moving osc_table out of sixel patch due to global dependency ref. #118 2024-03-08 19:52:00 +01:00
Bakkeby
9ddc13c0e0 drawcol = dc.col[g.bg]; 2024-03-07 23:40:50 +01:00
Bakkeby
b43957b061 Optimise utf8decode() 2024-03-07 23:26:34 +01:00
Bakkeby
d78d582eaa Streamline validation in utf8decode()
https://lists.suckless.org/hackers/2207/18407.html
2024-03-07 23:22:02 +01:00
Bakkeby
6d5c2b3ddb code-golfing: cleanup osc color related code
* adds missing function prototype
* move xgetcolor() prototype to win.h (that's where all the other x.c
  func prototype seems to be declared at)
* check for snprintf error/truncation
* reduces code duplication for osc 10/11/12
* unify osc_color_response() and osc4_color_response() into a single function

the latter two was suggested by Quentin Rameau in his patch review on
the hackers list.

ref.
https://git.suckless.org/st/commit/8629d9a1da72cc18568a8f146307b0e939b77ebf.html
2024-03-07 23:16:00 +01:00
Bakkeby
e88f2bf20c Removing the VIM browse patch.
The general reasoning is that the vim browse patch is very invasive,
has a high level of complexity, and is incompatible with a significant
number of other patches and it complicates further maintenance.

Additionally the patch has its own scrollback mechanism which seemingly
did not work properly - and nobody seems to have complained about this
since the patch was added back in May 2021.

If you want to try out the vim browse patch then I would recommend having
a play around with the patch author's own build that has this patch
integrated:
   - https://github.com/juliusHuelsmann/st-history-vim
   - https://github.com/juliusHuelsmann/st

Alternatively a tag has been added to this repository that refers to the
last commit that still has the vim browse patch:
   - https://github.com/bakkeby/st-flexipatch/tree/VIM_BROWSE_PATCH
2024-03-07 22:35:11 +01:00