[wiki] [sites] [dwm][patches][underlinetags] Updated 6.6 patch with underflow bugfix. || jeffofbread

From: <git_AT_suckless.org>
Date: Sat, 10 Jan 2026 23:42:22 +0100

commit c368e92da736b618e8c1d57be4e703e76fc79f33
Author: jeffofbread <jeffofbreadcoding_AT_gmail.com>
Date: Sat Jan 10 17:42:18 2026 -0500

    [dwm][patches][underlinetags] Updated 6.6 patch with underflow bugfix.

diff --git a/dwm.suckless.org/patches/underlinetags/dwm-underlinetags-6.6.diff b/dwm.suckless.org/patches/underlinetags/dwm-underlinetags-6.6.diff
new file mode 100644
index 00000000..7476308a
--- /dev/null
+++ b/dwm.suckless.org/patches/underlinetags/dwm-underlinetags-6.6.diff
_AT_@ -0,0 +1,35 @@
+commit 50a6c42f8b206943cfe44c3077ed4b6c9d389e57
+Author: jeffofbread <jeffofbreadcoding_AT_gmail.com>
+Date: Sat Nov 1 22:26:00 2025 -0400
+
+ Fix integer underflow.
+
+diff --git a/config.def.h b/config.def.h
+index 81c3fc0..c2bd4c6 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -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 --git a/dwm.c b/dwm.c
+index 4cf07eb..7b9df9b 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -723,6 +723,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, (ulinepad * 2) > w ? 0 : 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/dwm.suckless.org/patches/underlinetags/index.md b/dwm.suckless.org/patches/underlinetags/index.md
index 5a912a8a..22c0c2ad 100644
--- a/dwm.suckless.org/patches/underlinetags/index.md
+++ b/dwm.suckless.org/patches/underlinetags/index.md
_AT_@ -14,7 +14,9 @@ Config variables are avaliable to edit the size and position of the underline, a
 Download
 --------
 * [dwm-underlinetags-6.2.diff](dwm-underlinetags-6.2.diff)
+* [dwm-underlinetags-6.6.diff](dwm-underlinetags-6.6.diff)
 
 Author
 ------
 * Tim Keller <tjk_AT_tjkeller.xyz>
+* JeffOfBread <jeffofbreadcoding_AT_gmail.com> (bugfix)
Received on Sat Jan 10 2026 - 23:42:22 CET

This archive was generated by hypermail 2.3.0 : Sat Jan 10 2026 - 23:48:42 CET