diff options
author | Mike Crute <mike@crute.us> | 2020-12-22 16:07:17 -0800 |
---|---|---|
committer | Mike Crute <mike@crute.us> | 2023-04-25 20:45:27 -0700 |
commit | 100499964a89ecac9dd398c543e491ebf76dea77 (patch) | |
tree | d05eea917c3fbffa79a51cb9fad41ba7d863b790 | |
parent | 49af5d59d8bed15678c634d11e86364c8801dc82 (diff) | |
download | st-patched-100499964a89ecac9dd398c543e491ebf76dea77.tar.bz2 st-patched-100499964a89ecac9dd398c543e491ebf76dea77.tar.xz st-patched-100499964a89ecac9dd398c543e491ebf76dea77.zip |
Local xresources patches
-rw-r--r-- | config.def.h | 11 | ||||
-rw-r--r-- | x.c | 6 |
2 files changed, 10 insertions, 7 deletions
diff --git a/config.def.h b/config.def.h index 97d0ead..0df3073 100644 --- a/config.def.h +++ b/config.def.h | |||
@@ -130,6 +130,8 @@ static const char *colorname[] = { | |||
130 | [255] = 0, | 130 | [255] = 0, |
131 | 131 | ||
132 | /* more colors can be added after 255 to use with DefaultXX */ | 132 | /* more colors can be added after 255 to use with DefaultXX */ |
133 | "gray90", | ||
134 | "black", | ||
133 | "#cccccc", | 135 | "#cccccc", |
134 | "#555555", | 136 | "#555555", |
135 | "gray90", /* default foreground colour */ | 137 | "gray90", /* default foreground colour */ |
@@ -141,10 +143,10 @@ static const char *colorname[] = { | |||
141 | * Default colors (colorname index) | 143 | * Default colors (colorname index) |
142 | * foreground, background, cursor, reverse cursor | 144 | * foreground, background, cursor, reverse cursor |
143 | */ | 145 | */ |
144 | unsigned int defaultfg = 258; | 146 | unsigned int defaultfg = 257; |
145 | unsigned int defaultbg = 259; | 147 | unsigned int defaultbg = 256; |
146 | unsigned int defaultcs = 256; | 148 | unsigned int defaultcs = 258; |
147 | static unsigned int defaultrcs = 257; | 149 | static unsigned int defaultrcs = 259; |
148 | 150 | ||
149 | /* | 151 | /* |
150 | * Default shape of cursor | 152 | * Default shape of cursor |
@@ -208,6 +210,7 @@ ResourcePref resources[] = { | |||
208 | { "cursorColor", STRING, &colorname[258] }, | 210 | { "cursorColor", STRING, &colorname[258] }, |
209 | { "termname", STRING, &termname }, | 211 | { "termname", STRING, &termname }, |
210 | { "shell", STRING, &shell }, | 212 | { "shell", STRING, &shell }, |
213 | { "cursorShape", INTEGER, &cursorshape }, | ||
211 | { "minlatency", INTEGER, &minlatency }, | 214 | { "minlatency", INTEGER, &minlatency }, |
212 | { "maxlatency", INTEGER, &maxlatency }, | 215 | { "maxlatency", INTEGER, &maxlatency }, |
213 | { "blinktimeout", INTEGER, &blinktimeout }, | 216 | { "blinktimeout", INTEGER, &blinktimeout }, |
@@ -880,8 +880,8 @@ xclear(int x1, int y1, int x2, int y2) | |||
880 | void | 880 | void |
881 | xhints(void) | 881 | xhints(void) |
882 | { | 882 | { |
883 | XClassHint class = {opt_name ? opt_name : "st", | 883 | XClassHint class = {opt_name ? opt_name : termname, |
884 | opt_class ? opt_class : "St"}; | 884 | opt_class ? opt_class : termname}; |
885 | XWMHints wm = {.flags = InputHint, .input = 1}; | 885 | XWMHints wm = {.flags = InputHint, .input = 1}; |
886 | XSizeHints *sizeh; | 886 | XSizeHints *sizeh; |
887 | 887 | ||
@@ -2125,7 +2125,6 @@ main(int argc, char *argv[]) | |||
2125 | { | 2125 | { |
2126 | xw.l = xw.t = 0; | 2126 | xw.l = xw.t = 0; |
2127 | xw.isfixed = False; | 2127 | xw.isfixed = False; |
2128 | xsetcursor(cursorshape); | ||
2129 | 2128 | ||
2130 | ARGBEGIN { | 2129 | ARGBEGIN { |
2131 | case 'a': | 2130 | case 'a': |
@@ -2185,6 +2184,7 @@ run: | |||
2185 | die("Can't open display\n"); | 2184 | die("Can't open display\n"); |
2186 | 2185 | ||
2187 | config_init(); | 2186 | config_init(); |
2187 | xsetcursor(cursorshape); | ||
2188 | cols = MAX(cols, 1); | 2188 | cols = MAX(cols, 1); |
2189 | rows = MAX(rows, 1); | 2189 | rows = MAX(rows, 1); |
2190 | tnew(cols, rows); | 2190 | tnew(cols, rows); |