X-Git-Url: https://git.xinqibao.xyz/dwm.git/blobdiff_plain/586f66331d1105be03c42e6faeae1672b974a98a..dfd84f9bf3b9d949412a73bc62a43109b340d395:/cmd.c diff --git a/cmd.c b/cmd.c index 4f1c84b..baa3ae9 100644 --- a/cmd.c +++ b/cmd.c @@ -19,6 +19,24 @@ quit(void *aux) running = False; } +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) {