diff -r 2c42d9e7f79c -r 30ec8b96a7f6 layout.c --- a/layout.c Wed Feb 21 11:30:52 2007 +0100 +++ b/layout.c Wed Feb 21 11:39:57 2007 +0100 @@ -69,6 +69,38 @@ /* extern */ void +focusnext(Arg *arg) { + Client *c; + + if(!sel) + return; + for(c = sel->next; c && !isvisible(c); c = c->next); + if(!c) + for(c = clients; c && !isvisible(c); c = c->next); + if(c) { + focus(c); + restack(); + } +} + +void +focusprev(Arg *arg) { + Client *c; + + if(!sel) + return; + for(c = sel->prev; c && !isvisible(c); c = c->prev); + if(!c) { + for(c = clients; c && c->next; c = c->next); + for(; c && !isvisible(c); c = c->prev); + } + if(c) { + focus(c); + restack(); + } +} + +void incnmaster(Arg *arg) { if((lt->arrange != tile) || (nmaster + arg->i < 1) || (wah / (nmaster + arg->i) <= 2 * BORDERPX)) @@ -93,6 +125,12 @@ } } +Client * +nexttiled(Client *c) { + for(; c && (c->isversatile || !isvisible(c)); c = c->next); + return c; +} + void resizemaster(Arg *arg) { if(lt->arrange != tile) @@ -154,14 +192,6 @@ } void -toggleversatile(Arg *arg) { - if(!sel || lt->arrange == versatile) - return; - sel->isversatile = !sel->isversatile; - lt->arrange(); -} - -void versatile(void) { Client *c;