From b0822bafaf5266db5add3f24c8776996964a516e Mon Sep 17 00:00:00 2001 From: Joe Date: Mon, 30 Dec 2024 13:37:48 +0100 Subject: up --- config.def.h | 31 ++++++++++----- dwm-tagcolorscheme-6.4.diff | 93 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 114 insertions(+), 10 deletions(-) create mode 100644 dwm-tagcolorscheme-6.4.diff diff --git a/config.def.h b/config.def.h index 0097501..37d48a9 100644 --- a/config.def.h +++ b/config.def.h @@ -58,17 +58,28 @@ static const unsigned int ulinevoffset = 0; /* how far above the bottom of the b static const int ulineall = 0; /* 1 to show underline on all tags, 0 for just the active ones */ -static const char *tagsel[][2] = { +static const char *tagsel[][3] = { /* fg bg */ - { "#cc241d", "#1d2021" }, // red - { "#98971a", "#1d2021" }, // green - { "#d79921", "#1d2021" }, // yellow - { "#458588", "#1d2021" }, // blue - { "#b16286", "#1d2021" }, // magenta - { "#8ec07c", "#1d2021" }, // cyan - { "#d65d0e", "#1d2021" }, // orange - { "#928374", "#1d2021" }, // gray - { "#ebdbb2", "#1d2021" }, // fg + // gruvbox light + // { "#9d0006", "#1d2021", "" }, // red + // { "#79740e", "#1d2021", "" }, // green + // { "#b57614", "#1d2021", "" }, // yellow + // { "#076678", "#1d2021", "" }, // blue + // { "#8f3f71", "#1d2021", "" }, // magenta + // { "#427b58", "#1d2021", "" }, // cyan + // { "#af3a03", "#1d2021", "" }, // orange + // { "#928374", "#1d2021", "" }, // gray + // { "#ebdbb2", "#1d2021", "" }, // white + // gruvbox dark + { "#cc241d", "#1d2021", "#928374" }, // red + { "#98971a", "#1d2021", "#928374" }, // green + { "#d79921", "#1d2021", "#928374" }, // yellow + { "#458588", "#1d2021", "#928374" }, // blue + { "#b16286", "#1d2021", "#928374" }, // magenta + { "#8ec07c", "#1d2021", "#928374" }, // cyan + { "#d65d0e", "#1d2021", "#928374" }, // orange + { "#928374", "#1d2021", "#928374" }, // gray + { "#ebdbb2", "#1d2021", "#928374" }, // white }; static const Rule rules[] = { diff --git a/dwm-tagcolorscheme-6.4.diff b/dwm-tagcolorscheme-6.4.diff new file mode 100644 index 0000000..1f6a7f5 --- /dev/null +++ b/dwm-tagcolorscheme-6.4.diff @@ -0,0 +1,93 @@ +diff --git a/config.def.h b/config.def.h +index 061ad66..6fd24f0 100644 +--- a/config.def.h ++++ b/config.def.h +@@ -18,6 +18,13 @@ static const char *colors[][3] = { + [SchemeSel] = { col_gray4, col_cyan, col_cyan }, + }; + ++static const char *tagsel[][2] = { ++ /* fg bg */ ++ { col_gray3, col_gray1 }, /* norm */ ++ { col_gray4, col_cyan }, /* sel */ ++ { col_cyan, col_gray1 }, /* occ but not sel */ ++ { col_cyan, col_gray3 }, /* has pinned tag */ ++}; + /* tagging */ + static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; + +diff --git a/dwm.c b/dwm.c +index e5efb6a..bc7c2a8 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -264,6 +264,7 @@ static Atom wmatom[WMLast], netatom[NetLast]; + static int running = 1; + static Cur *cursor[CurLast]; + static Clr **scheme; ++static Clr **tagscheme; + static Display *dpy; + static Drw *drw; + static Monitor *mons, *selmon; +@@ -487,9 +488,12 @@ cleanup(void) + cleanupmon(mons); + for (i = 0; i < CurLast; i++) + drw_cur_free(drw, cursor[i]); +- for (i = 0; i < LENGTH(colors); i++) +- free(scheme[i]); ++ for (i = 0; i < LENGTH(colors); i++) ++ free(scheme[i]); ++ for (i = 0; i < LENGTH(tagsel); i++) ++ free(tagscheme[i]); + free(scheme); ++ free(tagscheme); + XDestroyWindow(dpy, wmcheckwin); + drw_free(drw); + XSync(dpy, False); +@@ -721,16 +725,19 @@ drawbar(Monitor *m) + urg |= c->tags; + } + 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_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, +- m == selmon && selmon->sel && selmon->sel->tags & 1 << i, +- urg & 1 << i); +- x += w; +- } ++ for (i = 0; i < LENGTH(tags); i++) { ++ w = TEXTW(tags[i]); ++ if (m->tagset[m->seltags] & 1 << i) ++ drw_setscheme(drw, tagscheme[1]); ++ else if (m == selmon && selmon->sel && selmon->sel->tags & 1 << i) ++ drw_setscheme(drw, tagscheme[3]); ++ else if (occ & 1 << i) ++ drw_setscheme(drw, tagscheme[2]); ++ else ++ drw_setscheme(drw, tagscheme[0]); ++ drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i); ++ x += w; ++ } + w = TEXTW(m->ltsymbol); + drw_setscheme(drw, scheme[SchemeNorm]); + x = drw_text(drw, x, 0, w, bh, lrpad / 2, m->ltsymbol, 0); +@@ -1526,7 +1533,6 @@ setmfact(const Arg *arg) + selmon->mfact = f; + arrange(selmon); + } +- + void + setup(void) + { +@@ -1571,6 +1577,9 @@ setup(void) + scheme = ecalloc(LENGTH(colors), sizeof(Clr *)); + for (i = 0; i < LENGTH(colors); i++) + scheme[i] = drw_scm_create(drw, colors[i], 3); ++ tagscheme = ecalloc(LENGTH(tagsel), sizeof(Clr *)); ++ for (i = 0; i < LENGTH(tagsel); i++) ++ tagscheme[i] = drw_scm_create(drw, tagsel[i], 2); + /* init bars */ + updatebars(); + updatestatus(); -- cgit v1.2.3