Added config directive 'no_focus <criteria>' (#1416)

This commit is contained in:
Ingo Bürk
2015-03-29 17:30:14 +02:00
parent e155447932
commit b5f7c132fc
4 changed files with 25 additions and 1 deletions

View File

@ -431,6 +431,19 @@ CFGFUN(assign, const char *workspace) {
TAILQ_INSERT_TAIL(&assignments, assignment, assignments);
}
CFGFUN(no_focus) {
if (match_is_empty(current_match)) {
ELOG("Match is empty, ignoring this assignment\n");
return;
}
DLOG("new assignment, using above criteria, to ignore focus on manage");
Assignment *assignment = scalloc(sizeof(Assignment));
match_copy(&(assignment->match), current_match);
assignment->type = A_NO_FOCUS;
TAILQ_INSERT_TAIL(&assignments, assignment, assignments);
}
/*******************************************************************************
* Bar configuration (i3bar)
******************************************************************************/