commit ef6c7852a2625194d54787c16548997cef07e63e
parent 34f5d916689df3c362b868881c945cbcfe39693b
Author: hhvn <hayden@haydenvh.com>
Date: Thu, 26 Nov 2020 16:55:15 +0000
dwm.c config.h: add SchemeUrgent instead of simply reversing colours on urgent tags
Diffstat:
2 files changed, 12 insertions(+), 8 deletions(-)
diff --git a/config.h b/config.h
@@ -8,18 +8,19 @@ static const int showbar = 1; /* 0 means no bar */
static const int topbar = 1; /* 0 means bottom bar */
static const char *fonts[] = { "monospace:size=8" };
static const char col_gray1[] = "#0a0a10";
-static const char col_gray2[] = "#24283c";
+static const char col_purple[] = "#24283c";
static const char col_gray3[] = "#bbbbbb";
static const char col_gray4[] = "#eeeeee";
static const char col_cyan[] = "#30404e";
static const char col_stat[] = "#0a2126";
static const char col_red[] = "#892b2b";
static const char *colors[][3] = {
- /* fg bg border */
- [SchemeNorm] = { col_gray3, col_gray1, col_gray1 },
- [SchemeSel] = { col_gray4, col_cyan, col_red },
- [SchemeStat] = { col_gray4, col_stat, col_stat },
- [SchemeNormWin] = { col_gray3, col_gray2, col_gray1 },
+ /* fg bg border */
+ [SchemeNorm] = { col_gray3, col_gray1, col_gray1 },
+ [SchemeSel] = { col_gray4, col_cyan, col_red },
+ [SchemeStat] = { col_gray4, col_stat, col_stat },
+ [SchemeNormWin] = { col_gray3, col_purple, col_gray1 },
+ [SchemeUrgent] = { col_red, col_gray1, col_gray1 },
};
/* tagging */
diff --git a/dwm.c b/dwm.c
@@ -68,7 +68,7 @@
/* enums */
enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */
-enum { SchemeNorm, SchemeSel, SchemeStat, SchemeNormWin }; /* color schemes */
+enum { SchemeNorm, SchemeSel, SchemeStat, SchemeNormWin, SchemeUrgent }; /* color schemes */
enum { NetSupported, NetWMName, NetWMState, NetWMCheck,
NetWMFullscreen, NetActiveWindow, NetWMWindowType,
NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */
@@ -808,7 +808,10 @@ drawbar(Monitor *m)
x = 0;
for (i = 0; i < LENGTH(tags); i++) {
w = TEXTW(tags[i]);
- drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
+ if (urg & 1 << i)
+ drw_setscheme(drw, scheme[SchemeUrgent]);
+ else
+ drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeSel : SchemeNorm]);
drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i);
if (occ & 1 << i)
drw_rect(drw, x + 2*boxs, 9*boxs, boxw, boxw,