mirror of
https://github.com/zoriya/dwm.git
synced 2026-05-27 08:13:55 +00:00
Add accent colors to the statusbar
This commit is contained in:
@@ -65,6 +65,10 @@ static char *termcolor[] = {
|
||||
termcol13,
|
||||
termcol14,
|
||||
termcol15,
|
||||
accent,
|
||||
secondary,
|
||||
background,
|
||||
foreground,
|
||||
};
|
||||
static char *colors[][3] = {
|
||||
/* fg bg border */
|
||||
|
||||
@@ -80,10 +80,12 @@ drawstatusbar(int x, char* stext)
|
||||
i += 7;
|
||||
} else if (text[i] == 'C') {
|
||||
int c = atoi(text + ++i);
|
||||
drw_clr_create(drw, &drw->scheme[ColFg], termcolor[c]);
|
||||
if (c < sizeof(termcolor) / sizeof(*termcolor))
|
||||
drw_clr_create(drw, &drw->scheme[ColFg], termcolor[c]);
|
||||
} else if (text[i] == 'B') {
|
||||
int c = atoi(text + ++i);
|
||||
drw_clr_create(drw, &drw->scheme[ColBg], termcolor[c]);
|
||||
if (c < sizeof(termcolor) / sizeof(*termcolor))
|
||||
drw_clr_create(drw, &drw->scheme[ColBg], termcolor[c]);
|
||||
} else if (text[i] == 'd') {
|
||||
drw->scheme[ColFg] = scheme[SchemeNorm][ColFg];
|
||||
drw->scheme[ColBg] = scheme[SchemeNorm][ColBg];
|
||||
|
||||
Reference in New Issue
Block a user