Add feature for following a client that is open in a different tag.
Feature requested by anonymous_user on the wmfs thread in the archlinux.org forum
This commit is contained in:
@@ -1107,6 +1107,9 @@ client_set_rules(Client *c)
|
||||
|
||||
if(!conf.rule[i].ignoretags)
|
||||
tags[c->screen][c->tag].layout.func(c->screen);
|
||||
|
||||
if(conf.rule[i].follow_client)
|
||||
seltag[c->screen] = c->tag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
17
src/config.c
17
src/config.c
@@ -628,14 +628,15 @@ conf_rule_section(void)
|
||||
|
||||
for(i = 0; i < conf.nrule; ++i)
|
||||
{
|
||||
conf.rule[i].class = fetch_opt_first(rule[i], "", "class").str;
|
||||
conf.rule[i].instance = fetch_opt_first(rule[i], "", "instance").str;
|
||||
conf.rule[i].role = fetch_opt_first(rule[i], "", "role").str;
|
||||
conf.rule[i].screen = fetch_opt_first(rule[i], "-1", "screen").num;
|
||||
conf.rule[i].tag = fetch_opt_first(rule[i], "-1", "tag").num;
|
||||
conf.rule[i].free = fetch_opt_first(rule[i], "false", "free").bool;
|
||||
conf.rule[i].max = fetch_opt_first(rule[i], "false", "max").bool;
|
||||
conf.rule[i].ignoretags = fetch_opt_first(rule[i], "false", "ignoretags").bool;
|
||||
conf.rule[i].class = fetch_opt_first(rule[i], "", "class").str;
|
||||
conf.rule[i].instance = fetch_opt_first(rule[i], "", "instance").str;
|
||||
conf.rule[i].role = fetch_opt_first(rule[i], "", "role").str;
|
||||
conf.rule[i].screen = fetch_opt_first(rule[i], "-1", "screen").num;
|
||||
conf.rule[i].tag = fetch_opt_first(rule[i], "-1", "tag").num;
|
||||
conf.rule[i].free = fetch_opt_first(rule[i], "false", "free").bool;
|
||||
conf.rule[i].max = fetch_opt_first(rule[i], "false", "max").bool;
|
||||
conf.rule[i].ignoretags = fetch_opt_first(rule[i], "false", "ignoretags").bool;
|
||||
conf.rule[i].follow_client = fetch_opt_first(rule[i], "false", "follow_client").bool;
|
||||
}
|
||||
|
||||
free(rule);
|
||||
|
||||
@@ -365,6 +365,7 @@ typedef struct
|
||||
Bool free;
|
||||
Bool max;
|
||||
Bool ignoretags;
|
||||
Bool follow_client;
|
||||
} Rule;
|
||||
|
||||
/* Configuration structure */
|
||||
|
||||
Reference in New Issue
Block a user