diff --git a/calmwm.h b/calmwm.h index 7c7f53b..83dadde 100644 --- a/calmwm.h +++ b/calmwm.h @@ -79,7 +79,6 @@ TAILQ_HEAD(screen_ctx_q, screen_ctx); #define CLIENT_DOVMAXIMIZE 0x10 #define CLIENT_VMAXIMIZED 0x20 -#define CLIENT_BWIDTH 1 #define CLIENT_HIGHLIGHT_BLUE 1 #define CLIENT_HIGHLIGHT_RED 2 @@ -250,6 +249,8 @@ struct conf { #define CONF_STICKY_GROUPS 0x0001 int flags; +#define CONF_BWIDTH 1 + int bwidth; char termpath[MAXPATHLEN]; char lockpath[MAXPATHLEN]; diff --git a/conf.c b/conf.c index 74a07af..f31c34e 100644 --- a/conf.c +++ b/conf.c @@ -76,6 +76,7 @@ void conf_init(struct conf *c) { c->flags = 0; + c->bwidth = CONF_BWIDTH; TAILQ_INIT(&c->ignoreq); TAILQ_INIT(&c->cmdq); @@ -201,7 +202,7 @@ conf_client(struct client_ctx *cc) } else ignore = 1; - cc->bwidth = ignore ? 0 : CLIENT_BWIDTH; + cc->bwidth = ignore ? 0 : Conf.bwidth; cc->flags |= ignore ? CLIENT_IGNORE : 0; } diff --git a/cwmrc.5 b/cwmrc.5 index 353e71d..b4190b5 100644 --- a/cwmrc.5 +++ b/cwmrc.5 @@ -15,7 +15,7 @@ .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .\" The following requests are required for all man pages. -.Dd $Mdocdate: July 11 2008 $ +.Dd $Mdocdate: September 22 2008 $ .Dt CWMRC 5 .Os .Sh NAME @@ -81,6 +81,10 @@ can be used to remove the named keybinding. This can be used to remove a binding which conflicts with an application. .Pp +.It Ic borderwidth Ar pixels +Set the window border width to +.Ar pixels . +.Pp .It Ic command Ar name Ar path Every .Ar name diff --git a/parse.y b/parse.y index 9e69b91..1d98eb7 100644 --- a/parse.y +++ b/parse.y @@ -66,7 +66,7 @@ typedef struct { %token FONTNAME STICKY GAP MOUSEBIND %token AUTOGROUP BIND COMMAND IGNORE -%token YES NO +%token YES NO BORDERWIDTH %token ERROR %token STRING %token NUMBER @@ -107,6 +107,9 @@ main : FONTNAME STRING { else conf->flags |= CONF_STICKY_GROUPS; } + | BORDERWIDTH NUMBER { + conf->bwidth = $2; + } | COMMAND STRING string { conf_cmd_add(conf, $3, $2, 0); free($2); @@ -198,6 +201,7 @@ lookup(char *s) static const struct keywords keywords[] = { { "autogroup", AUTOGROUP}, { "bind", BIND}, + { "borderwidth", BORDERWIDTH}, { "command", COMMAND}, { "fontname", FONTNAME}, { "gap", GAP}, @@ -538,6 +542,7 @@ parse_config(const char *filename, struct conf *xconf) conf_clear(xconf); xconf->flags = conf->flags; + xconf->bwidth = conf->bwidth; while ((cmd = TAILQ_FIRST(&conf->cmdq)) != NULL) { TAILQ_REMOVE(&conf->cmdq, cmd, entry);