diff options
author | okan | 2020-04-16 13:32:35 +0000 |
---|---|---|
committer | Wynn Wolf Arbor | 2020-04-18 21:10:54 +0200 |
commit | 23c5b2e81239675802d7cfe1b1572d89620f7485 (patch) | |
tree | 9bbfab1efe388cccad725ac60c01c85ae78a9e35 /parse.y | |
parent | 15fd9c391223d87228a49ec13ae4051bee4c0a55 (diff) | |
download | cwm-23c5b2e81239675802d7cfe1b1572d89620f7485.tar.gz |
Allow configuring a percentage window size of the master window during htile/vtile actions. From Uwe Werler, with a few manpage tweaks.
Diffstat (limited to '')
-rw-r--r-- | parse.y | 20 |
1 files changed, 18 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $OpenBSD: parse.y,v 1.72 2018/11/09 16:00:54 okan Exp $ */ +/* $OpenBSD: parse.y,v 1.73 2020/04/16 13:32:35 okan Exp $ */ /* * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -71,7 +71,7 @@ typedef struct { %token BINDKEY UNBINDKEY BINDMOUSE UNBINDMOUSE %token FONTNAME STICKY GAP %token AUTOGROUP COMMAND IGNORE WM -%token YES NO BORDERWIDTH MOVEAMOUNT +%token YES NO BORDERWIDTH MOVEAMOUNT HTILE VTILE %token COLOR SNAPDIST %token ACTIVEBORDER INACTIVEBORDER URGENCYBORDER %token GROUPBORDER UNGROUPBORDER @@ -122,6 +122,20 @@ main : FONTNAME STRING { } conf->bwidth = $2; } + | HTILE NUMBER { + if ($2 < 0 || $2 > 99) { + yyerror("invalid htile percent"); + YYERROR; + } + conf->htile = $2; + } + | VTILE NUMBER { + if ($2 < 0 || $2 > 99) { + yyerror("invalid vtile percent"); + YYERROR; + } + conf->vtile = $2; + } | MOVEAMOUNT NUMBER { if ($2 < 0 || $2 > INT_MAX) { yyerror("invalid movemount"); @@ -316,6 +330,7 @@ lookup(char *s) { "fontname", FONTNAME}, { "gap", GAP}, { "groupborder", GROUPBORDER}, + { "htile", HTILE}, { "ignore", IGNORE}, { "inactiveborder", INACTIVEBORDER}, { "menubg", MENUBG}, @@ -329,6 +344,7 @@ lookup(char *s) { "unbind-mouse", UNBINDMOUSE}, { "ungroupborder", UNGROUPBORDER}, { "urgencyborder", URGENCYBORDER}, + { "vtile", VTILE}, { "wm", WM}, { "yes", YES} }; |