[wiki] [sites] bstack patch update || jeromenerf
commit dec1a3584cafe9e4d07f4b3885fcd4d6f8641b96
Author: jeromenerf <jerome.andrieux_AT_gmail.com>
Date: Sat Aug 15 19:03:27 2015 +0200
bstack patch update
- htile is similar to tile
- known to work with and without pertag
diff --git a/dwm.suckless.org/patches/bottom_stack.md b/dwm.suckless.org/patches/bottom_stack.md
index 68304d2..9ca05b3 100644
--- a/dwm.suckless.org/patches/bottom_stack.md
+++ b/dwm.suckless.org/patches/bottom_stack.md
_AT_@ -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
new file mode 100644
index 0000000..4a22cbc
--- /dev/null
+++ b/dwm.suckless.org/patches/dwm-6.1-htile.diff
_AT_@ -0,0 +1,46 @@
+
+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);
Received on Sat Aug 15 2015 - 19:04:36 CEST
This archive was generated by hypermail 2.3.0
: Sat Aug 15 2015 - 19:12:11 CEST