[wmfs, config] Add resizehint option ( tag option)
This commit is contained in:
18
config.c
18
config.c
@@ -204,10 +204,11 @@ init_conf(void)
|
|||||||
|
|
||||||
static cfg_opt_t tag_opts[] =
|
static cfg_opt_t tag_opts[] =
|
||||||
{
|
{
|
||||||
CFG_STR("name", "", CFGF_NONE),
|
CFG_STR("name", "", CFGF_NONE),
|
||||||
CFG_FLOAT("mwfact", 0.65, CFGF_NONE),
|
CFG_FLOAT("mwfact", 0.65, CFGF_NONE),
|
||||||
CFG_INT("nmaster", 1, CFGF_NONE),
|
CFG_INT("nmaster", 1, CFGF_NONE),
|
||||||
CFG_STR("layout", "tile", CFGF_NONE),
|
CFG_STR("layout", "tile", CFGF_NONE),
|
||||||
|
CFG_BOOL("resizehint", cfg_false, CFGF_NONE),
|
||||||
CFG_END()
|
CFG_END()
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -413,10 +414,11 @@ init_conf(void)
|
|||||||
for(i = 0; i < conf.ntag; ++i)
|
for(i = 0; i < conf.ntag; ++i)
|
||||||
{
|
{
|
||||||
cfgtmp = cfg_getnsec(cfg_tags, "tag", i);
|
cfgtmp = cfg_getnsec(cfg_tags, "tag", i);
|
||||||
conf.tag[i].name = strdup(cfg_getstr(cfgtmp, "name"));
|
conf.tag[i].name = strdup(cfg_getstr(cfgtmp, "name"));
|
||||||
conf.tag[i].mwfact = cfg_getfloat(cfgtmp, "mwfact");
|
conf.tag[i].mwfact = cfg_getfloat(cfgtmp, "mwfact");
|
||||||
conf.tag[i].nmaster = cfg_getint(cfgtmp, "nmaster");
|
conf.tag[i].nmaster = cfg_getint(cfgtmp, "nmaster");
|
||||||
conf.tag[i].layout = layout_name_to_struct(conf.layout, cfg_getstr(cfgtmp, "layout"));
|
conf.tag[i].resizehint = cfg_getbool(cfgtmp, "resizehint");
|
||||||
|
conf.tag[i].layout = layout_name_to_struct(conf.layout, cfg_getstr(cfgtmp, "layout"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
2
layout.c
2
layout.c
@@ -219,7 +219,7 @@ tile(void)
|
|||||||
else
|
else
|
||||||
h = th - (bord + conf.ttbarheight) - bord*2;
|
h = th - (bord + conf.ttbarheight) - bord*2;
|
||||||
}
|
}
|
||||||
moveresize(c, x, y, w, h, False);
|
moveresize(c, x, y, w, h, tags[seltag].resizehint);
|
||||||
if(n > nm && th != mht)
|
if(n > nm && th != mht)
|
||||||
y = c->y + c->h + bord + conf.ttbarheight;
|
y = c->y + c->h + bord + conf.ttbarheight;
|
||||||
}
|
}
|
||||||
|
|||||||
1
wmfs.h
1
wmfs.h
@@ -127,6 +127,7 @@ typedef struct
|
|||||||
char *name;
|
char *name;
|
||||||
float mwfact;
|
float mwfact;
|
||||||
int nmaster;
|
int nmaster;
|
||||||
|
Bool resizehint;
|
||||||
Layout layout;
|
Layout layout;
|
||||||
} Tag;
|
} Tag;
|
||||||
|
|
||||||
|
|||||||
2
wmfsrc
2
wmfsrc
@@ -60,7 +60,7 @@ layouts
|
|||||||
|
|
||||||
tags
|
tags
|
||||||
{
|
{
|
||||||
tag { name = "one" mwfact = 0.65 nmaster = 2 layout = "tile" }
|
tag { name = "one" mwfact = 0.65 nmaster = 2 layout = "tile" resizehint = false }
|
||||||
tag { name = "two" }
|
tag { name = "two" }
|
||||||
tag { name = "three" }
|
tag { name = "three" }
|
||||||
tag { name = "four" }
|
tag { name = "four" }
|
||||||
|
|||||||
Reference in New Issue
Block a user