diff -aur dwm-5.4.1/config.def.h dwm-5.4.1-new/config.def.h
--- dwm-5.4.1/config.def.h	2009-02-08 12:10:49.000000000 +0000
+++ dwm-5.4.1-new/config.def.h	2009-04-14 14:07:35.000000000 +0000
@@ -26,7 +26,8 @@
 };
 
 /* layout(s) */
-static float mfact      = 0.55; /* factor of master area size [0.05..0.95] */
+static int mwp          = 55;   /* master area width percentage [5..95] */
+static int mn           = 1;    /* number of clients in master area */
 static Bool resizehints = True; /* False means respect size hints in tiled resizals */
 
 static Layout layouts[] = {
@@ -58,8 +59,10 @@
 	{ MODKEY,                       XK_b,      togglebar,      {0} },
 	{ MODKEY,                       XK_j,      focusstack,     {.i = +1 } },
 	{ MODKEY,                       XK_k,      focusstack,     {.i = -1 } },
-	{ MODKEY,                       XK_h,      setmfact,       {.f = -0.05} },
-	{ MODKEY,                       XK_l,      setmfact,       {.f = +0.05} },
+ 	{ MODKEY,                       XK_h,      tweakmwp,       {.v = (int[]){Rel, -5}} },
+        { MODKEY,                       XK_l,      tweakmwp,       {.v = (int[]){Rel, +5}} },
+        { MODKEY|ShiftMask,             XK_h,      tweakmn,        {.v = (int[]){Rel, -1}} },
+        { MODKEY|ShiftMask,             XK_l,      tweakmn,        {.v = (int[]){Rel, +1}} },
 	{ MODKEY,                       XK_Return, zoom,           {0} },
 	{ MODKEY,                       XK_Tab,    view,           {0} },
 	{ MODKEY|ShiftMask,             XK_c,      killclient,     {0} },
diff -aur dwm-5.4.1/dwm.c dwm-5.4.1-new/dwm.c
--- dwm-5.4.1/dwm.c	2009-02-08 12:10:49.000000000 +0000
+++ dwm-5.4.1-new/dwm.c	2009-04-14 14:05:14.000000000 +0000
@@ -56,6 +56,7 @@
 #define TEXTW(x)                (textnw(x, strlen(x)) + dc.font.height)
 
 /* enums */
+enum { Abs, Rel };
 enum { CurNormal, CurResize, CurMove, CurLast };        /* cursor */
 enum { ColBorder, ColFG, ColBG, ColLast };              /* color */
 enum { NetSupported, NetWMName, NetLast };              /* EWMH atoms */
@@ -177,7 +178,6 @@
 static void scan(void);
 static void setclientstate(Client *c, long state);
 static void setlayout(const Arg *arg);
-static void setmfact(const Arg *arg);
 static void setup(void);
 static void showhide(Client *c, unsigned int ntiled);
 static void sigchld(int signal);
@@ -185,10 +185,14 @@
 static void tag(const Arg *arg);
 static int textnw(const char *text, unsigned int len);
 static void tile(void);
+static Client *tilecolumn(Client* c, unsigned int n, unsigned int nt, int x, int y, int w, int h, unsigned int *maxw);
 static void togglebar(const Arg *arg);
 static void togglefloating(const Arg *arg);
 static void toggletag(const Arg *arg);
 static void toggleview(const Arg *arg);
+static void tweak(int *var, const int *val, int min, int max);
+static void tweakmwp(const Arg *arg);
+static void tweakmn(const Arg *arg);
 static void unmanage(Client *c);
 static void unmapnotify(XEvent *e);
 static void updatebar(void);
@@ -1255,20 +1259,6 @@
 		drawbar();
 }
 
-/* arg > 1.0 will set mfact absolutly */
-void
-setmfact(const Arg *arg) {
-	float f;
-
-	if(!arg || !lt[sellt]->arrange)
-		return;
-	f = arg->f < 1.0 ? arg->f + mfact : arg->f - 1.0;
-	if(f < 0.1 || f > 0.9)
-		return;
-	mfact = f;
-	arrange();
-}
-
 void
 setup(void) {
 	unsigned int i;
@@ -1403,38 +1393,34 @@
 
 void
 tile(void) {
-	int x, y, h, w, mw;
-	unsigned int i, n;
 	Client *c;
+        unsigned int n, maxw = 0;
 
 	for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next), n++);
-	if(n == 0)
-		return;
 
-	/* master */
 	c = nexttiled(clients);
-	mw = mfact * ww;
-	adjustborder(c, n == 1 ? 0 : borderpx);
-	resize(c, wx, wy, (n == 1 ? ww : mw) - 2 * c->bw, wh - 2 * c->bw, resizehints);
+	       if(n <= mn)
+               tilecolumn(c, n, n, wx, wy, ww, wh, NULL);
+        else {
+               c = tilecolumn(c, n, mn, wx, wy, (float)mwp/100 * ww, wh, &maxw);
+               tilecolumn(c, n, n - mn, wx + maxw, wy, ww - maxw, wh, NULL);
+        }
+ }
 
-	if(--n == 0)
-		return;
-
-	/* tile stack */
-	x = (wx + mw > c->x + c->w) ? c->x + c->w + 2 * c->bw : wx + mw;
-	y = wy;
-	w = (wx + mw > c->x + c->w) ? wx + ww - x : ww - mw;
-	h = wh / n;
-	if(h < bh)
-		h = wh;
+Client *
+tilecolumn(Client* c, unsigned int n, unsigned int nt, int x, int y, int w, int h, unsigned int *maxw) {
+        unsigned int i, d;
+        for(i = 0; c && i < nt; c = nexttiled(c->next), i++) {
+               adjustborder(c, n == 1 ? 0 : borderpx);
+               resize(c, x, y, w - 2 * c->bw, h / (nt - i) - 2 * c->bw, resizehints);
+               d = HEIGHT(c);
+               y += d;
+               h -= d;
+               if(maxw)
+                       *maxw = MAX(*maxw, WIDTH(c));
 
-	for(i = 0, c = nexttiled(c->next); c; c = nexttiled(c->next), i++) {
-		adjustborder(c, borderpx);
-		resize(c, x, y, w - 2 * c->bw, /* remainder */ ((i + 1 == n)
-		       ? wy + wh - y - 2 * c->bw : h - 2 * c->bw), resizehints);
-		if(h != wh)
-			y = c->y + HEIGHT(c);
 	}
+	return c;
 }
 
 void
@@ -1480,6 +1466,27 @@
 }
 
 void
+tweak(int *var, const int *val, int min, int max) {
+       int i;
+
+       i = val[1] + (val[0] == Abs ? 0 : *var);
+       if(!lt[sellt]->arrange || i < min || i > max)
+               return;
+       *var = i;
+       arrange();
+}
+
+void
+tweakmn(const Arg *arg) {
+       tweak(&mn, arg->v, 1, wh / (1 + 2 * borderpx));
+}
+
+void
+tweakmwp(const Arg *arg) {
+       tweak(&mwp, arg->v, 5, 95);
+}
+
+void
 unmanage(Client *c) {
 	XWindowChanges wc;
 
