about summary refs log tree commit diff
path: root/parse.y
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-05-14 23:39:56 +0200
committerLeah Neukirchen <leah@vuxu.org>2020-05-14 23:39:56 +0200
commit3a570bb6793264f8d30e7c3c20951b9631450fd0 (patch)
treef4630a6e716ded7ca202a155e4be3e6a7eec083a /parse.y
parent5fde2a2465dff28cdd3f753bd1d18656ae4b5660 (diff)
parent91c05f94032debb645c14c76c9911ea5cfba5d3c (diff)
downloadcwm-3a570bb6793264f8d30e7c3c20951b9631450fd0.tar.gz
cwm-3a570bb6793264f8d30e7c3c20951b9631450fd0.tar.xz
cwm-3a570bb6793264f8d30e7c3c20951b9631450fd0.zip
cvsimport
* refs/heads/master:
  Fixed memory leak in xu_get_strprop.
  Prevent out of boundary write with configuration files in which too many quoted arguments are stored for other window managers.
  Allow configuring a percentage window size of the master window during htile/vtile actions. From Uwe Werler, with a few manpage tweaks.
  zap stray tabs
  Instead of using _NET_ACTIVE_WINDOW on restart, use the pointer location to determine what client to set active. Reduces a round trip for every window.
  Add support for SIGINT/SIGTERM.
  Simplify conditional construct.
  Trim event_mask to those that the root window actually needs.
  No need to lookup current client early; move to right before it is needed.
  Recommit 1.259, but now with TAILQ_FOREACH_SAFE.
  Revert previous. Causes a crash as reported by Tom Murphy.
  Simplify list markup.
  Plug two memory leaks. Also get rid of a variable that is no longer necessary.
  Remove ColormaskChange from event-mask since there's no event handler.
  Unrelated style fixes, consistency changes and sorting, appropriate dosage/removal of wrappers, simplification of name queue, client cycle joins other kb/mb bound functions.
Diffstat (limited to 'parse.y')
-rw-r--r--parse.y18
1 files changed, 17 insertions, 1 deletions
diff --git a/parse.y b/parse.y
index f115cd4..383b2dd 100644
--- a/parse.y
+++ b/parse.y
@@ -73,7 +73,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
@@ -124,6 +124,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");
@@ -318,6 +332,7 @@ lookup(char *s)
 		{ "fontname",		FONTNAME},
 		{ "gap",		GAP},
 		{ "groupborder",	GROUPBORDER},
+		{ "htile",		HTILE},
 		{ "ignore",		IGNORE},
 		{ "inactiveborder",	INACTIVEBORDER},
 		{ "menubg",		MENUBG},
@@ -331,6 +346,7 @@ lookup(char *s)
 		{ "unbind-mouse",	UNBINDMOUSE},
 		{ "ungroupborder",	UNGROUPBORDER},
 		{ "urgencyborder",	URGENCYBORDER},
+		{ "vtile",		VTILE},
 		{ "wm",			WM},
 		{ "yes",		YES}
 	};