diff options
author | okan <okan> | 2015-06-09 13:02:15 +0000 |
---|---|---|
committer | okan <okan> | 2015-06-09 13:02:15 +0000 |
commit | 4454948f213d470ca3e6c087bb790190c7bfd484 (patch) | |
tree | a2f6ae4fb4eeae91c65b0c5bd360bbbcd6c3d733 /conf.c | |
parent | 7c4a8f3b51b32858bf34a062bb7215ec40424b7f (diff) | |
parent | ee400b08a8d7f1a0ef9ba1403285b1e32a08e39f (diff) | |
download | cwm-4454948f213d470ca3e6c087bb790190c7bfd484.tar.gz cwm-4454948f213d470ca3e6c087bb790190c7bfd484.tar.xz cwm-4454948f213d470ca3e6c087bb790190c7bfd484.zip |
cvsimport
Diffstat (limited to 'conf.c')
-rw-r--r-- | conf.c | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/conf.c b/conf.c index da51d4e..ce867cb 100644 --- a/conf.c +++ b/conf.c @@ -71,19 +71,28 @@ conf_cmd_remove(struct conf *c, const char *name) } } void -conf_autogroup(struct conf *c, int num, const char *val) +conf_autogroup(struct conf *c, int num, const char *name, const char *class) { struct autogroupwin *aw; char *p; aw = xmalloc(sizeof(*aw)); - if ((p = strchr(val, ',')) == NULL) { - aw->name = NULL; - aw->class = xstrdup(val); + if ((p = strchr(class, ',')) == NULL) { + if (name == NULL) + aw->name = NULL; + else + aw->name = xstrdup(name); + + aw->class = xstrdup(class); } else { *(p++) = '\0'; - aw->name = xstrdup(val); + + if (name == NULL) + aw->name = xstrdup(class); + else + aw->name = xstrdup(name); + aw->class = xstrdup(p); } aw->num = num; @@ -382,7 +391,7 @@ static const struct { {.i = CWM_CYCLE|CWM_INGROUP} }, { "rcycleingroup", kbfunc_client_cycle, CWM_WIN, {.i = CWM_RCYCLE|CWM_INGROUP} }, - { "grouptoggle", kbfunc_client_grouptoggle, CWM_WIN, {0}}, + { "grouptoggle", kbfunc_client_grouptoggle, CWM_WIN, {.i = 0}}, { "sticky", kbfunc_client_toggle_sticky, CWM_WIN, {0} }, { "fullscreen", kbfunc_client_toggle_fullscreen, CWM_WIN, {0} }, { "maximize", kbfunc_client_toggle_maximize, CWM_WIN, {0} }, @@ -451,7 +460,7 @@ static const struct { { "window_hide", kbfunc_client_hide, CWM_WIN, {0} }, { "window_move", mousefunc_client_move, CWM_WIN, {0} }, { "window_resize", mousefunc_client_resize, CWM_WIN, {0} }, - { "window_grouptoggle", mousefunc_client_grouptoggle, CWM_WIN, {0} }, + { "window_grouptoggle", kbfunc_client_grouptoggle, CWM_WIN, {.i = 1} }, { "menu_group", mousefunc_menu_group, 0, {0} }, { "menu_unhide", mousefunc_menu_unhide, 0, {0} }, { "menu_cmd", mousefunc_menu_cmd, 0, {0} }, |