X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=cmd.c;h=c14c3e60e86ecd3b0daeaebb68325abe943c18da;hb=7696c89c90c926f6371b1ee3ec1b13dd2414aa40;hp=4f1c84bce960472b8f58fc54a40be40812476ec2;hpb=586f66331d1105be03c42e6faeae1672b974a98a;p=dwm.git diff --git a/cmd.c b/cmd.c index 4f1c84b..c14c3e6 100644 --- a/cmd.c +++ b/cmd.c @@ -20,6 +20,22 @@ quit(void *aux) } void +sel(void *aux) +{ + const char *arg = aux; + Client *c; + + if(!arg || !stack) + return; + if(!strncmp(arg, "next", 5)) + focus(stack->snext ? stack->snext : stack); + else if(!strncmp(arg, "prev", 5)) { + for(c = stack; c && c->snext; c = c->snext); + focus(c ? c : stack); + } +} + +void kill(void *aux) { Client *c = stack;