[wiki] [sites] [dwm][patch] underlinetags patch for underlining the selected tags || Timmy Keller

From: <git_AT_suckless.org>
Date: Tue, 16 Mar 2021 23:08:07 +0100

commit 5514fd2207ce2f07853f30c4ddd6c4d41b4a6d9d
Author: Timmy Keller <applesrcol8796_AT_gmail.com>
Date: Tue Mar 16 17:07:14 2021 -0500

    [dwm][patch] underlinetags patch for underlining the selected tags

diff --git a/dwm.suckless.org/patches/underlinetags/dwm-underlinetags-6.2.diff b/dwm.suckless.org/patches/underlinetags/dwm-underlinetags-6.2.diff
new file mode 100644
index 00000000..ea3a1c99
--- /dev/null
+++ b/dwm.suckless.org/patches/underlinetags/dwm-underlinetags-6.2.diff
_AT_@ -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
+_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 -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
+_AT_@ -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/dwm.suckless.org/patches/underlinetags/index.md b/dwm.suckless.org/patches/underlinetags/index.md
new file mode 100644
index 00000000..6a892968
--- /dev/null
+++ b/dwm.suckless.org/patches/underlinetags/index.md
_AT_@ -0,0 +1,20 @@
+underlinetags
+=============
+
+Description
+-----------
+Underlines selected tags. This looks good for certain color schemes.
+
+![screenshot proving its usefulness for my laptops rice](underlinetagss.jpg)
+
+This screenshot also uses my [taglabels](../taglabels) patch, as well as [hide\_vacant\_tags](../hide_vacant_tags).
+
+Config variables are avaliable to edit the size and position of the underline, as well as an option to underline all tags instead of just the active ones.
+
+Download
+--------
+* [dwm-underlinetags-6.2.diff](dwm-underlinetags-6.2.diff)
+
+Author
+------
+* Timmy Keller <applesrcol8796_AT_gmail.com>
diff --git a/dwm.suckless.org/patches/underlinetags/underlinetagss.jpg b/dwm.suckless.org/patches/underlinetags/underlinetagss.jpg
new file mode 100644
index 00000000..470b1508
Binary files /dev/null and b/dwm.suckless.org/patches/underlinetags/underlinetagss.jpg differ
Received on Tue Mar 16 2021 - 23:08:07 CET

This archive was generated by hypermail 2.3.0 : Tue Mar 16 2021 - 23:12:46 CET