mirror of
https://github.com/leahneukirchen/cwm.git
synced 2023-08-10 21:13:12 +03:00
borderwidth as a cwmrc(5) keyword, really helps debugging
from okan@ ok oga@
This commit is contained in:
parent
0548673f2f
commit
1b269199c1
3
calmwm.h
3
calmwm.h
@ -79,7 +79,6 @@ TAILQ_HEAD(screen_ctx_q, screen_ctx);
|
|||||||
#define CLIENT_DOVMAXIMIZE 0x10
|
#define CLIENT_DOVMAXIMIZE 0x10
|
||||||
#define CLIENT_VMAXIMIZED 0x20
|
#define CLIENT_VMAXIMIZED 0x20
|
||||||
|
|
||||||
#define CLIENT_BWIDTH 1
|
|
||||||
#define CLIENT_HIGHLIGHT_BLUE 1
|
#define CLIENT_HIGHLIGHT_BLUE 1
|
||||||
#define CLIENT_HIGHLIGHT_RED 2
|
#define CLIENT_HIGHLIGHT_RED 2
|
||||||
|
|
||||||
@ -250,6 +249,8 @@ struct conf {
|
|||||||
|
|
||||||
#define CONF_STICKY_GROUPS 0x0001
|
#define CONF_STICKY_GROUPS 0x0001
|
||||||
int flags;
|
int flags;
|
||||||
|
#define CONF_BWIDTH 1
|
||||||
|
int bwidth;
|
||||||
|
|
||||||
char termpath[MAXPATHLEN];
|
char termpath[MAXPATHLEN];
|
||||||
char lockpath[MAXPATHLEN];
|
char lockpath[MAXPATHLEN];
|
||||||
|
3
conf.c
3
conf.c
@ -76,6 +76,7 @@ void
|
|||||||
conf_init(struct conf *c)
|
conf_init(struct conf *c)
|
||||||
{
|
{
|
||||||
c->flags = 0;
|
c->flags = 0;
|
||||||
|
c->bwidth = CONF_BWIDTH;
|
||||||
|
|
||||||
TAILQ_INIT(&c->ignoreq);
|
TAILQ_INIT(&c->ignoreq);
|
||||||
TAILQ_INIT(&c->cmdq);
|
TAILQ_INIT(&c->cmdq);
|
||||||
@ -201,7 +202,7 @@ conf_client(struct client_ctx *cc)
|
|||||||
} else
|
} else
|
||||||
ignore = 1;
|
ignore = 1;
|
||||||
|
|
||||||
cc->bwidth = ignore ? 0 : CLIENT_BWIDTH;
|
cc->bwidth = ignore ? 0 : Conf.bwidth;
|
||||||
cc->flags |= ignore ? CLIENT_IGNORE : 0;
|
cc->flags |= ignore ? CLIENT_IGNORE : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
6
cwmrc.5
6
cwmrc.5
@ -15,7 +15,7 @@
|
|||||||
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
.\"
|
.\"
|
||||||
.\" The following requests are required for all man pages.
|
.\" The following requests are required for all man pages.
|
||||||
.Dd $Mdocdate: July 11 2008 $
|
.Dd $Mdocdate: September 22 2008 $
|
||||||
.Dt CWMRC 5
|
.Dt CWMRC 5
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.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
|
This can be used to remove a binding which conflicts with an
|
||||||
application.
|
application.
|
||||||
.Pp
|
.Pp
|
||||||
|
.It Ic borderwidth Ar pixels
|
||||||
|
Set the window border width to
|
||||||
|
.Ar pixels .
|
||||||
|
.Pp
|
||||||
.It Ic command Ar name Ar path
|
.It Ic command Ar name Ar path
|
||||||
Every
|
Every
|
||||||
.Ar name
|
.Ar name
|
||||||
|
7
parse.y
7
parse.y
@ -66,7 +66,7 @@ typedef struct {
|
|||||||
|
|
||||||
%token FONTNAME STICKY GAP MOUSEBIND
|
%token FONTNAME STICKY GAP MOUSEBIND
|
||||||
%token AUTOGROUP BIND COMMAND IGNORE
|
%token AUTOGROUP BIND COMMAND IGNORE
|
||||||
%token YES NO
|
%token YES NO BORDERWIDTH
|
||||||
%token ERROR
|
%token ERROR
|
||||||
%token <v.string> STRING
|
%token <v.string> STRING
|
||||||
%token <v.number> NUMBER
|
%token <v.number> NUMBER
|
||||||
@ -107,6 +107,9 @@ main : FONTNAME STRING {
|
|||||||
else
|
else
|
||||||
conf->flags |= CONF_STICKY_GROUPS;
|
conf->flags |= CONF_STICKY_GROUPS;
|
||||||
}
|
}
|
||||||
|
| BORDERWIDTH NUMBER {
|
||||||
|
conf->bwidth = $2;
|
||||||
|
}
|
||||||
| COMMAND STRING string {
|
| COMMAND STRING string {
|
||||||
conf_cmd_add(conf, $3, $2, 0);
|
conf_cmd_add(conf, $3, $2, 0);
|
||||||
free($2);
|
free($2);
|
||||||
@ -198,6 +201,7 @@ lookup(char *s)
|
|||||||
static const struct keywords keywords[] = {
|
static const struct keywords keywords[] = {
|
||||||
{ "autogroup", AUTOGROUP},
|
{ "autogroup", AUTOGROUP},
|
||||||
{ "bind", BIND},
|
{ "bind", BIND},
|
||||||
|
{ "borderwidth", BORDERWIDTH},
|
||||||
{ "command", COMMAND},
|
{ "command", COMMAND},
|
||||||
{ "fontname", FONTNAME},
|
{ "fontname", FONTNAME},
|
||||||
{ "gap", GAP},
|
{ "gap", GAP},
|
||||||
@ -538,6 +542,7 @@ parse_config(const char *filename, struct conf *xconf)
|
|||||||
conf_clear(xconf);
|
conf_clear(xconf);
|
||||||
|
|
||||||
xconf->flags = conf->flags;
|
xconf->flags = conf->flags;
|
||||||
|
xconf->bwidth = conf->bwidth;
|
||||||
|
|
||||||
while ((cmd = TAILQ_FIRST(&conf->cmdq)) != NULL) {
|
while ((cmd = TAILQ_FIRST(&conf->cmdq)) != NULL) {
|
||||||
TAILQ_REMOVE(&conf->cmdq, cmd, entry);
|
TAILQ_REMOVE(&conf->cmdq, cmd, entry);
|
||||||
|
Loading…
Reference in New Issue
Block a user