diff options
author | Joe <rbo@gmx.us> | 2024-12-30 10:14:49 +0100 |
---|---|---|
committer | Joe <rbo@gmx.us> | 2024-12-30 10:14:49 +0100 |
commit | 954664c867ee2c75f3217c37ac70409f1e3ef2f4 (patch) | |
tree | deec0c09377c3345eec706ede1b88f22c3d64133 | |
parent | reverted taggrid (diff) | |
download | dwm-954664c867ee2c75f3217c37ac70409f1e3ef2f4.tar.gz dwm-954664c867ee2c75f3217c37ac70409f1e3ef2f4.tar.bz2 dwm-954664c867ee2c75f3217c37ac70409f1e3ef2f4.tar.xz dwm-954664c867ee2c75f3217c37ac70409f1e3ef2f4.tar.zst dwm-954664c867ee2c75f3217c37ac70409f1e3ef2f4.zip |
applied underline tags
-rw-r--r-- | applied/dwm-underlinetags-6.2.diff | 27 | ||||
-rw-r--r-- | config.def.h | 26 | ||||
-rw-r--r-- | dwm.c | 6 |
3 files changed, 47 insertions, 12 deletions
diff --git a/applied/dwm-underlinetags-6.2.diff b/applied/dwm-underlinetags-6.2.diff new file mode 100644 index 0000000..ea3a1c9 --- /dev/null +++ b/applied/dwm-underlinetags-6.2.diff @@ -0,0 +1,27 @@ +diff -pu dwm.git/config.def.h dwm.underlinetags/config.def.h +--- dwm.git/config.def.h 2021-02-27 20:04:32.030570909 -0600 ++++ dwm.underlinetags/config.def.h 2021-03-16 16:42:26.278703624 -0500 +@@ -21,6 +21,11 @@ static const char *colors[][3] = { + /* tagging */ + static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; + ++static const unsigned int ulinepad = 5; /* horizontal padding between the underline and tag */ ++static const unsigned int ulinestroke = 2; /* thickness / height of the underline */ ++static const unsigned int ulinevoffset = 0; /* how far above the bottom of the bar the line should appear */ ++static const int ulineall = 0; /* 1 to show underline on all tags, 0 for just the active ones */ ++ + static const Rule rules[] = { + /* xprop(1): + * WM_CLASS(STRING) = instance, class +diff -pu dwm.git/dwm.c dwm.underlinetags/dwm.c +--- dwm.git/dwm.c 2021-02-27 20:04:32.030570909 -0600 ++++ dwm.underlinetags/dwm.c 2021-03-16 16:41:21.468077151 -0500 +@@ -719,6 +719,8 @@ drawbar(Monitor *m) + 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 (ulineall || m->tagset[m->seltags] & 1 << i) /* if there are conflicts, just move these lines directly underneath both 'drw_setscheme' and 'drw_text' :) */ ++ drw_rect(drw, x + ulinepad, bh - ulinestroke - ulinevoffset, w - (ulinepad * 2), ulinestroke, 1, 0); + if (occ & 1 << i) + drw_rect(drw, x + boxs, boxs, boxw, boxw, + m == selmon && selmon->sel && selmon->sel->tags & 1 << i, diff --git a/config.def.h b/config.def.h index 827e5e9..ed736ea 100644 --- a/config.def.h +++ b/config.def.h @@ -50,19 +50,25 @@ static Sp scratchpads[] = { }; /* tagging */ -static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" }; +static const char *tags[] = { " ", " ", " ", " ", " ", " ", " ", " ", " " }; + +static const unsigned int ulinepad = 6; /* horizontal padding between the underline and tag */ +static const unsigned int ulinestroke = 2; /* thickness / height of the underline */ +static const unsigned int ulinevoffset = 0; /* how far above the bottom of the bar the line should appear */ +static const int ulineall = 0; /* 1 to show underline on all tags, 0 for just the active ones */ + static const char *tagsel[][2] = { /* fg bg */ - { "#ebdbb2", "#cc241d" }, - { "#ebdbb2", "#98971a" }, - { "#ebdbb2", "#d79921" }, - { "#ebdbb2", "#458588" }, - { "#ebdbb2", "#b16286" }, - { "#ebdbb2", "#fb4934" }, - { "#ebdbb2", "#b8bb26" }, - { "#ebdbb2", "#fabd2f" }, - { "#ebdbb2", "#83a598" }, + { "#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 }; static const Rule rules[] = { @@ -1153,6 +1153,8 @@ drawbar(Monitor *m) w = TEXTW(tags[i]); drw_setscheme(drw, (m->tagset[m->seltags] & 1 << i ? tagscheme[i] : scheme[SchemeNorm])); drw_text(drw, x, 0, w, bh, lrpad / 2, tags[i], urg & 1 << i); + if (ulineall || m->tagset[m->seltags] & 1 << i) /* if there are conflicts, just move these lines directly underneath both 'drw_setscheme' and 'drw_text' :) */ + drw_rect(drw, x + ulinepad, bh - ulinestroke - ulinevoffset, w - (ulinepad * 2), ulinestroke, 1, 0); if (occ & 1 << i) drw_rect(drw, x + boxs, boxs, boxw, boxw, m == selmon && selmon->sel && selmon->sel->tags & 1 << i, @@ -1336,7 +1338,7 @@ focus(Client *c) } } // XSetWindowBorder(dpy, c->win, scheme[SchemeSel][ColBorder].pixel); - XSetWindowBorder(dpy, c->win, tagscheme[i - 1][1].pixel); + XSetWindowBorder(dpy, c->win, tagscheme[i - 1][0].pixel); setfocus(c); } else { XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); @@ -2628,7 +2630,7 @@ dmenuspawn(const Arg *arg) break; } } - cmd[i] = strdup(tagsel[j - 1][1]); + cmd[i] = strdup(tagsel[j - 1][0]); if (!cmd[i]) { for (j = 0; j < i; j++) { free(cmd[j]); |