+new_container:
+ TOKNEWCONTAINER WHITESPACE TOKCONTAINERMODE
+ {
+ DLOG("new containers will be in mode %d\n", $<number>3);
+ config.container_mode = $<number>3;
+
+#if 0
+ /* We also need to change the layout of the already existing
+ * workspaces here. Workspaces may exist at this point because
+ * of the other directives which are modifying workspaces
+ * (setting the preferred screen or name). While the workspace
+ * objects are already created, they have never been used.
+ * Thus, the user very likely awaits the default container mode
+ * to trigger in this case, regardless of where it is inside
+ * his configuration file. */
+ Workspace *ws;
+ TAILQ_FOREACH(ws, workspaces, workspaces) {
+ if (ws->table == NULL)
+ continue;
+ switch_layout_mode(global_conn,
+ ws->table[0][0],
+ config.container_mode);
+ }
+#endif
+ }
+ | TOKNEWCONTAINER WHITESPACE TOKSTACKLIMIT WHITESPACE TOKSTACKLIMIT WHITESPACE NUMBER
+ {
+ DLOG("stack-limit %d with val %d\n", $<number>5, $<number>7);
+ config.container_stack_limit = $<number>5;
+ config.container_stack_limit_value = $<number>7;
+
+#if 0
+ /* See the comment above */
+ Workspace *ws;
+ TAILQ_FOREACH(ws, workspaces, workspaces) {
+ if (ws->table == NULL)
+ continue;
+ Container *con = ws->table[0][0];
+ con->stack_limit = config.container_stack_limit;
+ con->stack_limit_value = config.container_stack_limit_value;
+ }
+#endif
+ }
+ ;
+
+new_window:
+ TOKNEWWINDOW WHITESPACE WORD
+ {
+ DLOG("new windows should start in mode %s\n", $<string>3);
+ config.default_border = sstrdup($<string>3);
+ }
+ ;
+
+bool:
+ NUMBER
+ {
+ $<number>$ = ($<number>1 == 1);
+ }
+ | WORD
+ {
+ DLOG("checking word \"%s\"\n", $<string>1);
+ $<number>$ = (strcasecmp($<string>1, "yes") == 0 ||
+ strcasecmp($<string>1, "true") == 0 ||
+ strcasecmp($<string>1, "on") == 0 ||
+ strcasecmp($<string>1, "enable") == 0 ||
+ strcasecmp($<string>1, "active") == 0);
+ }
+ ;
+
+focus_follows_mouse:
+ TOKFOCUSFOLLOWSMOUSE WHITESPACE bool
+ {
+ DLOG("focus follows mouse = %d\n", $<number>3);
+ config.disable_focus_follows_mouse = !($<number>3);
+ }
+ ;
+
+workspace_bar:
+ TOKWORKSPACEBAR WHITESPACE bool
+ {
+ DLOG("workspace bar = %d\n", $<number>3);
+ config.disable_workspace_bar = !($<number>3);
+ }
+ ;
+