[wiki] [sites] hide vacant tags: do not draw empty rectangles on bar || Ondrej Grover

From: <git_AT_suckless.org>
Date: Sat, 07 Jun 2014 23:06:06 +0200

commit c756cfbac3df258d32b739286f9ca396ac0e6418
Author: Ondrej Grover <ondrej.grover_AT_gmail.com>
Date: Sat Jun 7 22:52:10 2014 +0200

    hide vacant tags: do not draw empty rectangles on bar
    
    also fix my email address

diff --git a/dwm.suckless.org/patches/dwm-6.1-hide_vacant_tags.diff b/dwm.suckless.org/patches/dwm-6.1-hide_vacant_tags.diff
index 952db9c..7f5fb3d 100644
--- a/dwm.suckless.org/patches/dwm-6.1-hide_vacant_tags.diff
+++ b/dwm.suckless.org/patches/dwm-6.1-hide_vacant_tags.diff
_AT_@ -1,5 +1,5 @@
 diff --git a/dwm.c b/dwm.c
-index ffc8864..161ec27 100644
+index ffc8864..0e5d3f1 100644
 --- a/dwm.c
 +++ b/dwm.c
 _AT_@ -423,9 +423,15 @@ buttonpress(XEvent *e) {
_AT_@ -20,7 +20,7 @@ index ffc8864..161ec27 100644
                  if(i < LENGTH(tags)) {
                          click = ClkTagBar;
                          arg.ui = 1 << i;
-_AT_@ -703,6 +709,9 @@ drawbar(Monitor *m) {
+_AT_@ -703,11 +709,14 @@ drawbar(Monitor *m) {
          }
          x = 0;
          for(i = 0; i < LENGTH(tags); i++) {
_AT_@ -30,3 +30,9 @@ index ffc8864..161ec27 100644
                  w = TEXTW(tags[i]);
                  drw_setscheme(drw, m->tagset[m->seltags] & 1 << i ? &scheme[SchemeSel] : &scheme[SchemeNorm]);
                  drw_text(drw, x, 0, w, bh, tags[i], urg & 1 << i);
+ drw_rect(drw, x, 0, w, bh, m == selmon && selmon->sel && selmon->sel->tags & 1 << i,
+- occ & 1 << i, urg & 1 << i);
++ 0, urg & 1 << i);
+ x += w;
+ }
+ w = blw = TEXTW(m->ltsymbol);
diff --git a/dwm.suckless.org/patches/hide_vacant_tags.md b/dwm.suckless.org/patches/hide_vacant_tags.md
index 9170019..4642abe 100644
--- a/dwm.suckless.org/patches/hide_vacant_tags.md
+++ b/dwm.suckless.org/patches/hide_vacant_tags.md
_AT_@ -5,16 +5,22 @@ Description
 -----------
 
 This patch prevents dwm from drawing tags with no clients
-(i.e. vacant) on the bar. It also makes sure that pressing a tag on
-the bar behaves accordingly by not reserving reactive regions on the
-bar for vacant tags.
+(i.e. vacant) on the bar.
+
+It also makes sure that pressing a tag on the bar behaves accordingly
+by not reserving reactive regions on the bar for vacant tags.
+
+It also stops drawing empty rectangles on the bar for non-vacant
+tags as there is no need anymore to distinguish vacant
+tags and it offers a more visible contrast than if there were
+filled/empty rectangles.
 
 Download
 --------
 
-* [dwm-6.1-hide_vacant_tags.diff](dwm-6.1-hide_vacant_tags.diff) (957b) (20140607)
+* [dwm-6.1-hide_vacant_tags.diff](dwm-6.1-hide_vacant_tags.diff) (1169b) (20140607)
 
 Author
 ------
 
-Ondřej Grover - <ondrej dot grover at gmail dot com>
+* [Ondřej Grover](mailto:ondrej.grover_AT_gmail.com)
diff --git a/dwm.suckless.org/patches/nametag.md b/dwm.suckless.org/patches/nametag.md
index 060927c..b51ccf4 100644
--- a/dwm.suckless.org/patches/nametag.md
+++ b/dwm.suckless.org/patches/nametag.md
_AT_@ -19,4 +19,4 @@ Author
 ------
 
 * Evan Gates (emg) <[evan.gates_AT_gmail.com](mailto:evan.gates_AT_gmail.com)>
-* prepend version by Ondřej Grover <ondrej dot grover at gmail dot com>
+* prepend version by [Ondřej Grover](mailto:ondrej.grover_AT_gmail.com)
Received on Sat Jun 07 2014 - 23:06:06 CEST

This archive was generated by hypermail 2.3.0 : Thu Jun 18 2015 - 17:38:58 CEST