foxygit / dotfiles Log in
commit e9b0c0ca82ee8b0b8e0088406307985b060930f6
Author:     MrJensK <jens.se@icloud.com>
AuthorDate: Thu Aug 13 14:17:35 2026 +0200
Commit:     MrJensK <jens.se@icloud.com>
CommitDate: Thu Aug 13 14:17:35 2026 +0200

    st: match previous kitty setup (Gruvbox Dark Hard colours, opaque bg, steady cursor, 3-line wheel scroll, 5000-line scrollback)
---
 README.md                         | 13 +++++++----
 config/st/config.def.h            | 47 ++++++++++++++++++++-------------------
 install.sh                        |  2 +-
 st-patches/10-histsize-5000.patch | 11 +++++++++
 4 files changed, 45 insertions(+), 28 deletions(-)

diff --git a/README.md b/README.md
index 0a4a797..ef6fc50 100644
--- a/README.md
+++ b/README.md
@@ -114,7 +114,8 @@ dotfiles/
 │   ├── 06-alpha.patch
 │   ├── 07-blinking_cursor.patch
 │   ├── 08-bold-is-not-bright.patch
-│   └── 09-anysize.patch
+│   ├── 09-anysize.patch
+│   └── 10-histsize-5000.patch
 └── config/
     ├── sxwmrc                    # sxwm config (keybinds, layout, colours)
     ├── sxbarc                    # sxbar config (modules, colours, icons)
@@ -152,11 +153,15 @@ building, in order — all sourced from [st.suckless.org/patches](https://st.suc
 | [`07-blinking_cursor.patch`](st-patches/07-blinking_cursor.patch) | Blinking cursor support with a configurable rate |
 | [`08-bold-is-not-bright.patch`](st-patches/08-bold-is-not-bright.patch) | Bold text no longer automatically renders in the bright color variant |
 | [`09-anysize.patch`](st-patches/09-anysize.patch) | Window can be resized to any pixel size instead of snapping to whole cells |
+| [`10-histsize-5000.patch`](st-patches/10-histsize-5000.patch) | Bumps the scrollback buffer from 2000 to 5000 lines (local tweak, not from upstream — matches the previous kitty `scrollback_lines`) |

 [`config/st/config.def.h`](config/st/config.def.h) is copied over the patched
-source before building, so local tweaks (font, colours, alpha default, cursor
-style, keybinds) survive a rebuild — edit it and re-run `install.sh` to apply
-changes.
+source before building, so local tweaks survive a rebuild — edit it and
+re-run `install.sh` to apply changes. It's tuned to match the previous kitty
+setup: Gruvbox Dark Hard colours, opaque background, steady (non-blinking)
+block cursor, JetBrainsMono Nerd Font, and 3 lines scrolled per mouse-wheel
+notch. Live font zoom is built into vanilla st — `Ctrl+Shift+PageUp`/`PageDown`
+to zoom, `Ctrl+Shift+Home` to reset — no patch needed.

 ## Keyboard shortcuts (sxwm)

diff --git a/config/st/config.def.h b/config/st/config.def.h
index 930bbdf..574aad6 100644
--- a/config/st/config.def.h
+++ b/config/st/config.def.h
@@ -108,35 +108,36 @@ unsigned int tabspaces = 8;
 /* bg opacity (1.0 = opaque, matches previous kitty setup; override with -A) */
 float alpha = 1.0;

-/* Terminal colors (16 first used in escape sequence) */
+/* Terminal colors (16 first used in escape sequence): Gruvbox Dark Hard,
+ * matches the previous kitty GruvBox_DarkHard.conf theme */
 static const char *colorname[] = {
 	/* 8 normal colors */
-	"black",
-	"red3",
-	"green3",
-	"yellow3",
-	"blue2",
-	"magenta3",
-	"cyan3",
-	"gray90",
+	"#1d2021", /* black   (bg0_h) */
+	"#cc241d", /* red */
+	"#98971a", /* green */
+	"#d79921", /* yellow */
+	"#458588", /* blue */
+	"#b16286", /* magenta */
+	"#689d6a", /* cyan */
+	"#d5c4a1", /* white */

 	/* 8 bright colors */
-	"gray50",
-	"red",
-	"green",
-	"yellow",
-	"#5c5cff",
-	"magenta",
-	"cyan",
-	"white",
+	"#665c54", /* bright black */
+	"#fb4934", /* bright red */
+	"#b8bb26", /* bright green */
+	"#fabd2f", /* bright yellow */
+	"#83a598", /* bright blue */
+	"#d3869b", /* bright magenta */
+	"#8ec07c", /* bright cyan */
+	"#fbf1c7", /* bright white */

 	[255] = 0,

 	/* more colors can be added after 255 to use with DefaultXX */
-	"#cccccc",
-	"#555555",
-	"gray90", /* default foreground colour */
-	"black", /* default background colour */
+	"#ebdbb2", /* cursor colour */
+	"#1d2021", /* reverse cursor colour */
+	"#ebdbb2", /* default foreground colour */
+	"#1d2021", /* default background colour */
 };


@@ -198,8 +199,8 @@ static uint forcemousemod = ShiftMask;
  */
 static MouseShortcut mshortcuts[] = {
 	/* mask                 button   function        argument       release */
-	{ XK_ANY_MOD,           Button4, kscrollup,      {.i = 1},		0, /* !alt */ -1 },
-	{ XK_ANY_MOD,           Button5, kscrolldown,    {.i = 1},		0, /* !alt */ -1 },
+	{ XK_ANY_MOD,           Button4, kscrollup,      {.i = 3},		0, /* !alt */ -1 }, /* 3 lines/notch, matches previous kitty wheel_scroll_multiplier */
+	{ XK_ANY_MOD,           Button5, kscrolldown,    {.i = 3},		0, /* !alt */ -1 },
 	{ XK_ANY_MOD,           Button2, selpaste,       {.i = 0},      1 },
 	{ ShiftMask,            Button4, ttysend,        {.s = "\033[5;2~"} },
 	{ XK_ANY_MOD,           Button4, ttysend,        {.s = "\031"} },
diff --git a/install.sh b/install.sh
index 4913557..db8b97f 100755
--- a/install.sh
+++ b/install.sh
@@ -113,7 +113,7 @@ echo "==> Klonar st..."
 rm -rf st
 git clone --depth=1 "$ST_REPO" st

-echo "==> Applicerar st-patchar (delkey, scrollback, clipboard, boxdraw_v2, vertcenter, alpha, blinking_cursor, bold-is-not-bright, anysize)..."
+echo "==> Applicerar st-patchar (delkey, scrollback, clipboard, boxdraw_v2, vertcenter, alpha, blinking_cursor, bold-is-not-bright, anysize, histsize-5000)..."
 cd st
 for p in "$SCRIPT_DIR"/st-patches/*.patch; do
     patch -p1 < "$p"
diff --git a/st-patches/10-histsize-5000.patch b/st-patches/10-histsize-5000.patch
new file mode 100644
index 0000000..a3b5d0b
--- /dev/null
+++ b/st-patches/10-histsize-5000.patch
@@ -0,0 +1,11 @@
+--- a/st.c	2026-08-13 14:16:06.877940311 +0200
++++ b/st.c	2026-08-13 14:16:06.881940442 +0200
+@@ -35,7 +35,7 @@
+ #define ESC_ARG_SIZ   16
+ #define STR_BUF_SIZ   ESC_BUF_SIZ
+ #define STR_ARG_SIZ   ESC_ARG_SIZ
+-#define HISTSIZE      2000
++#define HISTSIZE      5000
+
+ /* macros */
+ #define IS_SET(flag)		((term.mode & (flag)) != 0)