Implement new criterion 'workspace'.
If the match expression is a plain number (e.g., '99'), the number of a workspace will be compared strictly. Otherwise, the match expression is taken as a regular expression and compared against the workspace's name. This allows all of the following: for_window [workspace=5] ... for_window [workspace="5:foo"] ... for_window [workspace="foo"] ... fixes #1769
This commit is contained in:
@ -411,6 +411,11 @@ void cmd_criteria_add(I3_CMD, char *ctype, char *cvalue) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (strcmp(ctype, "workspace") == 0) {
|
||||
current_match->workspace = regex_new(cvalue);
|
||||
return;
|
||||
}
|
||||
|
||||
ELOG("Unknown criterion: %s\n", ctype);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user