PATCH: nord + selectioncolors

This commit is contained in:
EEva (JPotier) 2020-03-03 21:52:42 +02:00
parent 75f92eb348
commit 5ca9559a6e
2 changed files with 27 additions and 24 deletions

View file

@ -85,30 +85,30 @@ unsigned int tabspaces = 8;
/* Terminal colors (16 first used in escape sequence) */ /* Terminal colors (16 first used in escape sequence) */
static const char *colorname[] = { static const char *colorname[] = {
/* 8 normal colors */ /* 8 normal colors */
"black", "#3b4252", /* black */
"red3", "#bf616a", /* red */
"green3", "#a3be8c", /* green */
"yellow3", "#ebcb8b", /* yellow */
"blue2", "#81a1c1", /* blue */
"magenta3", "#b48ead", /* magenta */
"cyan3", "#88c0d0", /* cyan */
"gray90", "#e5e9f0", /* white */
/* 8 bright colors */ /* 8 bright colors */
"gray50", "#4c566a", /* black */
"red", "#bf616a", /* red */
"green", "#a3be8c", /* green */
"yellow", "#ebcb8b", /* yellow */
"#5c5cff", "#81a1c1", /* blue */
"magenta", "#b48ead", /* magenta */
"cyan", "#8fbcbb", /* cyan */
"white", "#eceff4", /* white */
[255] = 0, [255] = 0,
/* more colors can be added after 255 to use with DefaultXX */ /* more colors can be added after 255 to use with DefaultXX */
"#cccccc", "#2e3440", /* background */
"#555555", "#d8dee9", /* foreground */
}; };
@ -116,10 +116,13 @@ static const char *colorname[] = {
* Default colors (colorname index) * Default colors (colorname index)
* foreground, background, cursor, reverse cursor * foreground, background, cursor, reverse cursor
*/ */
unsigned int defaultfg = 7; unsigned int defaultfg = 257;
unsigned int defaultbg = 0; unsigned int defaultbg = 256;
static unsigned int defaultcs = 256; static unsigned int defaultcs = 257;
static unsigned int defaultrcs = 257; static unsigned int defaultrcs = 257;
unsigned int selectionbg = 0;
unsigned int selectionfg = 257;
static int ignoreselfg = 1;
/* /*
* Default shape of cursor * Default shape of cursor

6
x.c
View file

@ -1336,9 +1336,9 @@ xdrawglyphfontspecs(const XftGlyphFontSpec *specs, Glyph base, int len, int x, i
} }
if (base.mode & ATTR_REVERSE) { if (base.mode & ATTR_REVERSE) {
temp = fg; bg = &dc.col[selectionbg];
fg = bg; if (!ignoreselfg)
bg = temp; fg = &dc.col[selectionfg];
} }
if (base.mode & ATTR_BLINK && win.mode & MODE_BLINK) if (base.mode & ATTR_BLINK && win.mode & MODE_BLINK)