Add tab rule
This commit is contained in:
parent
e484510f52
commit
688dfb34d2
@ -875,20 +875,21 @@ client_apply_rule(struct client *c)
|
||||
|
||||
c->theme = r->theme;
|
||||
|
||||
/* free = false for originally free client */
|
||||
if(r->flags & RULE_FREE)
|
||||
c->flags |= CLIENT_FREE;
|
||||
/* free = false for originally free client */
|
||||
else
|
||||
c->flags &= ~CLIENT_FREE;
|
||||
|
||||
/* Free rule is not compatible with tab rule */
|
||||
if(r->flags & RULE_TAB)
|
||||
W->flags ^= WMFS_TABNOC; /* < can be disable by client_tab_next_opened */
|
||||
|
||||
/* TODO
|
||||
if(r->flags & RULE_MAX)
|
||||
{}
|
||||
|
||||
if(r->flags & RULE_IGNORE_TAG)
|
||||
{}
|
||||
*/
|
||||
|
||||
c->flags |= CLIENT_RULED;
|
||||
}
|
||||
flags = 0;
|
||||
|
||||
@ -264,7 +264,7 @@ config_rule(void)
|
||||
r->tag = fetch_opt_first(ks[i], "-1", "tag").num;
|
||||
|
||||
FLAGAPPLY(r->flags, fetch_opt_first(ks[i], "false", "free").boolean, RULE_FREE);
|
||||
FLAGAPPLY(r->flags, fetch_opt_first(ks[i], "false", "max").boolean, RULE_MAX);
|
||||
FLAGAPPLY(r->flags, fetch_opt_first(ks[i], "false", "tab").boolean, RULE_TAB);
|
||||
FLAGAPPLY(r->flags, fetch_opt_first(ks[i], "false", "ignore_tag").boolean, RULE_IGNORE_TAG);
|
||||
|
||||
if((tn = fetch_opt_first(ks[i], "", "theme").str))
|
||||
|
||||
@ -389,6 +389,7 @@ layout_split_integrate(struct client *c, struct client *sc)
|
||||
{
|
||||
client_maximize(c);
|
||||
c->flags |= CLIENT_TILED;
|
||||
W->flags &= ~WMFS_TABNOC;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
#define LAYOUT_H
|
||||
|
||||
#include "wmfs.h"
|
||||
#include "client.h"
|
||||
|
||||
/* Check lateral direction (if p is Right or Left) */
|
||||
#define LDIR(P) (P < Top)
|
||||
|
||||
@ -102,8 +102,6 @@ tag_client(struct tag *t, struct client *c)
|
||||
|
||||
infobar_elem_screen_update(t->screen, ElemTag);
|
||||
|
||||
layout_client(c);
|
||||
|
||||
if(c->flags & CLIENT_TABMASTER && c->prevtag)
|
||||
{
|
||||
struct client *cc;
|
||||
@ -116,6 +114,8 @@ tag_client(struct tag *t, struct client *c)
|
||||
}
|
||||
}
|
||||
|
||||
layout_client(c);
|
||||
|
||||
if(t != c->screen->seltag || c->flags & CLIENT_TABBED)
|
||||
client_unmap(c);
|
||||
}
|
||||
|
||||
@ -274,7 +274,7 @@ struct rule
|
||||
char *name;
|
||||
int tag, screen;
|
||||
#define RULE_FREE 0x01
|
||||
#define RULE_MAX 0x02
|
||||
#define RULE_TAB 0x02
|
||||
#define RULE_IGNORE_TAG 0x04
|
||||
Flags flags;
|
||||
SLIST_ENTRY(rule) next;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user