aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-02-22 08:29:10 +0100
committerlonkaars <l.leblansch@gmail.com>2021-02-22 08:29:10 +0100
commit550f2b8e3ddb02f2ceddb103fdbb4dfc6a6a4d6c (patch)
tree5ff540c86e93f0b981c00d1e15caf0c760a9d759
parent295ca25eba4ab678af0de2b2584d91beaa768304 (diff)
added osc patch
-rw-r--r--config.def.h7
-rw-r--r--readme.md1
-rwxr-xr-xstbin106800 -> 110408 bytes
-rw-r--r--st.c30
-rw-r--r--st.h1
5 files changed, 36 insertions, 3 deletions
diff --git a/config.def.h b/config.def.h
index 1bdb4f4..e621daf 100644
--- a/config.def.h
+++ b/config.def.h
@@ -124,6 +124,7 @@ static const char *colorname[] = {
"#cccccc",
"#555555",
"black",
+ "gray90",
};
@@ -131,10 +132,10 @@ static const char *colorname[] = {
* Default colors (colorname index)
* foreground, background, cursor, reverse cursor
*/
-unsigned int defaultfg = 7;
unsigned int defaultbg = 258;
-static unsigned int defaultcs = 256;
-static unsigned int defaultrcs = 257;
+unsigned int defaultfg = 259;
+unsigned int defaultcs = 256;
+unsigned int defaultrcs = 257;
/*
* Default shape of cursor
diff --git a/readme.md b/readme.md
index 490af4d..216ecb9 100644
--- a/readme.md
+++ b/readme.md
@@ -9,4 +9,5 @@ This is my custom build of st, including the following patches:
- st-scrollback-mouse
- st-xresources
- st-desktopentry
+- st-osc
diff --git a/st b/st
index 0d0d3d9..a100471 100755
--- a/st
+++ b/st
Binary files differ
diff --git a/st.c b/st.c
index 8769a9f..69839f3 100644
--- a/st.c
+++ b/st.c
@@ -1931,6 +1931,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 089b92d..6e5c836 100644
--- a/st.h
+++ b/st.h
@@ -127,4 +127,5 @@ extern char *termname;
extern unsigned int tabspaces;
extern unsigned int defaultfg;
extern unsigned int defaultbg;
+extern unsigned int defaultcs;
extern float alpha;