[wiki] [sites] [dwm][patch][hide_vacant_tags] Update to 6.3 || Adrian Amaglio
commit bcb9559f843407c59de869c800811969dc640635
Author: Adrian Amaglio <adrian_AT_amaglio.fr>
Date: Wed Feb 9 12:04:28 2022 +0100
[dwm][patch][hide_vacant_tags] Update to 6.3
diff --git a/dwm.suckless.org/patches/hide_vacant_tags/dwm-hide_vacant_tags-6.3.diff b/dwm.suckless.org/patches/hide_vacant_tags/dwm-hide_vacant_tags-6.3.diff
new file mode 100644
index 00000000..0ccc7fce
--- /dev/null
+++ b/dwm.suckless.org/patches/hide_vacant_tags/dwm-hide_vacant_tags-6.3.diff
_AT_@ -0,0 +1,39 @@
+diff --git a/dwm.c b/dwm.c
+index a96f33c..f2da729 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -432,9 +432,15 @@ buttonpress(XEvent *e)
+ }
+ if (ev->window == selmon->barwin) {
+ i = x = 0;
+- do
++ unsigned int occ = 0;
++ for(c = m->clients; c; c=c->next)
++ occ |= c->tags;
++ do {
++ /* Do not reserve space for vacant tags */
++ if (!(occ & 1 << i || m->tagset[m->seltags] & 1 << i))
++ continue;
+ x += TEXTW(tags[i]);
+- while (ev->x >= x && ++i < LENGTH(tags));
++ } while (ev->x >= x && ++i < LENGTH(tags));
+ if (i < LENGTH(tags)) {
+ click = ClkTagBar;
+ arg.ui = 1 << i;
+_AT_@ -719,13 +725,12 @@ drawbar(Monitor *m)
+ }
+ x = 0;
+ for (i = 0; i < LENGTH(tags); i++) {
++ /* Do not draw vacant tags */
++ if(!(occ & 1 << i || m->tagset[m->seltags] & 1 << i))
++ continue;
+ 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;
+ }
+ w = blw = TEXTW(m->ltsymbol);
diff --git a/dwm.suckless.org/patches/hide_vacant_tags/index.md b/dwm.suckless.org/patches/hide_vacant_tags/index.md
index 5cd02ffb..0cdf821f 100644
--- a/dwm.suckless.org/patches/hide_vacant_tags/index.md
+++ b/dwm.suckless.org/patches/hide_vacant_tags/index.md
_AT_@ -15,12 +15,14 @@ contrast than if there were filled/empty rectangles.
Download
--------
+* [dwm-hide\_vacant\_tags-6.3.diff](dwm-hide_vacant_tags-6.3.diff) - 2022-02-09
* [dwm-hide\_vacant\_tags-6.1.diff](dwm-hide_vacant_tags-6.1.diff) - 2016-01-22
* [dwm-hide\_vacant\_tags-git-20160626-7af4d43.diff](dwm-hide_vacant_tags-git-20160626-7af4d43.diff)
* [dwm-hide\_vacant\_tags-6.2.diff](dwm-hide_vacant_tags-6.2.diff)
Author
------
+* Adrian Amaglio (Update to dwm 6.3)
* [Ondřej Grover](mailto:ondrej.grover_AT_gmail.com)
* Matthew Boswell - mordervomubel+suckless at lockmail dot us (mechanical update for dwm 6.1 release)
* [Jochen Sprickerhof](mailto:project_AT_firstname.lastname.de) (hide 0 tagged clients)
Received on Wed Feb 09 2022 - 12:07:32 CET
This archive was generated by hypermail 2.3.0
: Wed Feb 09 2022 - 12:12:51 CET