sites

public wiki contents of suckless.org
git clone git://git.suckless.org/sites
Log | Files | Refs

commit dec1a3584cafe9e4d07f4b3885fcd4d6f8641b96
parent f50b07a3ea4ccb2a6cdd057e4454993f2e94f854
Author: jeromenerf <jerome.andrieux@gmail.com>
Date:   Sat, 15 Aug 2015 19:03:27 +0200

bstack patch update

- htile is similar to tile
- known to work with and without pertag

Diffstat:
Mdwm.suckless.org/patches/bottom_stack.md | 5+++++
Adwm.suckless.org/patches/dwm-6.1-htile.diff | 46++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 51 insertions(+), 0 deletions(-)

diff --git a/dwm.suckless.org/patches/bottom_stack.md b/dwm.suckless.org/patches/bottom_stack.md @@ -30,6 +30,11 @@ Bottom Stack Tiling 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) diff --git a/dwm.suckless.org/patches/dwm-6.1-htile.diff b/dwm.suckless.org/patches/dwm-6.1-htile.diff @@ -0,0 +1,46 @@ + +diff --git a/dwm.c b/dwm.c +index c9fdd49..783fcdb 100644 +--- a/dwm.c ++++ b/dwm.c +@@ -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); +@@ -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);