diff options
author | okan <okan> | 2015-07-12 14:31:47 +0000 |
---|---|---|
committer | okan <okan> | 2015-07-12 14:31:47 +0000 |
commit | c0f2d0cc756f5ec7076946179efe2399f026c60a (patch) | |
tree | fa885c4df0aac7121c711e55631490023ee3f3ee /kbfunc.c | |
parent | 671671959360a30e99b6812f132b6f1f0ff0d6e6 (diff) | |
parent | 0d13b7c2205bd40d9fd4db016c8cf96f620c4f8d (diff) | |
download | cwm-c0f2d0cc756f5ec7076946179efe2399f026c60a.tar.gz cwm-c0f2d0cc756f5ec7076946179efe2399f026c60a.tar.xz cwm-c0f2d0cc756f5ec7076946179efe2399f026c60a.zip |
cvsimport
Diffstat (limited to 'kbfunc.c')
-rw-r--r-- | kbfunc.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/kbfunc.c b/kbfunc.c index e394b19..b100c18 100644 --- a/kbfunc.c +++ b/kbfunc.c @@ -178,7 +178,7 @@ kbfunc_menu_cmd(struct client_ctx *cc, union arg *arg) TAILQ_INIT(&menuq); TAILQ_FOREACH(cmd, &Conf.cmdq, entry) - menuq_add(&menuq, cmd, NULL); + menuq_add(&menuq, cmd, "%s", cmd->name); if ((mi = menu_filter(sc, &menuq, "application", NULL, 0, search_match_text, search_print_cmd)) != NULL) @@ -188,6 +188,31 @@ kbfunc_menu_cmd(struct client_ctx *cc, union arg *arg) } void +kbfunc_menu_group(struct client_ctx *cc, union arg *arg) +{ + struct screen_ctx *sc = cc->sc; + struct group_ctx *gc; + struct menu *mi; + struct menu_q menuq; + + TAILQ_INIT(&menuq); + TAILQ_FOREACH(gc, &sc->groupq, entry) { + if (group_holds_only_sticky(gc)) + continue; + menuq_add(&menuq, gc, "%d %s", gc->num, gc->name); + } + + if ((mi = menu_filter(sc, &menuq, "group", NULL, CWM_MENU_LIST, + search_match_text, search_print_group)) != NULL) { + gc = (struct group_ctx *)mi->ctx; + (group_holds_only_hidden(gc)) ? + group_show(gc) : group_hide(gc); + } + + menuq_clear(&menuq); +} + +void kbfunc_client_cycle(struct client_ctx *cc, union arg *arg) { struct screen_ctx *sc = cc->sc; |