diff -r 18756f3d803d config.h --- a/config.h Tue Oct 30 22:39:33 2007 -0400 +++ b/config.h Wed Oct 31 15:08:00 2007 -0400 @@ -41,6 +41,20 @@ Layout layouts[] = { /* Status text */ char* statusbar[] = { cptstext, inputtext }; +static void custom_focusnext(const char* a) +{ + focusnext(NULL); + if(cpt == 1) + arrange(); +} + +static void custom_focusprev(const char* a) +{ + focusprev(NULL); + if(cpt == 1) + arrange(); +} + /* key definitions */ #define MODKEY Mod1Mask #define KEYS \ @@ -54,8 +68,8 @@ Key keys[] = { \ { MODKEY, XK_s, spawn, "exec .dwm/audio_toggle.sh" }, \ { MODKEY, XK_space, setlayout, NULL }, \ { MODKEY, XK_b, togglebar, NULL }, \ - { MODKEY, XK_n, focusnext, NULL }, \ - { MODKEY, XK_e, focusprev, NULL }, \ + { MODKEY, XK_n, custom_focusnext, NULL }, \ + { MODKEY, XK_e, custom_focusprev, NULL }, \ { MODKEY, XK_h, setmwfact, "-0.05" }, \ { MODKEY, XK_o, setmwfact, "+0.05" }, \ { MODKEY, XK_m, togglemax, NULL }, \ diff -r 18756f3d803d nmaster.c --- a/nmaster.c Tue Oct 30 22:39:33 2007 -0400 +++ b/nmaster.c Thu Nov 01 21:02:32 2007 -0400 @@ -96,12 +96,28 @@ void void ntile(void) { unsigned int i, n, nx, ny, nw, nh, mw, mh, th; - Client *c; + Client *c, *t; for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next)) n++; n = getclientspertag(n); + + if(cpt == 1) { // Scrolling monocle layout + if(sel && isvisible(sel)) + t = sel; + else // Find client from selection history + for(t = stack; t && !isvisible(t); t = t->snext); + for(c = nexttiled(clients); c; c = nexttiled(c->next)){ + if(c!=t){ + ban(c); + continue; + } + } + if(t) + resize(t, wax, way, waw - 2*t->border, wah - 2*t->border, False); + return; + } /* window geoms */ mh = (n <= nmaster) ? wah / (n > 0 ? n : 1) : wah / nmaster;