From 93e85ba76a6eae51d5e22638d1c43f497c66f488 Mon Sep 17 00:00:00 2001 From: Naz Date: Mon, 12 Jan 2026 11:33:02 +0100 Subject: feat: apply dwm-colorbar-6.3 patch --- config.def.h | 6 +++++- dwm.c | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/config.def.h b/config.def.h index 9fc3252..dbad9c8 100644 --- a/config.def.h +++ b/config.def.h @@ -30,6 +30,11 @@ static const char *colors[][3] = { /* fg bg border */ [SchemeNorm] = { col_gray3, col_gray1, col_gray2 }, [SchemeSel] = { col_gray4, col_cyan, col_cyan }, + [SchemeStatus] = { col_gray3, col_gray1, "#000000" }, // Statusbar right {text,background,not used but cannot be empty} + [SchemeTagsSel] = { col_gray4, col_cyan, "#000000" }, // Tagbar left selected {text,background,not used but cannot be empty} + [SchemeTagsNorm] = { col_gray3, col_gray1, "#000000" }, // Tagbar left unselected {text,background,not used but cannot be empty} + [SchemeInfoSel] = { col_gray4, col_cyan, "#000000" }, // infobar middle selected {text,background,not used but cannot be empty} + [SchemeInfoNorm] = { col_gray3, col_gray1, "#000000" }, // infobar middle unselected {text,background,not used but cannot be empty} }; typedef struct { @@ -169,4 +174,3 @@ static const Button buttons[] = { { ClkTagBar, MODKEY, Button3, toggletag, {0} }, { ClkTabBar, 0, Button1, focuswin, {0} }, }; - diff --git a/dwm.c b/dwm.c index feb0e0f..ea6f54b 100644 --- a/dwm.c +++ b/dwm.c @@ -68,7 +68,7 @@ /* enums */ enum { CurNormal, CurResize, CurMove, CurLast }; /* cursor */ -enum { SchemeNorm, SchemeSel }; /* color schemes */ +enum { SchemeNorm, SchemeSel, SchemeStatus, SchemeTagsSel, SchemeTagsNorm, SchemeInfoSel, SchemeInfoNorm }; /* color schemes */ enum { NetSupported, NetWMName, NetWMState, NetWMCheck, NetWMFullscreen, NetActiveWindow, NetWMWindowType, NetWMWindowTypeDialog, NetClientList, NetLast }; /* EWMH atoms */ @@ -898,7 +898,7 @@ 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]); + drw_setscheme(drw, scheme[m->tagset[m->seltags] & 1 << i ? SchemeTagsSel : SchemeTagsNorm]); drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i); if (occ & 1 << i) drw_rect(drw, x + boxs, boxs, boxw, boxw, @@ -907,10 +907,10 @@ drawbar(Monitor *m) x += w; } w = TEXTW(m->ltsymbol); - drw_setscheme(drw, scheme[SchemeNorm]); + drw_setscheme(drw, scheme[SchemeTagsNorm]); x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0); - drw_setscheme(drw, scheme[SchemeNorm]); + drw_setscheme(drw, scheme[SchemeInfoNorm]); drw_rect(drw, x, 0, m->ww - x, bh, 1, 1); if (m == selmon) { /* status is only drawn on selected monitor */ @@ -920,6 +920,7 @@ drawbar(Monitor *m) msx = (m->ww - TEXTW(mstext) + lrpad) / 2; /* x position of middle status text */ drw_text(drw, msx, 0, TEXTW(mstext) - lrpad, bh, 0, mstext, 0); } + drw_setscheme(drw, scheme[SchemeStatus]); tw = TEXTW(rstext) - lrpad + 2; /* 2px right padding */ drw_text(drw, m->ww - tw, 0, tw, bh, 0, rstext, 0); } -- cgit v1.2.3