Compare commits

..

21 commits

Author SHA1 Message Date
ant
4c439e7b8e use "emoji" as fallback font to prevent crash when emoji is not found 2026-03-12 21:13:02 +01:00
ant
0814fc7a5d symplify nix flake 2026-03-12 21:12:53 +01:00
Antoine Vaure
3d9c53068d fix: missing else in previous commit 2026-03-12 19:31:43 +01:00
Antoine Vaure
9e96ffc61e fix: alt key with two bytes keys 2026-03-12 19:31:43 +01:00
ant
f2fdc033cb Revert "change colors for light theme"
This reverts commit 042af42400.
2026-03-12 19:31:43 +01:00
Antoine Vaure
f627e69374 change colors for light theme 2026-03-12 19:31:43 +01:00
Antoine Vaure
5efe76d0f6 add keybinnds to scroll 2026-03-12 19:31:43 +01:00
Antoine Vaure
a2c1ab5706 decrease default font size 2026-03-12 19:31:43 +01:00
ant
4a5abeb82a Enable alpha patch 2026-03-12 19:31:43 +01:00
ant
89749e9515 enable boxdraw 2026-03-12 19:31:43 +01:00
ant
405415b61d Add a nix flake 2026-03-12 19:31:43 +01:00
ant
cc4388ac0d enable patches I want 2026-03-12 19:31:43 +01:00
ant
a3de76da58 change keys to keyboard select and zoom 2026-03-12 19:31:43 +01:00
ant
03c0eb9d1e change default colors 2026-03-12 19:31:43 +01:00
ant
d8bf6e236f Add darkman patch
a patch to choose between two color themes by executing a command
2026-03-12 19:31:43 +01:00
ant
74ca31c0ec font default to caskadia 2026-03-12 19:31:43 +01:00
Antoine Vaure
51ba63e165 config: increase scroll speed 2026-03-12 19:31:43 +01:00
ant
a7d0ea2d33 fontfeature patch 2026-03-12 19:31:43 +01:00
Bakkeby
dab1ddca8c Bump to 688f70a. st: guard tsetdirt() against zero-sized terminal
tsetdirt() assumes term.row > 0. During early init or
resize paths this may not hold, leading to out-of-bounds
access. Bail out early if there are no rows.

https://git.suckless.org/st/commit/688f70add0d1da8a416bf7df763328d694a24a3a.html
2026-02-18 11:21:22 +01:00
Bakkeby
721a690877 Bump to 0723b7e. Disable bracked paste in reset.
Sadly, there are too many programs today that enable this mode
and it is becoming very common to find the terminal adding
characters before and after in every of your pastes. A reset
should disable this mode.

https://git.suckless.org/st/commit/0723b7e39e73b2bcfce047b047f6e795d6184028.html
2026-02-18 11:19:39 +01:00
Bakkeby
cc852e9a86 Skip DCS escape sequences if buffer is full ref. #190 2026-02-14 21:09:51 +01:00
4 changed files with 12 additions and 2 deletions

View file

@ -1,4 +1,4 @@
Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this st 0.9.3 (6e97047, 2025-08-09) project has a different take on st patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more. Similar to [dwm-flexipatch](https://github.com/bakkeby/dwm-flexipatch) this st 0.9.3 (688f70a, 2026-01-15) project has a different take on st patching. It uses preprocessor directives to decide whether or not to include a patch during build time. Essentially this means that this build, for better or worse, contains both the patched _and_ the original code. The aim being that you can select which patches to include and the build will contain that code and nothing more.
For example to include the `alpha` patch then you would only need to flip this setting from 0 to 1 in [patches.h](https://github.com/bakkeby/st-flexipatch/blob/master/patches.def.h): For example to include the `alpha` patch then you would only need to flip this setting from 0 to 1 in [patches.h](https://github.com/bakkeby/st-flexipatch/blob/master/patches.def.h):
```c ```c

View file

@ -8,7 +8,7 @@
static char *font = "Cascadia Code NF:regular:pixelsize=13.5:fontfeatures=calt,ss01:antialias=true:autohint=true"; static char *font = "Cascadia Code NF:regular:pixelsize=13.5:fontfeatures=calt,ss01:antialias=true:autohint=true";
#if FONT2_PATCH #if FONT2_PATCH
/* Spare fonts */ /* Spare fonts */
static char *font2[] = { "CaskaydiaCove Nerd Font:pixelsize=13.5:antialias=true:autohint=true" }; static char *font2[] = { "emoji:pixelsize=13.5:antialias=true:autohint=true" };
#endif // FONT2_PATCH #endif // FONT2_PATCH
#if BACKGROUND_IMAGE_PATCH #if BACKGROUND_IMAGE_PATCH

View file

@ -51,6 +51,7 @@
devShell = pkgs.mkShell { devShell = pkgs.mkShell {
inputsFrom = [ packages.st ]; inputsFrom = [ packages.st ];
hardeningDisable = [ "fortify" ];
packages = with pkgs; [ packages = with pkgs; [
bear bear
clang-tools clang-tools

9
st.c
View file

@ -1102,6 +1102,9 @@ tsetdirt(int top, int bot)
{ {
int i; int i;
if (term.row <= 0)
return;
LIMIT(top, 0, term.row-1); LIMIT(top, 0, term.row-1);
LIMIT(bot, 0, term.row-1); LIMIT(bot, 0, term.row-1);
@ -3332,6 +3335,7 @@ eschandle(uchar ascii)
resettitle(); resettitle();
xloadcols(); xloadcols();
xsetmode(0, MODE_HIDE); xsetmode(0, MODE_HIDE);
xsetmode(0, MODE_BRCKTPASTE);
#if SCROLLBACK_PATCH && !REFLOW_PATCH #if SCROLLBACK_PATCH && !REFLOW_PATCH
if (!IS_SET(MODE_ALTSCREEN)) { if (!IS_SET(MODE_ALTSCREEN)) {
term.scr = 0; term.scr = 0;
@ -3466,6 +3470,11 @@ check_control_code:
return; return;
#if SIXEL_PATCH #if SIXEL_PATCH
} else if (term.esc & ESC_DCS) { } else if (term.esc & ESC_DCS) {
/* Skip if DCS escape sequence buffer is full */
if (csiescseq.len >= sizeof(csiescseq.buf) - 1) {
return;
}
csiescseq.buf[csiescseq.len++] = u; csiescseq.buf[csiescseq.len++] = u;
if (BETWEEN(u, 0x40, 0x7E) if (BETWEEN(u, 0x40, 0x7E)
|| csiescseq.len >= \ || csiescseq.len >= \