st

st config
git clone git://git.evenfri.duckdns.org/st.git
Log | Files | Refs | README | LICENSE

commit a068b0fb757aff7e51742dd8fb9bf7f624f92fe4
parent 316ba16c851df0c7c14905fc19882dcb539c1045
Author: iffilopy <iffilopy@gmail.com>
Date:   Wed, 20 May 2026 17:46:35 +0800

updates: fix colors

Diffstat:
A.gitignore | 4++++
Acolors.sh | 9+++++++++
Mconfig.h | 43+++++++++++++++++++++----------------------
Mst.info | 2+-
4 files changed, 35 insertions(+), 23 deletions(-)

diff --git a/.gitignore b/.gitignore @@ -0,0 +1,4 @@ +*.o +*.orig +*.rej +st diff --git a/colors.sh b/colors.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +for i in {0..255}; do + printf "\033[38;5;${i}m%3d\033[0m " $i + if [ $(( (i + 1) % 12 )) -eq 0 ]; then + echo + fi +done +echo diff --git a/config.h b/config.h @@ -74,7 +74,7 @@ static unsigned int cursorthickness = 2; static int bellvolume = 0; /* default TERM value */ -char *termname = "st"; +char *termname = "st-256color"; /* * spaces per tab @@ -98,36 +98,35 @@ float alpha = 0.8; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { - /* 8 normal colors */ - "black", - "red3", - "green3", - "yellow3", - "blue2", - "magenta3", - "cyan3", - "gray90", + /* 8 normal colors - стандартные TTY цвета */ + "#000000", /* black */ + "#aa0000", /* red */ + "#00aa00", /* green */ + "#aa5500", /* yellow/brown */ + "#0000aa", /* blue */ + "#aa00aa", /* magenta */ + "#00aaaa", /* cyan */ + "#aaaaaa", /* white */ /* 8 bright colors */ - "gray50", - "red", - "green", - "yellow", - "#5c5cff", - "magenta", - "cyan", - "white", + "#555555", /* bright black */ + "#ff5555", /* bright red */ + "#55ff55", /* bright green */ + "#ffff55", /* bright yellow */ + "#5555ff", /* bright blue */ + "#ff55ff", /* bright magenta */ + "#55ffff", /* bright cyan */ + "#ffffff", /* bright white */ [255] = 0, /* more colors can be added after 255 to use with DefaultXX */ - "#cccccc", + "#cccccc", "#555555", - "#aaaaaa", /* default foreground colour */ - "black", /* default background colour */ + "#aaaaaa", /* default foreground colour (bright white) */ + "#000000", /* default background colour (black) */ }; - /* * Default colors (colorname index) * foreground, background, cursor, reverse cursor diff --git a/st.info b/st.info @@ -47,7 +47,7 @@ st-mono| simpleterm monocolor, indn=\E[%p1%dS, invis=\E[8m, is2=\E[4l\E>\E[?1034l, - it#8, + it#2, kel=\E[1;2F, ked=\E[1;5F, ka1=\E[1~,