[PATCH] Add a ignoretags rule
This commit is contained in:
parent
47a68568fe
commit
abf71d99b9
@ -1081,6 +1081,9 @@ client_set_rules(Client *c)
|
||||
if(conf.rule[i].free)
|
||||
c->flags |= FreeFlag;
|
||||
|
||||
if(conf.rule[i].ignoretags)
|
||||
c->tag = MAXTAG + 1;
|
||||
|
||||
if(conf.rule[i].max)
|
||||
{
|
||||
client_maximize(c);
|
||||
@ -1093,7 +1096,8 @@ client_set_rules(Client *c)
|
||||
client_focus(NULL);
|
||||
}
|
||||
|
||||
tags[c->screen][c->tag].layout.func(c->screen);
|
||||
if(! conf.rule[i].ignoretags)
|
||||
tags[c->screen][c->tag].layout.func(c->screen);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
15
src/config.c
15
src/config.c
@ -623,13 +623,14 @@ 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].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;
|
||||
}
|
||||
|
||||
free(rule);
|
||||
|
||||
@ -231,7 +231,7 @@ infobar_draw_taglist(int sc)
|
||||
is_occupied[i] = False;
|
||||
|
||||
for(c = clients; c; c = c->next)
|
||||
if(c->screen == sc)
|
||||
if(c->screen == sc && c->tag != MAXTAG + 1)
|
||||
is_occupied[c->tag] = True;
|
||||
|
||||
for(i = 1, x = 0; i < conf.ntag[sc] + 1; ++i)
|
||||
|
||||
@ -363,6 +363,7 @@ typedef struct
|
||||
int tag;
|
||||
Bool free;
|
||||
Bool max;
|
||||
Bool ignoretags;
|
||||
} Rule;
|
||||
|
||||
/* Configuration structure */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user