dot

packages and services management
Log | Files | Refs | README

commit b5282cd0e6295ef87e5d70a1780ecc664156963f
parent 76bf9293168e576db865c9907df8885b3e7b6c0c
Author: Josuah Demangeon <josuah.demangeon@gandi.net>
Date:   Tue, 18 Jul 2017 22:53:44 +0200

dwm: freshen config.h

Diffstat:
Mdwm/config.h | 35+++++++++++++++++------------------
Ddwm/dwm-hide_vacant_tags-6.1.diff | 38--------------------------------------
2 files changed, 17 insertions(+), 56 deletions(-)

diff --git a/dwm/config.h b/dwm/config.h @@ -1,7 +1,7 @@ /* See LICENSE file for copyright and license details. */ /* appearance */ -static const char font[] = "monospace:pixelsize=16"; +static const char font[] = "monospace:pixelsize=13"; static const char *fonts[] = { font }; static const char normbordercolor[] = "#444444"; static const char normbgcolor[] = "#000000"; @@ -19,12 +19,11 @@ static const char *tags[] = { "1", "2", "3", - "4", - "5 irc", - "6 ssh", - "7 doc", - "8 web", - "9 media", + "4 irc", + "5 ssh", + "6 doc", + "7 web", + "8 media", }; static const Rule rules[] = { @@ -36,17 +35,17 @@ static const Rule rules[] = { { "Sam", NULL, NULL, 1 << 0, 0, -1 }, { "acme", NULL, NULL, 1 << 0, 0, -1 }, { "emacs", NULL, NULL, 1 << 0, 0, -1 }, - { "Chromium", NULL, NULL, 1 << 7, 0, -1 }, - { "Iceweasel", NULL, NULL, 1 << 7, 0, -1 }, - { "Firefox", NULL, NULL, 1 << 7, 0, -1 }, - { "Surf", NULL, NULL, 1 << 7, 0, -1 }, - { "Midori", NULL, NULL, 1 << 7, 0, -1 }, - { "Zathura", NULL, NULL, 1 << 8, 0, -1 }, - { NULL, "libreoffice", NULL, 1 << 8, 0, -1 }, - { "Gimp", NULL, NULL, 1 << 9, 0, -1 }, - { "Blender", NULL, NULL, 1 << 9, 0, -1 }, - { "ffplay", NULL, NULL, 1 << 9, 0, -1 }, - { "Pavucontrol", NULL, NULL, 1 << 9, 0, -1 }, + { "Chromium", NULL, NULL, 1 << 6, 0, -1 }, + { "Iceweasel", NULL, NULL, 1 << 6, 0, -1 }, + { "Firefox", NULL, NULL, 1 << 6, 0, -1 }, + { "Surf", NULL, NULL, 1 << 6, 0, -1 }, + { "Midori", NULL, NULL, 1 << 6, 0, -1 }, + { "Zathura", NULL, NULL, 1 << 7, 0, -1 }, + { NULL, "libreoffice", NULL, 1 << 7, 0, -1 }, + { "Gimp", NULL, NULL, 1 << 8, 0, -1 }, + { "Blender", NULL, NULL, 1 << 8, 0, -1 }, + { "ffplay", NULL, NULL, 1 << 8, 0, -1 }, + { "Pavucontrol", NULL, NULL, 1 << 8, 0, -1 }, }; /* layout(s) */ diff --git a/dwm/dwm-hide_vacant_tags-6.1.diff b/dwm/dwm-hide_vacant_tags-6.1.diff @@ -1,38 +0,0 @@ -diff --git a/dwm.c b/dwm.c -index 0362114..0da6e27 100644 ---- a/dwm.c -+++ b/dwm.c -@@ -430,9 +430,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; -@@ -717,11 +723,14 @@ 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, 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 + 1, 1, dx, dx, 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);