diff options
-rw-r--r-- | calmwm.h | 2 | ||||
-rw-r--r-- | cwmrc.5 | 6 | ||||
-rw-r--r-- | group.c | 3 | ||||
-rw-r--r-- | parse.y | 2 |
4 files changed, 10 insertions, 3 deletions
diff --git a/calmwm.h b/calmwm.h index 5ac1b8d..8fbf31f 100644 --- a/calmwm.h +++ b/calmwm.h @@ -159,7 +159,7 @@ struct client_ctx { TAILQ_HEAD(client_ctx_q, client_ctx); static char *shortcut_to_name[] = { - "XXX", "one", "two", "three", + "nogroup", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }; diff --git a/cwmrc.5 b/cwmrc.5 index c679c05..1b8c6b3 100644 --- a/cwmrc.5 +++ b/cwmrc.5 @@ -33,7 +33,11 @@ The following options are accepted in the configuration file: Control automatic window grouping, based on the class and/or name properties, where .Ar group -is a number between 1 and 9. +is a number between 0 and 9. +If the group number is 0, then the window will not be grouped; this to +allow for +.Dq sticky +windows in sticky group mode. .Pp The class and name of a window may be obtained using .Xr xprop 1 . diff --git a/group.c b/group.c index 616f30b..589015a 100644 --- a/group.c +++ b/group.c @@ -328,6 +328,9 @@ group_autogroup(struct client_ctx *cc) } } + if (strncmp("nogroup", group, 7) == 0) + return; + TAILQ_FOREACH(gc, &Groupq, entry) { if (strcmp(shortcut_to_name[gc->shortcut], group) == 0) { _group_add(gc, cc); diff --git a/parse.y b/parse.y index cf75142..bcdd4b1 100644 --- a/parse.y +++ b/parse.y @@ -125,7 +125,7 @@ main : FONTNAME STRING { struct autogroupwin *aw; char *p; - if ($2 < 1 || $2 > 9) { + if ($2 < 0 || $2 > 9) { free($3); yyerror("autogroup number out of range: %d", $2); YYERROR; |