I've updated the bottom stack to better handle resizehints and work with
the latest tip. Feel free to test and let me know how it goes. Thanks.
http://bsdgroup.org/files/dwm-4.6-bstack.diff
--
James Turner
BSD Group Consulting
http://www.bsdgroup.org
--- bstack.c Wed Dec 31 19:00:00 1969
+++ bstack.c Wed Oct 24 22:28:48 2007
@@ -0,0 +1,41 @@
+void
+bstack(void) {
+ unsigned int i, n, nx, ny, nw, nh, mh, tw, th;
+ Client *c, *mc;
+
+ for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next))
+ n++;
+
+ /* window geoms */
+ mh = (n == 1) ? wah : mwfact * wah;
+ tw = (n > 1) ? waw / (n - 1) : 0;
+ th = (n > 1) ? (1 - mwfact) * wah : 0;
+
+ nx = wax;
+ ny = way;
+ nh = 0; /* gcc stupidity required this */
+ for(i = 0, c = mc = nexttiled(clients); c; c = nexttiled(c->next), i++) {
+ c->ismax = False;
+ if(i == 0) { /* master */
+ nw = waw - 2 * c->border;
+ nh = mh - 2 * c->border;
+ }
+ else { /* tile window */
+ if(i == 1) {
+ nx = wax;
+ ny += mc->h + 2 * mc->border;
+ nh = th - 2 * c->border;
+ }
+ if(i + 1 == n) /* remainder */
+ nw = (wax + waw) - nx - 2 * c->border;
+ else
+ nw = tw - 2 * c->border;
+ }
+ resize(c, nx, ny, nw, nh, True);
+ if((c->h < bh) || (c->h > nh) || (c->w < bh) || (c->w > nw))
+ /* client doesn't accept geometry, so enforce it */
+ resize(c, nx, ny, nw, nh, False);
+ if(n > 1 && tw != waw)
+ nx = c->x + c->w + 2 * c->border;
+ }
+}
--- config.def.h Wed Oct 24 22:04:30 2007
+++ config.def.h Wed Oct 24 22:10:17 2007
@@ -22,13 +22,15 @@ Rule rules[] = {
};
/* layout(s) */
-#define ISTILE isarrange(tile) /* || isarrange(<custom>) */
+#define ISTILE isarrange(tile) || isarrange(bstack) /* ||
isarrange(<custom>) */
#define MWFACT 0.6 /* master width factor [0.1 .. 0.9] */
#define SNAP 32 /* snap pixel */
+#include "bstack.c"
Layout layouts[] = {
/* symbol function */
{ "[]=", tile }, /* first entry is default */
{ "><>", floating },
+ { "TTT", bstack },
};
/* key definitions */