From 100499964a89ecac9dd398c543e491ebf76dea77 Mon Sep 17 00:00:00 2001 From: Mike Crute Date: Tue, 22 Dec 2020 16:07:17 -0800 Subject: Local xresources patches --- config.def.h | 11 +++++++---- 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[] = { [255] = 0, /* more colors can be added after 255 to use with DefaultXX */ + "gray90", + "black", "#cccccc", "#555555", "gray90", /* default foreground colour */ @@ -141,10 +143,10 @@ static const char *colorname[] = { * Default colors (colorname index) * foreground, background, cursor, reverse cursor */ -unsigned int defaultfg = 258; -unsigned int defaultbg = 259; -unsigned int defaultcs = 256; -static unsigned int defaultrcs = 257; +unsigned int defaultfg = 257; +unsigned int defaultbg = 256; +unsigned int defaultcs = 258; +static unsigned int defaultrcs = 259; /* * Default shape of cursor @@ -208,6 +210,7 @@ ResourcePref resources[] = { { "cursorColor", STRING, &colorname[258] }, { "termname", STRING, &termname }, { "shell", STRING, &shell }, + { "cursorShape", INTEGER, &cursorshape }, { "minlatency", INTEGER, &minlatency }, { "maxlatency", INTEGER, &maxlatency }, { "blinktimeout", INTEGER, &blinktimeout }, diff --git a/x.c b/x.c index deb8ea5..4de480e 100644 --- a/x.c +++ b/x.c @@ -880,8 +880,8 @@ xclear(int x1, int y1, int x2, int y2) void xhints(void) { - XClassHint class = {opt_name ? opt_name : "st", - opt_class ? opt_class : "St"}; + XClassHint class = {opt_name ? opt_name : termname, + opt_class ? opt_class : termname}; XWMHints wm = {.flags = InputHint, .input = 1}; XSizeHints *sizeh; @@ -2125,7 +2125,6 @@ main(int argc, char *argv[]) { xw.l = xw.t = 0; xw.isfixed = False; - xsetcursor(cursorshape); ARGBEGIN { case 'a': @@ -2185,6 +2184,7 @@ run: die("Can't open display\n"); config_init(); + xsetcursor(cursorshape); cols = MAX(cols, 1); rows = MAX(rows, 1); tnew(cols, rows); -- cgit v1.2.3