From ec42111a32458130d6b9a8c722b3453d1119437b Mon Sep 17 00:00:00 2001 From: Martin Duquesnoy Date: Thu, 9 Oct 2008 02:01:29 +0200 Subject: [PATCH] [config] Add tag separation width option --- config.c | 13 +++++++------ wmfs.c | 2 +- wmfs.h | 1 + wmfsrc | 1 + 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/config.c b/config.c index 4a92ac4..f62ba48 100644 --- a/config.c +++ b/config.c @@ -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"))); diff --git a/wmfs.c b/wmfs.c index d0b721f..d78cbb3 100644 --- a/wmfs.c +++ b/wmfs.c @@ -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 */ diff --git a/wmfs.h b/wmfs.h index c7bc4b9..328609b 100644 --- a/wmfs.h +++ b/wmfs.h @@ -139,6 +139,7 @@ typedef struct bool bartop; int borderheight; int ttbarheight; + int tagsepwidth; struct { char *face; diff --git a/wmfsrc b/wmfsrc index 1b5fa1d..4fcc213 100644 --- a/wmfsrc +++ b/wmfsrc @@ -12,6 +12,7 @@ misc raiseswitch = true border_height = 1 titlebar_height = 12 + tag_separation_width = 0 } font