sites

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit f9e0ba03e3f7b5f6eb7e7809afcb75cec3c97677
parent 6572d637d80fae3cf0931d79bc9bb1d23666059f
Author: Jerome Andrieux <jerome@gcu.info>
Date:   Fri, 18 Sep 2009 18:44:08 +0200

dwm pertag patch updated to 5.6.1
Diffstat:
Adwm.suckless.org/patches/dwm-pertag-5.6.1.diff | 184+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Ddwm.suckless.org/patches/historical/pertag.md | 27---------------------------
Adwm.suckless.org/patches/pertag.md | 30++++++++++++++++++++++++++++++
3 files changed, 214 insertions(+), 27 deletions(-)

diff --git a/dwm.suckless.org/patches/dwm-pertag-5.6.1.diff b/dwm.suckless.org/patches/dwm-pertag-5.6.1.diff @@ -0,0 +1,184 @@ +--- dwm.c 2009-09-18 18:12:50.000000000 +0200 ++++ dwm.c.working 2009-09-18 18:14:04.000000000 +0200 +@@ -131,6 +131,25 @@ + void (*arrange) (Monitor *); + } Layout; + ++struct Monitor { ++ float mfact; ++ int num; ++ int by; /* bar geometry */ ++ int mx, my, mw, mh; /* screen size */ ++ int wx, wy, ww, wh; /* window area */ ++ unsigned int seltags; ++ unsigned int sellt; ++ unsigned int tagset[2]; ++ Bool showbar; ++ Bool topbar; ++ Client *clients; ++ Client *sel; ++ Client *stack; ++ Monitor *next; ++ Window barwin; ++ const Layout *lt[2]; ++}; ++ + typedef struct { + const char *class; + const char *instance; +@@ -263,30 +282,6 @@ + /* configuration, allows nested code to access above variables */ + #include "config.h" + +-struct Monitor { +- float mfact; +- int num; +- int by; /* bar geometry */ +- int mx, my, mw, mh; /* screen size */ +- int wx, wy, ww, wh; /* window area */ +- unsigned int seltags; +- unsigned int sellt; +- unsigned int tagset[2]; +- Bool showbar; +- Bool topbar; +- Client *clients; +- Client *sel; +- Client *stack; +- Monitor *next; +- Window barwin; +- const Layout *lt[2]; +- int curtag; +- int prevtag; +- const Layout *lts[LENGTH(tags) + 1]; +- double mfacts[LENGTH(tags) + 1]; +- Bool showbars[LENGTH(tags) + 1]; +-}; +- + /* compile-time check if all tags fit into an unsigned int bit array. */ + struct NumTags { + char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; +@@ -1484,7 +1479,7 @@ + if (!arg || !arg->v || arg->v != selmon->lt[selmon->sellt]) + selmon->sellt ^= 1; + if (arg && arg->v) +- selmon->lt[selmon->sellt] = selmon->lts[selmon->curtag] = (Layout *) arg->v; ++ selmon->lt[selmon->sellt] = (Layout *) arg->v; + if (selmon->sel) + arrange(); + else +@@ -1502,7 +1497,7 @@ + f = arg->f < 1.0 ? arg->f + selmon->mfact : arg->f - 1.0; + if (f < 0.1 || f > 0.9) + return; +- selmon->mfact = selmon->mfacts[selmon->curtag] = f; ++ selmon->mfact = f; + arrange(); + } + +@@ -1512,7 +1507,6 @@ + unsigned int i; + int w; + XSetWindowAttributes wa; +- Monitor *m; + + /* clean up any zombies immediately */ + sigchld(0); +@@ -1547,31 +1541,11 @@ + XSetLineAttributes(dpy, dc.gc, 1, LineSolid, CapButt, JoinMiter); + if (!dc.font.set) + XSetFont(dpy, dc.gc, dc.font.xfont->fid); +- /* init tags */ +- for (m = mons; m; m = m->next) +- m->curtag = m->prevtag = 1; +- /* init mfacts */ +- for (m = mons; m; m = m->next) { +- for (i = 0; i < LENGTH(tags) + 1; i++) { +- m->mfacts[i] = m->mfact; +- } +- } +- /* init layouts */ +- for (m = mons; m; m = m->next) { +- for (i = 0; i < LENGTH(tags) + 1; i++) { +- m->lts[i] = &layouts[0]; +- } +- } + /* init bars */ + for (blw = i = 0; LENGTH(layouts) > 1 && i < LENGTH(layouts); i++) { + w = TEXTW(layouts[i].symbol); + blw = MAX(blw, w); + } +- for (m = mons; m; m = m->next) { +- for (i = 0; i < LENGTH(tags) + 1; i++) { +- m->showbars[i] = m->showbar; +- } +- } + updatebars(); + updatestatus(); + /* EWMH support per view */ +@@ -1689,7 +1663,7 @@ + void + togglebar(const Arg * arg) + { +- selmon->showbar = selmon->showbars[selmon->curtag] = !selmon->showbar; ++ selmon->showbar = !selmon->showbar; + updatebarpos(selmon); + XMoveResizeWindow(dpy, selmon->barwin, selmon->wx, selmon->by, selmon->ww, bh); + arrange(); +@@ -1710,27 +1684,13 @@ + void + toggletag(const Arg * arg) + { +- unsigned int i; + unsigned int newtags; + + if (!selmon->sel) + return; + newtags = selmon->sel->tags ^ (arg->ui & TAGMASK); + if (newtags) { +- if (newtags == ~0) { +- selmon->prevtag = selmon->curtag; +- selmon->curtag = 0; +- } +- if (!(newtags & 1 << (selmon->curtag - 1))) { +- selmon->prevtag = selmon->curtag; +- for (i = 0; !(newtags & 1 << i); i++); +- selmon->curtag = i + 1; +- } + selmon->sel->tags = newtags; +- selmon->lt[selmon->sellt] = selmon->lts[selmon->curtag]; +- selmon->mfact = selmon->mfacts[selmon->curtag]; +- if (selmon->showbar != selmon->showbars[selmon->curtag]) +- togglebar(NULL); + arrange(); + } + } +@@ -1993,28 +1953,11 @@ + void + view(const Arg * arg) + { +- unsigned int i; + if ((arg->ui & TAGMASK) == selmon->tagset[selmon->seltags]) + return; + selmon->seltags ^= 1; /* toggle sel tagset */ +- if (arg->ui & TAGMASK) { ++ if (arg->ui & TAGMASK) + selmon->tagset[selmon->seltags] = arg->ui & TAGMASK; +- selmon->prevtag = selmon->curtag; +- if (arg->ui == ~0) +- selmon->curtag = 0; +- else { +- for (i = 0; !(arg->ui & 1 << i); i++); +- selmon->curtag = i + 1; +- } +- } else { +- selmon->prevtag = selmon->curtag ^ selmon->prevtag; +- selmon->curtag ^= selmon->prevtag; +- selmon->prevtag = selmon->curtag ^ selmon->prevtag; +- } +- selmon->lt[selmon->sellt] = selmon->lts[selmon->curtag]; +- selmon->mfact = selmon->mfacts[selmon->curtag]; +- if (selmon->showbar != selmon->showbars[selmon->curtag]) +- togglebar(NULL); + arrange(); + } + diff --git a/dwm.suckless.org/patches/historical/pertag.md b/dwm.suckless.org/patches/historical/pertag.md @@ -1,27 +0,0 @@ -# PERTAG # - -## Description ## - -More general approach of [taglayouts patch][3]. The patch keeps layout, mwfact, barpos and nmaster (if -installed) per tag. - -## Download ## - * [dwm-5.4-pertag.diff][7] - * [dwm-5.2-pertag.diff][6] - * [dwm-5.1-pertag.diff][5] - * [dwm-5.0-pertag.diff][4] - * [dwm-4.6-pertag.diff][1] - * [dwm-4.6-pertag_nmaster.diff][2] - -## Author ## - - * Jan Christoph Ebersbach - <jceb@e-jc.de> - * Updated by V4hn - v4hn.de - -[1]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-pertag.diff -[2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-pertag_nmaster.diff -[3]: /dwm/patches/taglayouts.html -[4]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-pertag.diff -[5]: http://v4hn.de/patches/dwm-5.1-pertag.diff -[6]: http://dwm.suckless.org/patches/dwm-5.2-pertag.diff -[7]: http://dwm.suckless.org/patches/dwm-5.4-pertag.diff diff --git a/dwm.suckless.org/patches/pertag.md b/dwm.suckless.org/patches/pertag.md @@ -0,0 +1,30 @@ +# PERTAG # + +## Description ## + +More general approach of [taglayouts patch][3]. The patch keeps layout, mwfact, barpos and nmaster (if +installed) per tag. + +## Download ## + * [dwm-pertag-5.6.1.diff][8] + * [dwm-5.4-pertag.diff][7] + * [dwm-5.2-pertag.diff][6] + * [dwm-5.1-pertag.diff][5] + * [dwm-5.0-pertag.diff][4] + * [dwm-4.6-pertag.diff][1] + * [dwm-4.6-pertag_nmaster.diff][2] + +## Author ## + + * Jan Christoph Ebersbach - <jceb@e-jc.de> + * Updated by V4hn - v4hn.de + * Updated by Jerome Andrieux - <jerome@gcu.info> + +[1]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-pertag.diff +[2]: http://www.e-jc.de/dwm/4.6/current/dwm-4.6-pertag_nmaster.diff +[3]: /dwm/patches/taglayouts.html +[4]: http://www.e-jc.de/dwm/5.0/current/dwm-5.0-pertag.diff +[5]: http://v4hn.de/patches/dwm-5.1-pertag.diff +[6]: http://dwm.suckless.org/patches/historical/dwm-5.2-pertag.diff +[7]: http://dwm.suckless.org/patches/historical/dwm-5.4-pertag.diff +[8]: http://dwm.suckless.org/patches/historical/dwm-pertag-5.6.1.diff