@@ -1,71 +0,0 @@ | |||||
--- config.def.h | |||||
+++ 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; | |||||
/* | |||||
--- st.c | |||||
+++ 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; | |||||
--- st.h | |||||
+++ 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; |
@@ -94,7 +94,7 @@ char *termname = "st-256color"; | |||||
unsigned int tabspaces = 8; | unsigned int tabspaces = 8; | ||||
/* bg opacity */ | /* bg opacity */ | ||||
float alpha = 0.8, alphaUnfocused = 0.3; | |||||
float alpha = 0.5, alphaUnfocused = 0.3; | |||||
/* Terminal colors (16 first used in escape sequence) */ | /* Terminal colors (16 first used in escape sequence) */ | ||||
static const char *colorname[] = { | static const char *colorname[] = { | ||||
@@ -176,9 +176,9 @@ static uint forcemousemod = ShiftMask; | |||||
static MouseShortcut mshortcuts[] = { | static MouseShortcut mshortcuts[] = { | ||||
/* mask button function argument release */ | /* mask button function argument release */ | ||||
{ XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, | { XK_ANY_MOD, Button2, selpaste, {.i = 0}, 1 }, | ||||
{ XK_NO_MOD, Button4, ttysend, {.s = "\033[5;2~"}, 0, -1 }, | |||||
{ XK_NO_MOD, Button4, ttysend, {.s = "\033[1;3A"}, 0, -1 }, | |||||
{ XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, | { XK_ANY_MOD, Button4, ttysend, {.s = "\031"} }, | ||||
{ XK_NO_MOD, Button5, ttysend, {.s = "\033[6;2~"}, 0, -1 }, | |||||
{ XK_NO_MOD, Button5, ttysend, {.s = "\033[1;3B"}, 0, -1 }, | |||||
{ XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, | { XK_ANY_MOD, Button5, ttysend, {.s = "\005"} }, | ||||
}; | }; | ||||
@@ -453,6 +453,8 @@ static Key key[] = { | |||||
{ XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0}, | { XK_F33, XK_NO_MOD, "\033[20;5~", 0, 0}, | ||||
{ XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0}, | { XK_F34, XK_NO_MOD, "\033[21;5~", 0, 0}, | ||||
{ XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0}, | { XK_F35, XK_NO_MOD, "\033[23;5~", 0, 0}, | ||||
/* {"\033[1;3A", XK_NO_MOD, 3}, /1* Mod1+Up *1/ */ | |||||
/* {"\033[1;3B", XK_NO_MOD, 3}, /1* Mod1+Down *1/ */ | |||||
}; | }; | ||||
/* | /* | ||||