diff options
author | okan <okan> | 2017-12-29 20:03:46 +0000 |
---|---|---|
committer | okan <okan> | 2017-12-29 20:03:46 +0000 |
commit | 6e7dbf5bb71d56bb3443f57cb6b8707a291fe0d2 (patch) | |
tree | 6e842f14936d6a213a69c49587ce62cb92512925 /parse.y | |
parent | 43db5b55eaae67515ae926c0d195c1ef6aa4b607 (diff) | |
download | cwm-6e7dbf5bb71d56bb3443f57cb6b8707a291fe0d2.tar.gz cwm-6e7dbf5bb71d56bb3443f57cb6b8707a291fe0d2.tar.xz cwm-6e7dbf5bb71d56bb3443f57cb6b8707a291fe0d2.zip |
Convert menu-exec-wm from an abritrary exec menu, into a config-based menu from
which one may configure (wm <name> <path_and_args>) (and choose) specific window managers to replace the running one. 'wm cwm cwm' is included by default. No objections and seems sensible to sthen.
Diffstat (limited to 'parse.y')
-rw-r--r-- | parse.y | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/parse.y b/parse.y index 0c9606a..fbc19ed 100644 --- a/parse.y +++ b/parse.y @@ -70,7 +70,7 @@ typedef struct { %token BINDKEY UNBINDKEY BINDMOUSE UNBINDMOUSE %token FONTNAME STICKY GAP -%token AUTOGROUP COMMAND IGNORE +%token AUTOGROUP COMMAND IGNORE WM %token YES NO BORDERWIDTH MOVEAMOUNT %token COLOR SNAPDIST %token ACTIVEBORDER INACTIVEBORDER URGENCYBORDER @@ -146,6 +146,16 @@ main : FONTNAME STRING { free($2); free($3); } + | WM STRING string { + if (!conf_wm_add(conf, $2, $3)) { + yyerror("wm name/path too long"); + free($2); + free($3); + YYERROR; + } + free($2); + free($3); + } | AUTOGROUP NUMBER STRING { if ($2 < 0 || $2 > 9) { yyerror("invalid autogroup"); @@ -317,6 +327,7 @@ lookup(char *s) { "unbind-mouse", UNBINDMOUSE}, { "ungroupborder", UNGROUPBORDER}, { "urgencyborder", URGENCYBORDER}, + { "wm", WM}, { "yes", YES} }; const struct keywords *p; |