summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/cwm/calmwm.h5
-rw-r--r--app/cwm/conf.c5
-rw-r--r--app/cwm/cwmrc.58
-rw-r--r--app/cwm/parse.y9
4 files changed, 19 insertions, 8 deletions
diff --git a/app/cwm/calmwm.h b/app/cwm/calmwm.h
index 675a6bd3e..96152cd7d 100644
--- a/app/cwm/calmwm.h
+++ b/app/cwm/calmwm.h
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: calmwm.h,v 1.76 2009/01/17 20:39:24 okan Exp $
+ * $Id: calmwm.h,v 1.77 2009/01/21 15:04:38 todd Exp $
*/
#ifndef _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/app/cwm/conf.c b/app/cwm/conf.c
index d55677d36..77264127c 100644
--- a/app/cwm/conf.c
+++ b/app/cwm/conf.c
@@ -15,7 +15,7 @@
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
- * $Id: conf.c,v 1.52 2009/01/16 15:24:14 okan Exp $
+ * $Id: conf.c,v 1.53 2009/01/21 15:04:38 todd Exp $
*/
#include "headers.h"
@@ -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/app/cwm/cwmrc.5 b/app/cwm/cwmrc.5
index 1a71e4a2c..b52171cd2 100644
--- a/app/cwm/cwmrc.5
+++ b/app/cwm/cwmrc.5
@@ -1,4 +1,4 @@
-.\" $OpenBSD: cwmrc.5,v 1.17 2008/09/22 14:35:16 oga Exp $
+.\" $OpenBSD: cwmrc.5,v 1.18 2009/01/21 15:04:38 todd Exp $
.\"
.\" Copyright (c) 2004,2005 Marius Aamodt Eriksen <marius@monkey.org>
.\"
@@ -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: September 22 2008 $
+.Dd $Mdocdate: January 21 2009 $
.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/app/cwm/parse.y b/app/cwm/parse.y
index 8df0e6e64..e3e3bf8c9 100644
--- a/app/cwm/parse.y
+++ b/app/cwm/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);