JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
simplified several portions of code through replacing rect structs with x,y,h,w count...
[dwm.git] / cmd.c
diff --git a/cmd.c b/cmd.c
index 4f1c84b..baa3ae9 100644 (file)
--- a/cmd.c
+++ b/cmd.c
@@ -20,6 +20,24 @@ quit(void *aux)
 }
 
 void
+sel(void *aux)
+{
+       const char *arg = aux;
+       Client *c = NULL;
+
+       if(!arg || !stack)
+               return;
+       if(!strncmp(arg, "next", 5))
+               c = stack->snext ? stack->snext : stack;
+       else if(!strncmp(arg, "prev", 5))
+               for(c = stack; c && c->snext; c = c->snext);
+       if(!c)
+               c = stack;
+       raise(c);
+       focus(c);
+}
+
+void
 kill(void *aux)
 {
        Client *c = stack;