mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
allow an autogroup value of 0 to mean no group. This means you can set
automatically "sticky" (in the traditional sense of the word) windows in autogroup mode. Based on an initial diff from Andrew Fresh, thanks! ok okan@.
This commit is contained in:
parent
d347aa3d9a
commit
71f99ab78f
2
calmwm.h
2
calmwm.h
@ -159,7 +159,7 @@ struct client_ctx {
|
|||||||
TAILQ_HEAD(client_ctx_q, client_ctx);
|
TAILQ_HEAD(client_ctx_q, client_ctx);
|
||||||
|
|
||||||
static char *shortcut_to_name[] = {
|
static char *shortcut_to_name[] = {
|
||||||
"XXX", "one", "two", "three",
|
"nogroup", "one", "two", "three",
|
||||||
"four", "five", "six", "seven",
|
"four", "five", "six", "seven",
|
||||||
"eight", "nine"
|
"eight", "nine"
|
||||||
};
|
};
|
||||||
|
6
cwmrc.5
6
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
|
Control automatic window grouping, based on the class and/or name
|
||||||
properties, where
|
properties, where
|
||||||
.Ar group
|
.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
|
.Pp
|
||||||
The class and name of a window may be obtained using
|
The class and name of a window may be obtained using
|
||||||
.Xr xprop 1 .
|
.Xr xprop 1 .
|
||||||
|
3
group.c
3
group.c
@ -328,6 +328,9 @@ group_autogroup(struct client_ctx *cc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (strncmp("nogroup", group, 7) == 0)
|
||||||
|
return;
|
||||||
|
|
||||||
TAILQ_FOREACH(gc, &Groupq, entry) {
|
TAILQ_FOREACH(gc, &Groupq, entry) {
|
||||||
if (strcmp(shortcut_to_name[gc->shortcut], group) == 0) {
|
if (strcmp(shortcut_to_name[gc->shortcut], group) == 0) {
|
||||||
_group_add(gc, cc);
|
_group_add(gc, cc);
|
||||||
|
2
parse.y
2
parse.y
@ -125,7 +125,7 @@ main : FONTNAME STRING {
|
|||||||
struct autogroupwin *aw;
|
struct autogroupwin *aw;
|
||||||
char *p;
|
char *p;
|
||||||
|
|
||||||
if ($2 < 1 || $2 > 9) {
|
if ($2 < 0 || $2 > 9) {
|
||||||
free($3);
|
free($3);
|
||||||
yyerror("autogroup number out of range: %d", $2);
|
yyerror("autogroup number out of range: %d", $2);
|
||||||
YYERROR;
|
YYERROR;
|
||||||
|
Loading…
Reference in New Issue
Block a user