[config] Add tag separation width option

This commit is contained in:
Martin Duquesnoy 2008-10-09 02:01:29 +02:00
parent 50a6a096cf
commit ec42111a32
4 changed files with 10 additions and 7 deletions

View File

@ -155,11 +155,12 @@ init_conf(void)
static cfg_opt_t misc_opts[] =
{
CFG_STR("bar_position", "top", CFGF_NONE),
CFG_BOOL("raisefocus", cfg_false, CFGF_NONE),
CFG_BOOL("raiseswitch", cfg_true, CFGF_NONE),
CFG_INT("border_height", 1, CFGF_NONE),
CFG_INT("titlebar_height", 0, CFGF_NONE),
CFG_STR("bar_position", "top", CFGF_NONE),
CFG_BOOL("raisefocus", cfg_false, CFGF_NONE),
CFG_BOOL("raiseswitch", cfg_true, CFGF_NONE),
CFG_INT("border_height", 1, CFGF_NONE),
CFG_INT("titlebar_height", 0, CFGF_NONE),
CFG_INT("tag_separation_width", 0, CFGF_NONE),
CFG_END()
};
@ -340,6 +341,7 @@ init_conf(void)
conf.raiseswitch = cfg_getbool(cfg_misc, "raiseswitch");
conf.borderheight = cfg_getint(cfg_misc, "border_height");
conf.ttbarheight = cfg_getint(cfg_misc, "titlebar_height");
conf.tagsepwidth = cfg_getint(cfg_misc, "tag_separation_width");
conf.bartop = (strcmp(strdup(cfg_getstr(cfg_misc, "bar_position")), "top") == 0) ? True : False;
/* font */
@ -348,7 +350,6 @@ init_conf(void)
conf.font.size = cfg_getint(cfg_font, "size");
/* colors */
conf.colors.background = getcolor(var_to_str(cfg_getstr(cfg_colors, "background")));
conf.colors.bordernormal = getcolor(var_to_str(cfg_getstr(cfg_colors, "border_normal")));
conf.colors.borderfocus = getcolor(var_to_str(cfg_getstr(cfg_colors, "border_focus")));

2
wmfs.c
View File

@ -961,7 +961,7 @@ updatebar(void)
/* Tags line separation */
XSetForeground(dpy, gc, conf.colors.tagsep);
if(i > 0)
XFillRectangle(dpy, dr, gc, taglen[i]-sp, 0, 2, barheight);
XFillRectangle(dpy, dr, gc, taglen[i]-sp, 0, conf.tagsepwidth, barheight);
}
/* Layout symbol */

1
wmfs.h
View File

@ -139,6 +139,7 @@ typedef struct
bool bartop;
int borderheight;
int ttbarheight;
int tagsepwidth;
struct
{
char *face;

1
wmfsrc
View File

@ -12,6 +12,7 @@ misc
raiseswitch = true
border_height = 1
titlebar_height = 12
tag_separation_width = 0
}
font