diff -r 58366c12324e bstack.c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bstack.c	Thu May 15 23:07:25 2008 +0200
@@ -0,0 +1,41 @@
+void
+bstack() {
+	unsigned int i, n, nx, ny, nw, nh, mh, tw;
+	Client *c, *mc;
+
+	nx = sx;
+	ny = sy;
+	nh = 0;
+
+	for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next))
+		n++;
+
+	mh = (n == 1) ? sh - bh: mfact * sh;
+	tw = (n > 1) ? sw / (n - 1) : 0;
+
+	for(i = 0, c = mc = nexttiled(clients); c; c = nexttiled(c->next)) {
+		if(i == 0) {
+			nx = sx;
+			ny = sy + bh;
+			nh = mh - 2 * c->bw;
+			nw = sw - 2 * c->bw;
+		}
+		else {
+			if(i == 1) {
+				nx = sx;
+				ny += mc->h + 2 * mc->bw;
+				nh = (sy + sh) - ny - 2 * c->bw;
+			}
+			if(i + 1 == n)
+				nw = (sx + sw) - nx - 2 * c->bw;
+			else
+				nw = tw - 2 * c->bw;
+		}
+		resize(c, nx, ny, nw, nh, RESIZEHINTS);
+		if((RESIZEHINTS) && ((c->h < bh) || (c->h > nh) || (c->w < bh) || (c->w > nw)))
+			resize(c, nx, ny, nw, nh, False);
+		if(n > 1 && tw != sw)
+			nx = c->x + c->w + 2 * c->bw;
+		i++;
+	}
+}
diff -r 58366c12324e config.def.h
--- a/config.def.h	Sun May 11 14:54:45 2008 +0100
+++ b/config.def.h	Thu May 15 23:07:25 2008 +0200
@@ -32,11 +32,13 @@
 #define RESIZEHINTS		True	/* False - respect size hints in tiled resizals */
 #define SNAP			32	/* snap pixel */
 
+#include "bstack.c"
 Layout layouts[] = {
 	/* symbol		function	isfloating */
 	{ "[]=",		tilev,		False }, /* first entry is default */
 	{ "><>",		NULL,		True },
 	{ "<M>",		monocle,	True },
+	{ "TTT",		bstack,		False },
 };
 
 /* key definitions */
