sites

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

commit a669e81fa6793e3d91b356397fc8f7a6a257ec7a
parent a3d377694f406d7f99d52c88ad50684b984a2413
Author: Carlos J. Torres <vlaadbrain@gmail.com>
Date:   Tue, 28 Feb 2012 11:36:41 -0500

add bstack patch for 6.0 that is nmaster aware
Diffstat:
Mdwm.suckless.org/patches/bottom_stack.md | 3+++
Adwm.suckless.org/patches/dwm-6.0-bstack.diff | 91+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 94 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/patches/bottom_stack.md b/dwm.suckless.org/patches/bottom_stack.md @@ -38,3 +38,6 @@ Download * Not for use with pertag patch: [dwm-5.9-bstack.diff](dwm-5.9-bstack.diff) * For use with pertag patch: [dwm-5.9-bstack-alt.diff](dwm-5.9-bstack-alt.diff) +6.0 (20120228) : is aware of nmaster +* Not for use with pertag patch: [dwm-6.0-bstack.diff](dwm-6.0-bstack.diff) + diff --git a/dwm.suckless.org/patches/dwm-6.0-bstack.diff b/dwm.suckless.org/patches/dwm-6.0-bstack.diff @@ -0,0 +1,91 @@ +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 +@@ -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 +@@ -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 +@@ -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 */