sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit 1172d56f9c6b824e297130c3e25654d0b0d3fd0b
parent 8a09ee6a97dcc1cae4ae7a3a66e8c0f262af3790
Author: Santtu Lakkala <inz@inz.fi>
Date:   Fri,  4 Mar 2022 16:43:56 +0200

[st][patch] Drop OSC 10, 11, 12 patches

The 2nd version of the patch has been merged into mainline, so these
patches are now obsolete.

Diffstat:
Dst.suckless.org/patches/osc_10_11_12/index.md | 18------------------
Dst.suckless.org/patches/osc_10_11_12/st-osc_10_11_12-20200418-66520e1.diff | 72------------------------------------------------------------------------
Dst.suckless.org/patches/osc_10_11_12_2/index.md | 21---------------------
Dst.suckless.org/patches/osc_10_11_12_2/st-osc10-20210106-4ef0cbd.diff | 91-------------------------------------------------------------------------------
4 files changed, 0 insertions(+), 202 deletions(-)

diff --git a/st.suckless.org/patches/osc_10_11_12/index.md b/st.suckless.org/patches/osc_10_11_12/index.md @@ -1,18 +0,0 @@ -OSC 10, 11, 12 -============== - -Description ------------ -This patch adds support for OSC escape sequences 10, 11 and 12, that modify the -bg, fg and cursor colors. To decouple them from the palette you can select -entries from the colorname table after the 255 position for defaultfg, defaultbg -and defaultcs. - -Download --------- -* [st-osc\_10\_11\_12-20200418-66520e1.diff](st-osc_10_11_12-20200418-66520e1.diff) - - -Authors -------- -* Christian Tenllado - <ctenllado at gmail dot com> diff --git a/st.suckless.org/patches/osc_10_11_12/st-osc_10_11_12-20200418-66520e1.diff b/st.suckless.org/patches/osc_10_11_12/st-osc_10_11_12-20200418-66520e1.diff @@ -1,72 +0,0 @@ -From 66520e1c3b0a6f30ce1cde033a1aec04e5a0f1a2 Mon Sep 17 00:00:00 2001 -From: Christian Tenllado <ctenllado@gmail.com> -Date: Sat, 18 Apr 2020 09:26:46 +0200 -Subject: [PATCH] OSC 10/11/12 fg, bg and cursor colors - -Support for OSC escape sequences 10, 11 and 12 to modify the bg, fg and -cursor colors. I selected entries in the colorname table after the 255 -position for defaultfg, defaultbg and defaultcs ---- - config.def.h | 4 ++-- - st.c | 17 ++++++++++++++--- - st.h | 1 + - 3 files changed, 17 insertions(+), 5 deletions(-) - -diff --git a/config.def.h b/config.def.h -index 546edda..7d20fdf 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -118,8 +118,8 @@ static const char *colorname[] = { - */ - unsigned int defaultfg = 7; - unsigned int defaultbg = 0; --static unsigned int defaultcs = 256; --static unsigned int defaultrcs = 257; -+unsigned int defaultcs = 256; -+unsigned int defaultrcs = 257; - - /* - * Default shape of cursor -diff --git a/st.c b/st.c -index 3e48410..ec7970c 100644 ---- a/st.c -+++ b/st.c -@@ -1862,12 +1862,23 @@ strhandle(void) - } - return; - case 4: /* color set */ -- if (narg < 3) -+ case 10: /* foreground set */ -+ case 11: /* background set */ -+ case 12: /* cursor color */ -+ if ((par == 4 && narg < 3) || narg < 2) - break; -- p = strescseq.args[2]; -+ p = strescseq.args[((par == 4) ? 2 : 1)]; - /* FALLTHROUGH */ - case 104: /* color reset, here p = NULL */ -- j = (narg > 1) ? atoi(strescseq.args[1]) : -1; -+ if (par == 10) -+ j = defaultfg; -+ else if (par == 11) -+ j = defaultbg; -+ else if (par == 12) -+ j = defaultcs; -+ else -+ j = (narg > 1) ? atoi(strescseq.args[1]) : -1; -+ - if (xsetcolorname(j, p)) { - if (par == 104 && narg <= 1) - return; /* color reset without parameter */ -diff --git a/st.h b/st.h -index a1928ca..bd79875 100644 ---- a/st.h -+++ b/st.h -@@ -121,3 +121,4 @@ extern char *termname; - extern unsigned int tabspaces; - extern unsigned int defaultfg; - extern unsigned int defaultbg; -+extern unsigned int defaultcs; --- -2.20.1 - diff --git a/st.suckless.org/patches/osc_10_11_12_2/index.md b/st.suckless.org/patches/osc_10_11_12_2/index.md @@ -1,21 +0,0 @@ -OSC 10, 11, 12 #2 ------------------ - -Description ------------ - -This patch adds support for OSC 10, 11, and 12 in the way they are implemented -in most other terminals (e.g libvte, kitty). Specifically it differs from -osc_10_11_12 in that it treats the background and foreground colors as distinct -from palette colours 01 and 07 in order to facilitate the use of theme setting -scripts like [theme.sh](https://github.com/lemnos/theme.sh) which expect these -colours to be distinct. - - -Download --------- -* [st-osc10-20210106-4ef0cbd.diff](st-osc10-20210106-4ef0cbd.diff) - -Authors -------- -* Raheman Vaiya - <r.vaiya at gmail dot com> diff --git a/st.suckless.org/patches/osc_10_11_12_2/st-osc10-20210106-4ef0cbd.diff b/st.suckless.org/patches/osc_10_11_12_2/st-osc10-20210106-4ef0cbd.diff @@ -1,91 +0,0 @@ -From 9c4b3f40e07dd1d6dd94fa733b7853aff7f4b8fc Mon Sep 17 00:00:00 2001 -From: Raheman Vaiya <r.vaiya@gmail.com> -Date: Sat, 16 Jan 2021 18:18:07 -0500 -Subject: [PATCH] Add proper OSC 10/11 support. - ---- - config.def.h | 9 ++++++--- - st.c | 30 ++++++++++++++++++++++++++++++ - st.h | 1 + - 3 files changed, 37 insertions(+), 3 deletions(-) - -diff --git a/config.def.h b/config.def.h -index 6f05dce..9bb22a5 100644 ---- a/config.def.h -+++ b/config.def.h -@@ -120,6 +120,8 @@ static const char *colorname[] = { - /* more colors can be added after 255 to use with DefaultXX */ - "#cccccc", - "#555555", -+ "black", -+ "gray90", - }; - - -@@ -127,9 +129,10 @@ static const char *colorname[] = { - * Default colors (colorname index) - * foreground, background, cursor, reverse cursor - */ --unsigned int defaultfg = 7; --unsigned int defaultbg = 0; --static unsigned int defaultcs = 256; -+ -+unsigned int defaultbg = 258; -+unsigned int defaultfg = 259; -+unsigned int defaultcs = 256; - static unsigned int defaultrcs = 257; - - /* -diff --git a/st.c b/st.c -index abbbe4b..6a57d89 100644 ---- a/st.c -+++ b/st.c -@@ -1877,6 +1877,36 @@ strhandle(void) - } - } - return; -+ case 10: /* set foreground color */ -+ if (narg < 2) -+ break; -+ -+ p = strescseq.args[1]; -+ if (xsetcolorname(defaultfg, p)) -+ fprintf(stderr, "erresc: invalid foreground color %d\n", p); -+ else -+ redraw(); -+ break; -+ case 11: /* set background color */ -+ if (narg < 2) -+ break; -+ -+ p = strescseq.args[1]; -+ if (xsetcolorname(defaultbg, p)) -+ fprintf(stderr, "erresc: invalid background color %d\n", p); -+ else -+ redraw(); -+ break; -+ case 12: /* set cursor color */ -+ if (narg < 2) -+ break; -+ -+ p = strescseq.args[1]; -+ if (xsetcolorname(defaultcs, p)) -+ fprintf(stderr, "erresc: invalid cursor color %d\n", p); -+ else -+ redraw(); -+ break; - case 4: /* color set */ - if (narg < 3) - break; -diff --git a/st.h b/st.h -index 3d351b6..054366d 100644 ---- a/st.h -+++ b/st.h -@@ -123,3 +123,4 @@ extern char *termname; - extern unsigned int tabspaces; - extern unsigned int defaultfg; - extern unsigned int defaultbg; -+extern unsigned int defaultcs; --- -2.20.1 -