if(c->isbanned)
XMoveWindow(dpy, c->win, c->x, c->y);
c->isbanned = False;
- if(c->isversatile)
+ if(c->isuntiled)
continue;
c->ismax = False;
nx = wax;
/* extern */
void
-focusnext(const char *arg) {
+focusclient(const char *arg) {
Client *c;
- if(!sel)
+ if(!sel || !arg)
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(const char *arg) {
- Client *c;
-
- if(!sel)
+ switch(atoi(arg)) {
+ default:
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);
+ case 1:
+ for(c = sel->next; c && !isvisible(c); c = c->next);
+ if(!c)
+ for(c = clients; c && !isvisible(c); c = c->next);
+ break;
+ case -1:
+ 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);
+ }
+ break;
}
if(c) {
focus(c);
Client *
nexttiled(Client *c) {
- for(; c && (c->isversatile || !isvisible(c)); c = c->next);
+ for(; c && (c->isuntiled || !isvisible(c)); c = c->next);
return c;
}
drawstatus();
if(!sel)
return;
- if(sel->isversatile || lt->arrange == versatile)
+ if(sel->isuntiled || lt->arrange == untile)
XRaiseWindow(dpy, sel->win);
- if(lt->arrange != versatile) {
- if(!sel->isversatile)
+ if(lt->arrange != untile) {
+ if(!sel->isuntiled)
XLowerWindow(dpy, sel->win);
for(c = nexttiled(clients); c; c = nexttiled(c->next)) {
if(c == sel)
togglemax(const char *arg) {
XEvent ev;
- if(!sel || (lt->arrange != versatile && !sel->isversatile) || sel->isfixed)
+ if(!sel || (lt->arrange != untile && !sel->isuntiled) || sel->isfixed)
return;
if((sel->ismax = !sel->ismax)) {
sel->rx = sel->x;
}
void
-versatile(void) {
+untile(void) {
Client *c;
for(c = clients; c; c = c->next) {
unsigned int n;
Client *c;
- if(!sel || lt->arrange != tile || sel->isversatile)
+ if(!sel || lt->arrange != tile || sel->isuntiled)
return;
for(n = 0, c = nexttiled(clients); c; c = nexttiled(c->next))
n++;