[wiki] [sites] dwm bottom_stack/bstack/... patches: move to bottomstack || FRIGN

From: <git_AT_suckless.org>
Date: Tue, 19 Jul 2016 10:08:27 +0200

commit 50c04a043b48208c58fd7317793f02a05a30b2cc
Author: FRIGN <dev_AT_frign.de>
Date: Tue Jul 19 10:07:45 2016 +0200

    dwm bottom_stack/bstack/... patches: move to bottomstack
    
    and make them actually maintainable!

diff --git a/dwm.suckless.org/patches/bottom_stack.md b/dwm.suckless.org/patches/bottom_stack.md
deleted file mode 100644
index 9ca05b3..0000000
--- a/dwm.suckless.org/patches/bottom_stack.md
+++ /dev/null
_AT_@ -1,49 +0,0 @@
-bottom stack
-============
-
-Description
------------
-`bstack` and `bstackhoriz` are two bottom stack layouts for dwm.
-
-Bottom Stack Tiling
--------------------
-
- bstack (TTT)
- +-----------------+
- | |
- | |
- | |
- +-----+-----+-----+
- | | | |
- | | | |
- +-----+-----+-----+
-
- bstackhoriz (===)
- +-----------------+
- | |
- | |
- | |
- +-----------------+
- +-----------------+
- +-----------------+
- +-----------------+
-
-Download
---------
-
-### 6.1
-
-* `tile`-like `htile` implementation, similar to `bstack` [dwm-6.1-htile.diff](dwm-6.1-htile.diff)
-
-### 6.0
-* Not for use with pertag patch: [dwm-6.0-bstack.diff](dwm-6.0-bstack.diff)
-
-### 5.9
-* Not for use with pertag patch: [dwm-5.9-bstack.diff](historical/dwm-5.9-bstack.diff)
-* For use with pertag patch: [dwm-5.9-bstack-alt.diff](historical/dwm-5.9-bstack-alt.diff)
-
-### 5.8
-* Not for use with pertag patch: [dwm-5.8.2-bstack.diff](historical/dwm-5.8.2-bstack.diff)
-* For use with pertag patch: [dwm-5.8.2-bstack-alt.diff](historical/dwm-5.8.2-bstack-alt.diff)
-* see older versions in [historical patches](historical)
-
diff --git a/dwm.suckless.org/patches/bottomstack.md b/dwm.suckless.org/patches/bottomstack.md
new file mode 100644
index 0000000..ca79223
--- /dev/null
+++ b/dwm.suckless.org/patches/bottomstack.md
_AT_@ -0,0 +1,30 @@
+bottomstack
+===========
+
+Description
+-----------
+
+`bstack` and `bstackhoriz` are two stack layouts for dwm.
+
+ bstack (TTT) bstackhoriz (===)
+ +-----------------+ +-----------------+
+ | | | |
+ | | | |
+ | | | |
+ +-----+-----+-----+ +-----------------+
+ | | | | +-----------------+
+ | | | | +-----------------+
+ +-----+-----+-----+ +-----------------+
+
+Download
+--------
+
+ * [dwm-bottomstack-6.0.diff](dwm-bottomstack-6.0.diff)
+ * [dwm-bottomstack-6.1.diff](dwm-bottomstack-6.1.diff)
+ * [dwm-bottomstack-20160719-56a31dc.diff](dwm-bottomstack-20160719-56a31dc.diff)
+
+Authors
+-------
+
+ * Anselm R Garbe - <anselm_AT_garbe.us>
+ * Laslo Hunhold - <dev_AT_frign.de> (6.0, 6.1, git ports)
diff --git a/dwm.suckless.org/patches/dwm-6.0-bstack.diff b/dwm.suckless.org/patches/dwm-6.0-bstack.diff
deleted file mode 100644
index 4a274e6..0000000
--- a/dwm.suckless.org/patches/dwm-6.0-bstack.diff
+++ /dev/null
_AT_@ -1,91 +0,0 @@
-diff -r ec4baab78314 bstack.c
---- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/bstack.c Tue Feb 28 11:28:54 2012 -0500
-_AT_@ -0,0 +1,33 @@
-+static void
-+bstack(Monitor *m) {
-+ int w, h, mh, mx, tx, ty, tw;
-+ unsigned int i, n;
-+ Client *c;
-+
-+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ if(n == 0)
-+ return;
-+ if(n > m->nmaster) {
-+ mh = m->nmaster ? m->mfact * m->wh : 0;
-+ tw = m->ww / (n - m->nmaster);
-+ ty = m->wy + mh;
-+ }
-+ else {
-+ mh = m->wh;
-+ tw = m->ww;
-+ ty = m->wy;
-+ }
-+ for(i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
-+ if(i < m->nmaster) {
-+ w = (m->ww - mx) / (MIN(n, m->nmaster) - i);
-+ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), False);
-+ mx += WIDTH(c);
-+ }
-+ else {
-+ h = m->wh - mh;
-+ resize(c, tx, ty, tw - (2 * c->bw), h - (2 * c->bw), False);
-+ if(tw != m->ww)
-+ tx += WIDTH(c);
-+ }
-+ }
-+}
-diff -r ec4baab78314 bstackhoriz.c
---- /dev/null Thu Jan 01 00:00:00 1970 +0000
-+++ b/bstackhoriz.c Tue Feb 28 11:28:54 2012 -0500
-_AT_@ -0,0 +1,31 @@
-+static void
-+bstackhoriz(Monitor *m) {
-+ int w, mh, mx, tx, ty, th;
-+ unsigned int i, n;
-+ Client *c;
-+
-+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ if(n == 0)
-+ return;
-+ if(n > m->nmaster) {
-+ mh = m->nmaster ? m->mfact * m->wh : 0;
-+ th = (m->wh - mh) / (n - m->nmaster);
-+ ty = m->wy + mh;
-+ }
-+ else {
-+ th = mh = m->wh;
-+ ty = m->wy;
-+ }
-+ for(i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
-+ if(i < m->nmaster) {
-+ w = (m->ww - mx) / (MIN(n, m->nmaster) - i);
-+ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), False);
-+ mx += WIDTH(c);
-+ }
-+ else {
-+ resize(c, tx, ty, m->ww - (2 * c->bw), th - (2 * c->bw), False);
-+ if(th != m->wh)
-+ ty += HEIGHT(c);
-+ }
-+ }
-+}
-diff -r ec4baab78314 config.def.h
---- a/config.def.h Mon Dec 19 15:38:30 2011 +0100
-+++ b/config.def.h Tue Feb 28 11:28:54 2012 -0500
-_AT_@ -27,11 +27,15 @@ static const float mfact = 0.55; /*
- static const int nmaster = 1; /* number of clients in master area */
- static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
-
-+#include "bstack.c"
-+#include "bstackhoriz.c"
- static const Layout layouts[] = {
- /* symbol arrange function */
- { "[]=", tile }, /* first entry is default */
- { "><>", NULL }, /* no layout function means floating behavior */
- { "[M]", monocle },
-+ { "TTT", bstack },
-+ { "===", bstackhoriz },
- };
-
- /* key definitions */
diff --git a/dwm.suckless.org/patches/dwm-6.1-htile.diff b/dwm.suckless.org/patches/dwm-6.1-htile.diff
deleted file mode 100644
index 4a22cbc..0000000
--- a/dwm.suckless.org/patches/dwm-6.1-htile.diff
+++ /dev/null
_AT_@ -1,46 +0,0 @@
-
-diff --git a/dwm.c b/dwm.c
-index c9fdd49..783fcdb 100644
---- a/dwm.c
-+++ b/dwm.c
-_AT_@ -214,6 +214,7 @@ static void spawn(const Arg *arg);
- static void tag(const Arg *arg);
- static void tagmon(const Arg *arg);
- static void tile(Monitor *);
-+static void htile(Monitor *);
- static void togglebar(const Arg *arg);
- static void togglefloating(const Arg *arg);
- static void toggletag(const Arg *arg);
-_AT_@ -1699,6 +1722,32 @@ tile(Monitor *m) {
- }
-
- void
-+htile(Monitor *m) {
-+ unsigned int i, n, w, mh, mx, tx;
-+ Client *c;
-+
-+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ if(n == 0)
-+ return;
-+
-+ if(n > m->nmaster)
-+ mh = m->nmaster ? m->wh * m->mfact : 0;
-+ else
-+ mh = m->wh;
-+ for(i = mx = tx = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
-+ if(i < m->nmaster) {
-+ w = (m->ww - mx) / (MIN(n, m->nmaster) - i);
-+ resize(c, m->wx + mx, m->wy, w - (2*c->bw), mh - (2*c->bw), False);
-+ mx += WIDTH(c);
-+ }
-+ else {
-+ w = (m->ww - tx) / (n - i);
-+ resize(c, m->wx + tx, m->wy + mh, w - (2*c->bw), m->wh - mh - (2*c->bw), False);
-+ tx += WIDTH(c);
-+ }
-+}
-+
-+void
- togglebar(const Arg *arg) {
- selmon->showbar = selmon->pertag->showbars[selmon->pertag->curtag] = !selmon->showbar;
- updatebarpos(selmon);
diff --git a/dwm.suckless.org/patches/dwm-bottomstack-20160719-56a31dc.diff b/dwm.suckless.org/patches/dwm-bottomstack-20160719-56a31dc.diff
new file mode 100644
index 0000000..d63c2c2
--- /dev/null
+++ b/dwm.suckless.org/patches/dwm-bottomstack-20160719-56a31dc.diff
_AT_@ -0,0 +1,92 @@
+diff --git a/config.def.h b/config.def.h
+index fd77a07..064179e 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -41,6 +41,8 @@ static const Layout layouts[] = {
+ { "[]=", tile }, /* first entry is default */
+ { "><>", NULL }, /* no layout function means floating behavior */
+ { "[M]", monocle },
++ { "TTT", bstack },
++ { "===", bstackhoriz },
+ };
+
+ /* key definitions */
+diff --git a/dwm.c b/dwm.c
+index b2bc9bd..8b74165 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -234,6 +234,8 @@ static int xerror(Display *dpy, XErrorEvent *ee);
+ static int xerrordummy(Display *dpy, XErrorEvent *ee);
+ static int xerrorstart(Display *dpy, XErrorEvent *ee);
+ static void zoom(const Arg *arg);
++static void bstack(Monitor *m);
++static void bstackhoriz(Monitor *m);
+
+ /* variables */
+ static const char broken[] = "broken";
+_AT_@ -2138,3 +2140,65 @@ main(int argc, char *argv[])
+ XCloseDisplay(dpy);
+ return EXIT_SUCCESS;
+ }
++
++static void
++bstack(Monitor *m) {
++ int w, h, mh, mx, tx, ty, tw;
++ unsigned int i, n;
++ Client *c;
++
++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
++ if (n == 0)
++ return;
++ if (n > m->nmaster) {
++ mh = m->nmaster ? m->mfact * m->wh : 0;
++ tw = m->ww / (n - m->nmaster);
++ ty = m->wy + mh;
++ } else {
++ mh = m->wh;
++ tw = m->ww;
++ ty = m->wy;
++ }
++ for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
++ if (i < m->nmaster) {
++ w = (m->ww - mx) / (MIN(n, m->nmaster) - i);
++ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0);
++ mx += WIDTH(c);
++ } else {
++ h = m->wh - mh;
++ resize(c, tx, ty, tw - (2 * c->bw), h - (2 * c->bw), 0);
++ if (tw != m->ww)
++ tx += WIDTH(c);
++ }
++ }
++}
++
++static void
++bstackhoriz(Monitor *m) {
++ int w, mh, mx, tx, ty, th;
++ unsigned int i, n;
++ Client *c;
++
++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
++ if (n == 0)
++ return;
++ if (n > m->nmaster) {
++ mh = m->nmaster ? m->mfact * m->wh : 0;
++ th = (m->wh - mh) / (n - m->nmaster);
++ ty = m->wy + mh;
++ } else {
++ th = mh = m->wh;
++ ty = m->wy;
++ }
++ for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
++ if (i < m->nmaster) {
++ w = (m->ww - mx) / (MIN(n, m->nmaster) - i);
++ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0);
++ mx += WIDTH(c);
++ } else {
++ resize(c, tx, ty, m->ww - (2 * c->bw), th - (2 * c->bw), 0);
++ if (th != m->wh)
++ ty += HEIGHT(c);
++ }
++ }
++}
diff --git a/dwm.suckless.org/patches/dwm-bottomstack-6.0.diff b/dwm.suckless.org/patches/dwm-bottomstack-6.0.diff
new file mode 100644
index 0000000..6915c04
--- /dev/null
+++ b/dwm.suckless.org/patches/dwm-bottomstack-6.0.diff
_AT_@ -0,0 +1,92 @@
+diff --git a/config.def.h b/config.def.h
+index 77ff358..e8ccff6 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -32,6 +32,8 @@ static const Layout layouts[] = {
+ { "[]=", tile }, /* first entry is default */
+ { "><>", NULL }, /* no layout function means floating behavior */
+ { "[M]", monocle },
++ { "TTT", bstack },
++ { "===", bstackhoriz },
+ };
+
+ /* key definitions */
+diff --git a/dwm.c b/dwm.c
+index 1d78655..49d7fe8 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -251,6 +251,8 @@ static int xerror(Display *dpy, XErrorEvent *ee);
+ static int xerrordummy(Display *dpy, XErrorEvent *ee);
+ static int xerrorstart(Display *dpy, XErrorEvent *ee);
+ static void zoom(const Arg *arg);
++static void bstack(Monitor *m);
++static void bstackhoriz(Monitor *m);
+
+ /* variables */
+ static const char broken[] = "broken";
+_AT_@ -2144,3 +2146,65 @@ main(int argc, char *argv[]) {
+ XCloseDisplay(dpy);
+ return EXIT_SUCCESS;
+ }
++
++static void
++bstack(Monitor *m) {
++ int w, h, mh, mx, tx, ty, tw;
++ unsigned int i, n;
++ Client *c;
++
++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
++ if (n == 0)
++ return;
++ if (n > m->nmaster) {
++ mh = m->nmaster ? m->mfact * m->wh : 0;
++ tw = m->ww / (n - m->nmaster);
++ ty = m->wy + mh;
++ } else {
++ mh = m->wh;
++ tw = m->ww;
++ ty = m->wy;
++ }
++ for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
++ if (i < m->nmaster) {
++ w = (m->ww - mx) / (MIN(n, m->nmaster) - i);
++ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0);
++ mx += WIDTH(c);
++ } else {
++ h = m->wh - mh;
++ resize(c, tx, ty, tw - (2 * c->bw), h - (2 * c->bw), 0);
++ if (tw != m->ww)
++ tx += WIDTH(c);
++ }
++ }
++}
++
++static void
++bstackhoriz(Monitor *m) {
++ int w, mh, mx, tx, ty, th;
++ unsigned int i, n;
++ Client *c;
++
++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
++ if (n == 0)
++ return;
++ if (n > m->nmaster) {
++ mh = m->nmaster ? m->mfact * m->wh : 0;
++ th = (m->wh - mh) / (n - m->nmaster);
++ ty = m->wy + mh;
++ } else {
++ th = mh = m->wh;
++ ty = m->wy;
++ }
++ for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
++ if (i < m->nmaster) {
++ w = (m->ww - mx) / (MIN(n, m->nmaster) - i);
++ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0);
++ mx += WIDTH(c);
++ } else {
++ resize(c, tx, ty, m->ww - (2 * c->bw), th - (2 * c->bw), 0);
++ if (th != m->wh)
++ ty += HEIGHT(c);
++ }
++ }
++}
diff --git a/dwm.suckless.org/patches/dwm-bottomstack-6.1.diff b/dwm.suckless.org/patches/dwm-bottomstack-6.1.diff
new file mode 100644
index 0000000..8958a98
--- /dev/null
+++ b/dwm.suckless.org/patches/dwm-bottomstack-6.1.diff
_AT_@ -0,0 +1,92 @@
+diff --git a/config.def.h b/config.def.h
+index 7054c06..4111c1d 100644
+--- a/config.def.h
++++ b/config.def.h
+_AT_@ -39,6 +39,8 @@ static const Layout layouts[] = {
+ { "[]=", tile }, /* first entry is default */
+ { "><>", NULL }, /* no layout function means floating behavior */
+ { "[M]", monocle },
++ { "TTT", bstack },
++ { "===", bstackhoriz },
+ };
+
+ /* key definitions */
+diff --git a/dwm.c b/dwm.c
+index 0362114..c313b5e 100644
+--- a/dwm.c
++++ b/dwm.c
+_AT_@ -233,6 +233,8 @@ static int xerror(Display *dpy, XErrorEvent *ee);
+ static int xerrordummy(Display *dpy, XErrorEvent *ee);
+ static int xerrorstart(Display *dpy, XErrorEvent *ee);
+ static void zoom(const Arg *arg);
++static void bstack(Monitor *m);
++static void bstackhoriz(Monitor *m);
+
+ /* variables */
+ static const char broken[] = "broken";
+_AT_@ -2139,3 +2141,65 @@ main(int argc, char *argv[])
+ XCloseDisplay(dpy);
+ return EXIT_SUCCESS;
+ }
++
++static void
++bstack(Monitor *m) {
++ int w, h, mh, mx, tx, ty, tw;
++ unsigned int i, n;
++ Client *c;
++
++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
++ if (n == 0)
++ return;
++ if (n > m->nmaster) {
++ mh = m->nmaster ? m->mfact * m->wh : 0;
++ tw = m->ww / (n - m->nmaster);
++ ty = m->wy + mh;
++ } else {
++ mh = m->wh;
++ tw = m->ww;
++ ty = m->wy;
++ }
++ for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
++ if (i < m->nmaster) {
++ w = (m->ww - mx) / (MIN(n, m->nmaster) - i);
++ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0);
++ mx += WIDTH(c);
++ } else {
++ h = m->wh - mh;
++ resize(c, tx, ty, tw - (2 * c->bw), h - (2 * c->bw), 0);
++ if (tw != m->ww)
++ tx += WIDTH(c);
++ }
++ }
++}
++
++static void
++bstackhoriz(Monitor *m) {
++ int w, mh, mx, tx, ty, th;
++ unsigned int i, n;
++ Client *c;
++
++ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
++ if (n == 0)
++ return;
++ if (n > m->nmaster) {
++ mh = m->nmaster ? m->mfact * m->wh : 0;
++ th = (m->wh - mh) / (n - m->nmaster);
++ ty = m->wy + mh;
++ } else {
++ th = mh = m->wh;
++ ty = m->wy;
++ }
++ for (i = mx = 0, tx = m->wx, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++) {
++ if (i < m->nmaster) {
++ w = (m->ww - mx) / (MIN(n, m->nmaster) - i);
++ resize(c, m->wx + mx, m->wy, w - (2 * c->bw), mh - (2 * c->bw), 0);
++ mx += WIDTH(c);
++ } else {
++ resize(c, tx, ty, m->ww - (2 * c->bw), th - (2 * c->bw), 0);
++ if (th != m->wh)
++ ty += HEIGHT(c);
++ }
++ }
++}
diff --git a/dwm.suckless.org/patches/historical/dwm-5.8.2-bstack-alt.diff b/dwm.suckless.org/patches/historical/dwm-5.8.2-bstack-alt.diff
deleted file mode 100644
index 4d85ba2..0000000
--- a/dwm.suckless.org/patches/historical/dwm-5.8.2-bstack-alt.diff
+++ /dev/null
_AT_@ -1,93 +0,0 @@
-diff -up dwm-5.8.2-original/config.def.h dwm-5.8.2/config.def.h
---- dwm-5.8.2-original/config.def.h 2010-06-04 06:39:15.000000000 -0400
-+++ dwm-5.8.2/config.def.h 2010-07-07 14:56:15.000000000 -0400
-_AT_@ -31,6 +31,8 @@ static const Layout layouts[] = {
- { "[]=", tile }, /* first entry is default */
- { "><>", NULL }, /* no layout function means floating behavior */
- { "[M]", monocle },
-+ { "TTT", bstack },
-+ { "===", bstackhoriz },
- };
-
- /* key definitions */
-diff -up dwm-5.8.2-original/dwm.c dwm-5.8.2/dwm.c
---- dwm-5.8.2-original/dwm.c 2010-06-04 06:39:15.000000000 -0400
-+++ dwm-5.8.2/dwm.c 2010-07-07 15:03:16.000000000 -0400
-_AT_@ -158,6 +158,8 @@ static void arrange(Monitor *m);
- static void arrangemon(Monitor *m);
- static void attach(Client *c);
- static void attachstack(Client *c);
-+static void bstack(Monitor *m);
-+static void bstackhoriz(Monitor *m);
- static void buttonpress(XEvent *e);
- static void checkotherwm(void);
- static void cleanup(void);
-_AT_@ -1657,6 +1659,67 @@ tile(Monitor *m) {
- if(h < bh)
- h = m->wh;
- for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
-+ resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n)
-+ ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False);
-+ if(h != m->wh)
-+ y = c->y + HEIGHT(c);
-+ }
-+}
-+
-+static void
-+bstack(Monitor *m) {
-+ int x, y, h, w, mh;
-+ unsigned int i, n;
-+ Client *c;
-+
-+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ if(n == 0)
-+ return;
-+ /* master */
-+ c = nexttiled(m->clients);
-+ mh = m->mfact * m->wh;
-+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False);
-+ if(--n == 0)
-+ return;
-+ /* tile stack */
-+ x = m->wx;
-+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh;
-+ w = m->ww / n;
-+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh;
-+ if(w < bh)
-+ w = m->ww;
-+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
-+ resize(c, x, y, /* remainder */ ((i + 1 == n)
-+ ? m->wx + m->ww - x - 2 * c->bw : w - 2 * c->bw), h - 2 * c->bw, False);
-+ if(w != m->ww)
-+ x = c->x + WIDTH(c);
-+ }
-+}
-+
-+static void
-+bstackhoriz(Monitor *m) {
-+ int x, y, h, w, mh;
-+ unsigned int i, n;
-+ Client *c;
-+
-+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ if(n == 0)
-+ return;
-+ /* master */
-+ c = nexttiled(m->clients);
-+ mh = m->mfact * m->wh;
-+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False);
-+ if(--n == 0)
-+ return;
-+ /* tile stack */
-+ x = m->wx;
-+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh;
-+ w = m->ww;
-+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh;
-+ h /= n;
-+ if(h < bh)
-+ h = m->wh;
-+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
- resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n)
- ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False);
- if(h != m->wh)
-
diff --git a/dwm.suckless.org/patches/historical/dwm-5.8.2-bstack.diff b/dwm.suckless.org/patches/historical/dwm-5.8.2-bstack.diff
deleted file mode 100644
index 958613b..0000000
--- a/dwm.suckless.org/patches/historical/dwm-5.8.2-bstack.diff
+++ /dev/null
_AT_@ -1,82 +0,0 @@
-diff -NU5 -r dwm-5.8.2/bstack.c dwm-5.8.2-bstack/bstack.c
---- dwm-5.8.2/bstack.c 1970-01-01 01:00:00.000000000 +0100
-+++ dwm-5.8.2-bstack/bstack.c 2010-06-15 17:47:44.000000000 +0200
-_AT_@ -0,0 +1,29 @@
-+static void
-+bstack(Monitor *m) {
-+ int x, y, h, w, mh;
-+ unsigned int i, n;
-+ Client *c;
-+
-+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ if(n == 0)
-+ return;
-+ /* master */
-+ c = nexttiled(m->clients);
-+ mh = m->mfact * m->wh;
-+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False);
-+ if(--n == 0)
-+ return;
-+ /* tile stack */
-+ x = m->wx;
-+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh;
-+ w = m->ww / n;
-+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh;
-+ if(w < bh)
-+ w = m->ww;
-+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
-+ resize(c, x, y, /* remainder */ ((i + 1 == n)
-+ ? m->wx + m->ww - x - 2 * c->bw : w - 2 * c->bw), h - 2 * c->bw, False);
-+ if(w != m->ww)
-+ x = c->x + WIDTH(c);
-+ }
-+}
-diff -NU5 -r dwm-5.8.2/bstackhoriz.c dwm-5.8.2-bstack/bstackhoriz.c
---- dwm-5.8.2/bstackhoriz.c 1970-01-01 01:00:00.000000000 +0100
-+++ dwm-5.8.2-bstack/bstackhoriz.c 2010-06-15 17:47:44.000000000 +0200
-_AT_@ -0,0 +1,30 @@
-+static void
-+bstackhoriz(Monitor *m) {
-+ int x, y, h, w, mh;
-+ unsigned int i, n;
-+ Client *c;
-+
-+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ if(n == 0)
-+ return;
-+ /* master */
-+ c = nexttiled(m->clients);
-+ mh = m->mfact * m->wh;
-+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False);
-+ if(--n == 0)
-+ return;
-+ /* tile stack */
-+ x = m->wx;
-+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh;
-+ w = m->ww;
-+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh;
-+ h /= n;
-+ if(h < bh)
-+ h = m->wh;
-+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
-+ resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n)
-+ ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False);
-+ if(h != m->wh)
-+ y = c->y + HEIGHT(c);
-+ }
-+}
-diff -NU5 -r dwm-5.8.2/config.def.h dwm-5.8.2-bstack/config.def.h
---- dwm-5.8.2/config.def.h 2010-06-04 12:39:15.000000000 +0200
-+++ dwm-5.8.2-bstack/config.def.h 2010-06-15 17:47:44.000000000 +0200
-_AT_@ -29,1 +29,3 @@
-+#include "bstack.c"
-+#include "bstackhoriz.c"
- static const Layout layouts[] = {
-_AT_@ -34,5 +36,7 @@
-+ { "TTT", bstack },
-+ { "===", bstackhoriz },
- };
-
- /* key definitions */
- #define MODKEY Mod1Mask
- #define TAGKEYS(KEY,TAG) \
diff --git a/dwm.suckless.org/patches/historical/dwm-5.9-bstack-alt.diff b/dwm.suckless.org/patches/historical/dwm-5.9-bstack-alt.diff
deleted file mode 100644
index 5685bf9..0000000
--- a/dwm.suckless.org/patches/historical/dwm-5.9-bstack-alt.diff
+++ /dev/null
_AT_@ -1,98 +0,0 @@
-diff -up dwm-5.8.2-original/config.def.h dwm-5.8.2/config.def.h
---- dwm-5.8.2-original/config.def.h 2010-06-04 06:39:15.000000000 -0400
-+++ dwm-5.8.2/config.def.h 2010-07-07 14:56:15.000000000 -0400
-_AT_@ -31,6 +31,8 @@ static const Layout layouts[] = {
- /* symbol arrange function */
- { "[]=", tile }, /* first entry is default */
- { "><>", NULL }, /* no layout function means floating behavior */
- { "[M]", monocle },
-+ { "TTT", bstack },
-+ { "===", bstackhoriz },
- };
-
- /* key definitions */
- #define MODKEY Mod1Mask
- #define TAGKEYS(KEY,TAG) \
- };
-
-diff -up dwm-5.8.2-original/dwm.c dwm-5.8.2/dwm.c
---- dwm-5.8.2-original/dwm.c 2010-06-04 06:39:15.000000000 -0400
-+++ dwm-5.8.2/dwm.c 2010-07-07 15:03:16.000000000 -0400
-_AT_@ -158,6 +158,8 @@ static void arrange(Monitor *m);
- static void arrangemon(Monitor *m);
- static void attach(Client *c);
- static void attachstack(Client *c);
-+static void bstack(Monitor *m);
-+static void bstackhoriz(Monitor *m);
- static void buttonpress(XEvent *e);
- static void checkotherwm(void);
- static void cleanup(void);
-_AT_@ -1657,6 +1659,67 @@ tile(Monitor *m) {
- if(h < bh)
- h = m->wh;
- for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
-+ resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n)
-+ ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False);
-+ if(h != m->wh)
-+ y = c->y + HEIGHT(c);
-+ }
-+}
-+
-+static void
-+bstack(Monitor *m) {
-+ int x, y, h, w, mh;
-+ unsigned int i, n;
-+ Client *c;
-+
-+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ if(n == 0)
-+ return;
-+ /* master */
-+ c = nexttiled(m->clients);
-+ mh = m->mfact * m->wh;
-+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False);
-+ if(--n == 0)
-+ return;
-+ /* tile stack */
-+ x = m->wx;
-+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh;
-+ w = m->ww / n;
-+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh;
-+ if(w < bh)
-+ w = m->ww;
-+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
-+ resize(c, x, y, /* remainder */ ((i + 1 == n)
-+ ? m->wx + m->ww - x - 2 * c->bw : w - 2 * c->bw), h - 2 * c->bw, False);
-+ if(w != m->ww)
-+ x = c->x + WIDTH(c);
-+ }
-+}
-+
-+static void
-+bstackhoriz(Monitor *m) {
-+ int x, y, h, w, mh;
-+ unsigned int i, n;
-+ Client *c;
-+
-+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ if(n == 0)
-+ return;
-+ /* master */
-+ c = nexttiled(m->clients);
-+ mh = m->mfact * m->wh;
-+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False);
-+ if(--n == 0)
-+ return;
-+ /* tile stack */
-+ x = m->wx;
-+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh;
-+ w = m->ww;
-+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh;
-+ h /= n;
-+ if(h < bh)
-+ h = m->wh;
-+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
- resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n)
- ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False);
- if(h != m->wh)
-
diff --git a/dwm.suckless.org/patches/historical/dwm-5.9-bstack.diff b/dwm.suckless.org/patches/historical/dwm-5.9-bstack.diff
deleted file mode 100644
index 087b7d2..0000000
--- a/dwm.suckless.org/patches/historical/dwm-5.9-bstack.diff
+++ /dev/null
_AT_@ -1,87 +0,0 @@
-diff -NU5 -r dwm-5.8.2/bstack.c dwm-5.8.2-bstack/bstack.c
---- dwm-5.8.2/bstack.c 1970-01-01 01:00:00.000000000 +0100
-+++ dwm-5.8.2-bstack/bstack.c 2010-06-15 17:47:44.000000000 +0200
-_AT_@ -0,0 +1,29 @@
-+static void
-+bstack(Monitor *m) {
-+ int x, y, h, w, mh;
-+ unsigned int i, n;
-+ Client *c;
-+
-+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ if(n == 0)
-+ return;
-+ /* master */
-+ c = nexttiled(m->clients);
-+ mh = m->mfact * m->wh;
-+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False);
-+ if(--n == 0)
-+ return;
-+ /* tile stack */
-+ x = m->wx;
-+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh;
-+ w = m->ww / n;
-+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh;
-+ if(w < bh)
-+ w = m->ww;
-+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
-+ resize(c, x, y, /* remainder */ ((i + 1 == n)
-+ ? m->wx + m->ww - x - 2 * c->bw : w - 2 * c->bw), h - 2 * c->bw, False);
-+ if(w != m->ww)
-+ x = c->x + WIDTH(c);
-+ }
-+}
-diff -NU5 -r dwm-5.8.2/bstackhoriz.c dwm-5.8.2-bstack/bstackhoriz.c
---- dwm-5.8.2/bstackhoriz.c 1970-01-01 01:00:00.000000000 +0100
-+++ dwm-5.8.2-bstack/bstackhoriz.c 2010-06-15 17:47:44.000000000 +0200
-_AT_@ -0,0 +1,30 @@
-+static void
-+bstackhoriz(Monitor *m) {
-+ int x, y, h, w, mh;
-+ unsigned int i, n;
-+ Client *c;
-+
-+ for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
-+ if(n == 0)
-+ return;
-+ /* master */
-+ c = nexttiled(m->clients);
-+ mh = m->mfact * m->wh;
-+ resize(c, m->wx, m->wy, m->ww - 2 * c->bw, (n == 1 ? m->wh : mh) - 2 * c->bw, False);
-+ if(--n == 0)
-+ return;
-+ /* tile stack */
-+ x = m->wx;
-+ y = (m->wy + mh > c->y + c->h) ? c->y + c->h + 2 * c->bw : m->wy + mh;
-+ w = m->ww;
-+ h = (m->wy + mh > c->y + c->h) ? m->wy + m->wh - y : m->wh - mh;
-+ h /= n;
-+ if(h < bh)
-+ h = m->wh;
-+ for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
-+ resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n)
-+ ? m->wy + m->wh - y - 2 * c->bw : h - 2 * c->bw), False);
-+ if(h != m->wh)
-+ y = c->y + HEIGHT(c);
-+ }
-+}
-
-diff -r 23b71491e149 config.def.h
---- a/config.def.h Thu Dec 02 10:16:47 2010 +0000
-+++ b/config.def.h Fri Jan 07 15:10:06 2011 +0100
-_AT_@ -26,11 +26,15 @@
- static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
- static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
-
-+#include "bstack.c"
-+#include "bstackhoriz.c"
- static const Layout layouts[] = {
- /* symbol arrange function */
- { "[]=", tile }, /* first entry is default */
- { "><>", NULL }, /* no layout function means floating behavior */
- { "[M]", monocle },
-+ { "TTT", bstack },
-+ { "===", bstackhoriz },
- };
-
- /* key definitions */
Received on Tue Jul 19 2016 - 10:08:27 CEST

This archive was generated by hypermail 2.3.0 : Tue Jul 19 2016 - 10:12:15 CEST