aboutsummaryrefslogtreecommitdiffstats
path: root/parse.y
diff options
context:
space:
mode:
authortodd2009-01-21 15:04:38 +0000
committertodd2009-01-21 15:04:38 +0000
commit24a656d337d28ac3784e1e9abe0f21187f240764 (patch)
tree3dabd271cb5402c4838bbf546adc2afc66a167fa /parse.y
parent02245bb4600c5570550f017affc64e992d4021d8 (diff)
downloadcwm-24a656d337d28ac3784e1e9abe0f21187f240764.tar.gz
borderwidth as a cwmrc(5) keyword, really helps debugging
from okan@ ok oga@
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y9
1 files changed, 7 insertions, 2 deletions
diff --git a/parse.y b/parse.y
index 8df0e6e..e3e3bf8 100644
--- a/parse.y
+++ b/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.15 2009/01/11 21:46:48 oga Exp $ */
+/* $OpenBSD: parse.y,v 1.16 2009/01/21 15:04:38 todd Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -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 <v.string> STRING
%token <v.number> 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);