diff --git a/config.def.h b/config.def.h index 0e01717..949b1ca 100644 --- a/config.def.h +++ b/config.def.h @@ -85,30 +85,30 @@ unsigned int tabspaces = 8; /* Terminal colors (16 first used in escape sequence) */ static const char *colorname[] = { /* 8 normal colors */ - "black", - "red3", - "green3", - "yellow3", - "blue2", - "magenta3", - "cyan3", - "gray90", + "#3b4252", /* black */ + "#bf616a", /* red */ + "#a3be8c", /* green */ + "#ebcb8b", /* yellow */ + "#81a1c1", /* blue */ + "#b48ead", /* magenta */ + "#88c0d0", /* cyan */ + "#e5e9f0", /* white */ /* 8 bright colors */ - "gray50", - "red", - "green", - "yellow", - "#5c5cff", - "magenta", - "cyan", - "white", + "#4c566a", /* black */ + "#bf616a", /* red */ + "#a3be8c", /* green */ + "#ebcb8b", /* yellow */ + "#81a1c1", /* blue */ + "#b48ead", /* magenta */ + "#8fbcbb", /* cyan */ + "#eceff4", /* white */ [255] = 0, /* more colors can be added after 255 to use with DefaultXX */ - "#cccccc", - "#555555", + "#2e3440", /* background */ + "#d8dee9", /* foreground */ }; @@ -116,10 +116,13 @@ 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 defaultfg = 257; +unsigned int defaultbg = 256; +static unsigned int defaultcs = 257; static unsigned int defaultrcs = 257; +unsigned int selectionbg = 0; +unsigned int selectionfg = 257; +static int ignoreselfg = 1; /* * Default shape of cursor diff --git a/x.c b/x.c index 0422421..174a8ac 100644 --- a/x.c +++ b/x.c @@ -1336,9 +1336,9 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i } if (base.mode & ATTR_REVERSE) { - temp = fg; - fg = bg; - bg = temp; + bg = &dc.col[selectionbg]; + if (!ignoreselfg) + fg = &dc.col[selectionfg]; } if (base.mode & ATTR_BLINK && win.mode & MODE_BLINK)