diff options
author | lonkaars <l.leblansch@gmail.com> | 2021-02-22 08:29:10 +0100 |
---|---|---|
committer | lonkaars <l.leblansch@gmail.com> | 2021-02-22 08:29:10 +0100 |
commit | 550f2b8e3ddb02f2ceddb103fdbb4dfc6a6a4d6c (patch) | |
tree | 5ff540c86e93f0b981c00d1e15caf0c760a9d759 | |
parent | 295ca25eba4ab678af0de2b2584d91beaa768304 (diff) |
added osc patch
-rw-r--r-- | config.def.h | 7 | ||||
-rw-r--r-- | readme.md | 1 | ||||
-rwxr-xr-x | st | bin | 106800 -> 110408 bytes | |||
-rw-r--r-- | st.c | 30 | ||||
-rw-r--r-- | st.h | 1 |
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 @@ -9,4 +9,5 @@ This is my custom build of st, including the following patches: - st-scrollback-mouse - st-xresources - st-desktopentry +- st-osc @@ -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; @@ -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; |