1Overview of fvwm2 parsing as of 16-Aug-2014 2=========================================== 3 4Sources of input to parse 5------------------------- 6 7 * Configuration files and files read with the Read command 8 - May be preprocessed by FvwmCpp or FvwmM4 9 10 * Input from the PipeRead command 11 12 * Input from modules to fvwm through the module pipes 13 14 - Fixed or generated strings from modules (e.g. FvwmPager, 15 FvwmButtons etc.) 16 17 - User input, e.g. from FvwmConsole or FvwmCommand. 18 19 * Module input from fvwm through the module pipes is parsed by 20 the receiving module. 21 22 - Binary input in predefined packets is only partially parsed 23 (packet type). The format and meaning of the packets is a 24 property of the module protocol. 25 26 - The payload of some string packets (e.g. generated by the 27 SendToModule command) is a free form string that is 28 interpreted by the receiving module. The module does any 29 necessary parsing. Example: 30 31 `SendToModule FvwmButtons changebutton 0 title foo, activetitle bar` 32 33 * Commands generated internally by fvwm as the result of an 34 external event, for example, an Ewmh message. This is used 35 quite often; instead of calling the function to maximize a 36 window directly, one may generate a command string that is 37 passed to `execute_function()`. Examples are 38 `virtual.c:CMD_EdgeResistance()` or 39 `ewmh_events.c:ewmh_DesktopGeometry()`. 40 41Various properties of parser input and the communication channels 42----------------------------------------------------------------- 43 44 * Maximum length of of lines read from a file is hard coded ro 45 1024 bytes in `read.c:run_command_stream()`. This is applicable 46 to configuration files and the Read and Piperead commands. 47 48 * The maximum depth of nested files opened through the Read 49 command is hard coded to 40 (read.c). 50 51 * Input from files or the `PipeRead` command may have an unlimited 52 number of lines. 53 54 * The maximum length of packets that can be sent in one chunk 55 from fvwm to the modules or back is hard coded to 256 including 56 the packet header (`FvwmPacketMaxSize` in `libs/Module.h`). This is an 57 artifact of module communication through pipes. 256 bytes is 58 the size that all systems guarantee to be sent through the pipe 59 in an atomic block. 60 61 Anything larger than that may be split into multiple write 62 calls, leading to mutilated messages in either direction. 63 Packets from fvwm to the modules are simply truncated to 256 64 bytes (`module_interface.c:make_vpacket()`). Packets from the 65 modules to fvwm are possibly sent in multiple pieces (write 66 call in `Module.c:SendText()`). Fvwm can theoretically handle 67 any size of module input (`module_list.c:module_receive()`). 68 69 * Input from modules to fvwm is pre-parsed in 70 `module_interface.c:module_input_execute()`, i.e. fvwm checks 71 whether the command name of the packet is "popup" and does some 72 special processing if that is the case (this command name is 73 not to be confused with the command from the text to be 74 executed by fvwm; its a fixed field in the packet). This is 75 done before any regular processing of the input. 76 77 * Input from the modules is not executed right away but stored in 78 a queue and executed when fvwm can process it (this is 79 important because otherwise module input might interfere with 80 function execution) (`module_interface.c:ExecuteCommandQueue()`). 81 82Fvwm's central parsing function: execute_function() 83--------------------------------------------------- 84 85 * All input to the parser is passed through 86 `functions.c:__execute_command_line()`. 87 88 NOTE: This function is called `__execute_function()` in fvwm. 89 90 * `__execute_command_line` is called from two places: 91 92 - `execute_function()` is just a wrapper exported rom 93 functions.c. There are two more wrappers, 94 `execute_function_override_wcontext()` and 95 `execute_function_override_window()` which change the execution 96 context of the command (see below) and then call 97 `execute_function()`. 98 99 - `__run_complex_function_items()` calls `__execute_command_line()` to 100 process the individual commands of a complex function. In 101 other words: The items of a complex function are passed twice 102 through the parser. First when the complex function is 103 defined, and a second time when they are executed (they are 104 treated differently in both passes, see further down). 105 106 * The call to `__execute_command_line()` is passed various pieces of 107 information: 108 109 ``` 110 111 void __execute_command_line( 112 cond_rc_t *cond_rc, 113 const exec_context_t *exc, 114 char *action, 115 FUNC_FLAGS_TYPE exec_flags, 116 char *args[], 117 Bool has_ref_window_moved) 118 ``` 119 120 - `cond_rc` is a pointer to memory where the return code of 121 command line execution is to be stored. This can be used in 122 scripting through complex functions 123 (`__run_complex_function_items()`) and by the internal caller 124 of execute_function. It is also one of the parameters of 125 the `CMD_...` functions, and it's important that cond_rc is 126 passed around and not set to a NULL pointer except by the 127 first call triggering command line processing. 128 129 - exc is the execution context of the command line 130 (`execcontext.h`). This is a vital data structure for command 131 line processing and execution. It contains information 132 about the originator of the command and the assiciated 133 application (type (module, event, scheduler, ...), the 134 actual X event, the module, the window). This data is used 135 during command execution, e.g. to identify the window on 136 which a command is executed or to determine the pointer 137 position; some commands work differently when input comes 138 from the mouse or the keyboard. It is also used during 139 variable expansion (e.g. to expand window related extended 140 parameters like `$[w.id]`). 141 142 It is important to properly set the execution context 143 whenever a command line is generated. Currently, some of 144 the Ewmh code fails to do so for historical reasons which I 145 won't explain here. This needs to be fixed eventually. 146 147 - action is the command line to parse and execute. 148 149 - `exec_flags` are flags that affect command parsing and 150 execution that may become necessary in some contexts not 151 related to the originator of the command. The flags are 152 defined in the structure execute_flags_t in functions.h. 153 154 - `FUNC_NEEDS_WINDOW` commands that need a context window are 155 not executed if it's missing. 156 - `FUNC_DONT_REPEAT` the command line is not repeatable (see 157 `CMD_Repeat`). 158 - `FUNC_ADD_TO` signals that the command is the addtofunc or 159 `+` command. 160 - `FUNC_DECOR` signals that the command is a decor related 161 command. 162 - `FUNC_ALLOW_UNMANAGED` allows running a command with an 163 overrideredirect window. 164 - `FUNC_IS_UNMANAGED` signals that the context window is an 165 overrideredirect window. 166 - `FUNC_DONT_EXPAND_COMMAND` suppresses expansion of variables 167 on the command line. 168 - `FUNC_DONT_DEFER` suppresses deferring execution of commands 169 that need a target window (normally these are put into the 170 queue and processed later). 171 172 - args is the array of the positional arguments during complex 173 function execution. For calls from `execute_function()` it's 174 a NULL pointer. 175 176 - `has_ref_window_moved` is a separate flag (hack) that triggers 177 some special treatment of the execution of the command Move, 178 Resize and AnimatedMove (but forgets the ResizeMove and 179 ResizeMoveMaximize commands). This should ratehr be stored 180 in exec_flags. 181 182Command line parsing 183-------------------- 184 185The command independent parsing of any command line is done by the 186`__execute_command_line()` call. The parsing procedure is as follows. 187Remember that `action` is the command line to be parsed. The 188pointer and the memory it points to are updated during the parsing 189process. 190 191* Step 1 192 Handle NULL pointer, whitespace and comments 193 194 1. Stop parsing and execute nothing if action is a NULL 195 pointer. 196 *DONE* 197 2. Strip all whitespace from the beginning of the command 198 line. 199 3. Stop parsing and execute nothing if action is a NULL 200 pointer or an empty string. (Note that some of the 201 functions in libs/Parse.c never return an empty string but 202 rather a NULL pointer. Parsing in the individual commands 203 often relies on that.) 204 *DONE* 205 4. If the first character is '#', is a comment. Stop parsing 206 and execute nothing. 207 *DONE* 208 209* Step 2 210 1. Increment the nested function depth. 211 2. If the function depth is too high, print an error message 212 and stop. 213 *DONE* 214 3. Determine the context window. 215 216* Step 3 217 Handle prefixes 218 219 1. If action begins with `-`, set the `FUNC_DONT_EXPAND_COMMAND` 220 flag and skip the `-` character. 221 2. Peek the first token of action. 222 3. If the token is `silent`, set the global 223 `Scr.flags.are_functions_silent` if not already set, strip 224 the token from action and go back to (b). 225 4. If the token is `keeprc`, set the internal `do_keep_rc` flag, 226 strip the token from action and go back to (b). (A dummy 227 return code variable is used in the command execution.) 228 229* Step 4 230 Finish if there is no remaining action to execute. 231 232* Step 5 233 Parse the command token 234 235 1. Get (but not strip) the command token from the action. 236 2. Expand variables in the token (expand.c:expand_vars()). 237 3. If the token does not start with a '*': 238 * strip all characters from and including the first 239 whitespace from the command token. 240 241 [Bug: Complex function names cannot have embedded 242 whitespace because of this, see comment in the code.] 243 244 [Note: If a command line begins with 245 246 `*foo` 247 248 (including the double quotes), the double quotes are 249 removed by GetNextToken, and the remaining token does 250 begin with `*`.] 251 252 * find the internal command matching this token from the 253 builtin function table. Note that any token _beginning_ 254 with `+` or ` +` is treated as the `+` command. 255 256 [What the heck is this good for?] 257 258* Step 6 259 260 If a we're currently adding to a decor, and the command token 261 designates a builtin function that does not have the `FUNC_DECOR` 262 flag set, generate a warning that the command cannot be added to 263 the decor. 264 265* Step 7 266 267 If the `FUNC_DONT_EXPAND_COMMAND` flag is not set, expand 268 variables in the action, including the part from which the 269 command token was extracted above. (The ismod flag of the call 270 to expand_vars() flag is set if the action begins with '*'). 271 272 [Note: The command token was parsed before expansion in step 5. 273 Now the whole line including the token is expanded before 274 further processing. This may or may not cause subtle bugs with 275 quoting and expansion.] 276 277* Step 8 278 279 If the expanded action begins with '*' treat it as a module 280 configuration line. 281 *GOTO step 10* 282 283 [BUG: Contrary to step 5 (c), a line beginning with 284 285 `*foo` 286 287 is not recognized as a module configuration line because it 288 begins with double quotes, not `*`.] 289 290* Step 9 291 292 Execute the action 293 294 1. Prepare the execution context. 295 2. If it's a builtin function other than `Function`, strip the 296 first token from the expanded action and defer or execute 297 the CMD_<command>() function as necessary with the proper 298 execution context. 299 *GOTO step 10* 300 3. If it's the builtin command `Function`, strip the first 301 token from the expanded action. 302 303 [Note: this may again be a different substring than in step 304 5 (c) or step 8.] 305 4. Call 306 `execute_complex_function` with the remaining expanded action. 307 5. If no complex function with that name can be found and it 308 was not the builtin command `Function`, assume that the 309 builtin command was `Module` and try to execute `CMD_Module` 310 with the remaining expanded action as its arguments. 311 312* Step 10 313 Cleanup 314 315 1. Clear the `Scr.flags.are_functions_silent` flag if set in 316 step 3 (c). 317 2. Store the number of pending breaks from the functions 318 return code structure in the original cond_rc (which may be 319 a different one in case the command was prefixed with 320 keeprc). 321 3. Decrement the nested function depth. 322 323Tokenization 324------------ 325 326The token parsing code is in `libs/Parse.c:DoPeekToken()` and 327CopyToken() (called by the former). `DoPeekToken` takes the input 328string, a pointer to memory where it stores the pointer to the 329resulting token, a pointer to memory to store the output string 330(buffer with hardcoded length `MAX_TOKEN_LENGTH = 1023` bytes 331(`libs/Parse.h`), and may be provided a string of additional characters 332to be treated as spaces, a string of input token delimiter 333characters, and a pointer where the character that ended the token 334is stored (output delimiter). By default, the set of space 335characters contains the character class determined by isspace(), 336and the set of input delimiter characters is empty 337 338* Step 1 (DoPeekToken) 339 1. Strip all space characters (see above) from the beginning of 340 the input string. 341 2. Call `CopyToken()` with the remaining string. 342 343* Step 2 (CopyToken) 344 345 1. Set the src pointer to the beginning of the input string. 346 The dest pointer is passed in as a function argument. 347 2. If src is at the end of the string, 348 *GOTO stp 3* 349 3. If *src is a space character or an input delimiter, 350 *GOTO stp 3* 351 4. If *src is a quote character (either a double quote 352 chararcter, a single quote or a backtick), 353 *GOTO step 2A* 354 5. Otherwise, 355 *GOTO step 2B* 356 357* Step 2A 358 1. `c := *src` 359 2. Skip over the src quote character (`src++`) 360 3. If `*src` is `c` or the end of string, 361 *GOTO (f)* 362 4. If `*src` is a backslash and the next character is not the end 363 of the input string (null byte), skip over the backslash in 364 the input (src++). 365 5. If there's still room in the output string, copy `*src` to 366 `*dest` and increment both pointers, otherwise just skip over 367 the input character (`src++`). 368 *GOTO (c)* 369 6. If `*src` is `c`, skip over it (`src++`). 370 *GOTO step 2 (b)* 371 372* Step 2B 373 1. If `*src` is a backslash and the next character is not the end 374 of the input string (null byte), skip over the backslash in 375 the input (`src++`). 376 2. If there's still room in the output string, copy `*src` to 377 `*dest` and increment both pointers, otherwise just skip over 378 the input character (`src++`). 379 *GOTO step 2 (b)* 380 381* Step 3 382 1. Set the output delimiter to the character pointer to by src 383 (i.e. the first character after the token). 384 2. Terminate the destination string with a null byte. 385 3. If src points to a string of zero or more spaces followed by 386 an input delimiter, store the delimiter as the output 387 delimiter and return a pointer to the character after that. 388 4. Otherwise, if src is not at the end of the string, return 389 the character after src. 390 5. Otherwise src points to the end of the string; return src. 391 392Step 4 (DoPeekToken) 393 1. If the remaining string has the length zero, set the token 394 pointer to NULL. 395 2. Return a pointer to the beginning of the next token in the 396 input string. 397 *DONE* 398 399Variable expansion 400------------------ 401 402Variable expansion is done `expand.c:expand_vars()`. The function 403takes an input string, the execution context, `cond_rc` and an array 404of positional parameters and returns the string with the variables 405expanded. It also takes the flags addto (never set) and ismod 406(set in step 7 of the parsing algorithm if the command begins with 407`*`). 408 409[BUG: The addto flag is actually never set when the function is 410called but instead used as a bogus local variable.] 411 412* Step 1 413 1. l := length of input 414 2. If the input begins with '*', set the addto flag. 415 3. Calculate the length of the expanded string and allocate 416 memory for it. 417 418* Step 2 (Scan for variables) 419 1. Begin at the start of the input and output strings. 420 2. Copy all character up to but excluding the next '$' 421 character to the output string (stop at the end of string). 422 3. If we're at the end of the string, stop. 423 *DONE* 424 4. Otherwise we're now at a `$` character. If the ismod flag 425 set and the next character is a letter, copy both to the 426 output string. 427 *GOTO (b)* 428 429 [Note: In module configuration lines, variable in the form 430 `$<letter>` are not expanded. There are probably several 431 bugs because of this logic.] 432 433* Step 3 (Expand a variable) 434 1. If the next character is a `$`, copy one `$` to the output, 435 skip over two `$` in the input and 436 *GOTO step 2 (b)* 437 2. If the next character is '[', 438 *GOTO step 4* 439 3. If the `$<character>` sequence does not designate a valid 440 one character variable, copy it to the output and 441 *GOTO step 2 (b)* 442 4. Otherwise, skip over the `$` and the next character in the 443 input and copy the value of the one character variable to 444 the output. 445 *GOTO step 2 (b)* 446 447* Step 4 (Expand an extended variable) 448 1. If addto is set, copy the `$[` to the output and 449 *GOTO step 2 (b)* 450 2. Determine the name of the extended variable. The name 451 starts after the initial `[` character and ends before the 452 final `]` character. The final `]` character is the first 453 occurence of the character `]` after the `$`, where the 454 number of `[` minus the number of `]` is zero (i.e., square 455 brackets can be nested). If the end of string is 456 encountered, just copy everything to the output and 457 *GOTO step 2 (b)* 458 3. Otherwise, if the variable name contains at least one `$`, 459 call expand vars with the name to expand nested variable 460 references. The result of this expansion is taken as the 461 new variable name. 462 4. If an extended variable with that name exists, copy its 463 value into the output, skip the `$[...]` in the input and 464 *GOTO step 2 (b)* 465 5. Otherwise copy the "$[...]" to the output and 466 *GOTO step 2 (b)* 467 468The second level of parsing 469--------------------------- 470 471When `__execute_command_line()` has finished its work it either tries to 472execute a module, a builtin command or a complex function (or 473nothing at all and just returns). Module execution is treated 474like a call of `CMD_Module()`, so there are two different ways how 475parsing continues. A third context of parsing is, when a module 476receives a packet from fvwm. 477 478* Parsing of builtin commands is done individually by the 479 `CMD_<builtin>()` functions. 480 481* Parsing and of a complex function call and its items is handled 482 by the function `functions.c:execute_complex_function()`. 483 484* Parsing of module configuration lines is done by the modules 485 with help from libs/Modules.c. There is also an optional step 486 of module variable expansion that is implemented in 487 `Modules.c:module_expand_action()`. It replaces some module 488 variables in the string that is going to be sent to fvwm, 489 e.g. `$width` or `$x`. FvwmButtons, FvwmIconMan and 490 FvwmTaskBar and use this mechanism. 491 492Parsing of complex function calls 493--------------------------------- 494 495Implemented in `functions.c:execute_complex_function()`. 496 497* Step 1 498 1. Peek the first token of the action. 499 2. Look it up in the list of complex functions. 500 3. If no such function exists, return an error. 501 *DONE* 502 4. Split the action into tokens using GetNextToken. Store the 503 original action (without the function name) followed by the 504 first ten tokens in the positional arguments array. 505 5. Set up an execution context for the function items. 506 6. Call `__run_complex_function_items()`. 507 508* Step 2 (`__run_complex_function_items()`) 509 1. For each complec function iten, call `__execute_command_line()` 510 with the `FUNC_DONT_DEFER` flag and the list of positional 511 arguments. This causes the function item command text to be 512 passed through the parser again. 513 *DONE* 514 515Parsing needs of the builtin commands 516------------------------------------- 517 518Note: Let's attempt to formulate the existing syntax in ABNF 519(rfc5234). 520 521Definitions that need defining for the below 522-------------------------------------------- 523 524* FLAG = !!!; 525* DECOR = !!!; 526* FONTNAME = !!!; 527* IMAGEFILE = !!!; 528* GRADIENT = !!!; 529* MOVEARGS = !!!; 530* MODULECONFIG = !!!; 531* CONDITION = !!!; 532* COLOUR_FG = !!!; 533* COLOUR_BG = !!!; 534* COMMAND = !!!; (builtin; can also be one of FUNCNAME) 535* FUNCNAME = !!!; (StartFunction | ExitFunction | etc, plus user-defined) 536* SHELL = !!!; 537* KEYNAME = !!!; 538* STYLEOPTION = !!!; (massive list of style options!!!) 539* TOKEN = !!! ; Same as string? 540* STRING = !!! ; Sequence of characters? 541* RESTOFLINE = !!! ; STRING? 542* RESTOFLINE_COMMAND = !!! ; COMMAND 543 544Types 545----- 546 547``` 548WSC = %x20 / %x09 549WS = *WSC 550DIGIT = "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9" 551SIGNPOS = "+" 552SIGNNEG = "-" 553SIGN = SIGNPOS / SIGNNEG 554POSINT = [SIGNPOS] 1*DIGIT 555INT = [SIGN] 1*DIGIT 556INTPERCENTAGE = 1DIGIT | 2DIGIT | ("0" / "1") 2DIGIT 557TRUE = "yes" / "y" / "1" / "t" / "true" 558FALSE = "no" / "n" / "0" / "f" / "false" 559BOOL = TRUE / FALSE 560TOGGLE = "toggle" 561BOOL_OR_TOGGLE = BOOL / TOGGLE 562MODIFIERS = "s" / "c" / "l" / "m" / "1" / "2" / "3" / "4" / "5" / "a" 563BINDINGMODIFIERS = "n" / 1*MODIFIERS 564PATH = ["/"] *(STRING "/") [STRING] 565VISIBLE_NAME = !!! 566CLASS = !!! 567RESOURCE = !!! 568NAME = !!! 569WINDOW_ID = !!! 570WINDOWSELECTOR = VISIBLE_NAME / CLASS / RESOURCE / NAME / WINDOW_ID 571BINDINGCONTEXT = "R" / "W" / "D" / "T" / "F" / "A" / "S" / "M" / "I" 572BINDINGCONTEXT = "[" / "]" / "-" / "_" 573BINDINGCONTEXT = "<" / "^" / ">" / "v" 574BINDINGCONTEXT = DIGIT 575MODULENAME = "MvwmAnimate" / "MvwmButtons" / ; etc... 576MODULALIAS = TOKEN 577TOKEN_DECORNAME = TOKEN 578FUNCNAME = TOKEN 579MENUNAME = TOKEN 580MENUSTYLENAME = TOKEN 581STYLENAME = TOKEN / "*" 582DIRS_MAIN = "North" / "N" 583DIRS_MAIN =/ "East" / "E" 584DIRS_MAIN =/ "South" / "S" 585DIRS_MAIN =/ "West" / "W" 586DIRS_DIAG = DIRS_MAIN 587DIRS_DIAG =/ "NorthEast" / "NW" 588DIRS_DIAG =/ "SouthEast" / "SE" 589DIRS_DIAG =/ "SouthWest" / "SW" 590DIRS_DIAG =/ "NorthWest" / "NW" 591DIRS_CENTER = DIRS_DIAG / "Center" / "C" 592COLORSET_NUM = POSINT 593BUTTON = 1*DIGIT 594VERSION = POSINT "." POSINT "." POSINT 595``` 596 597Commands 598-------- 599 600``` 601CMD_ADDBUTTONSTYLE = "AddButtonStyle" 602 ADDBUTTONSTYLEBUTTON [ADDBUTTONSTYLESTATE] 603 [ADDBUTTONSTYLESTYLE] [ADDBUTTONSTYLEFLAG] 604ADDBUTTONSTYLEBUTTON = POSINT ("All" / "Left" / "Right") 605ADDBUTTONSTYLESTATE = "ActiveUp" 606ADDBUTTONSTYLESTATE =/ "ActiveDown" 607ADDBUTTONSTYLESTATE =/ "InactiveUp" 608ADDBUTTONSTYLESTATE =/ "InactiveDown" 609ADDBUTTONSTYLESTATE =/ ADDBUTTONSTYLEACTIVE 610ADDBUTTONSTYLESTATE =/ "Inactive" 611ADDBUTTONSTYLESTATE =/ TOGGLE 612ADDBUTTONSTYLESTATE =/ "AllActive" 613ADDBUTTONSTYLESTATE =/ "AllInactive" 614ADDBUTTONSTYLESTATE =/ "AllNormal" 615ADDBUTTONSTYLESTATE =/ "AllToggled" 616ADDBUTTONSTYLESTATE =/ "AllUp" 617ADDBUTTONSTYLESTATE =/ "AllDown" 618ADDBUTTONSTYLESTATE =/ "AllActiveUp" 619ADDBUTTONSTYLESTATE =/ "AllActiveDown" 620ADDBUTTONSTYLESTATE =/ "AllInactiveUp" 621ADDBUTTONSTYLESTATE =/ "AllInactiveDown" 622ADDBUTTONSTYLEACTIVE = "Active" - implies FOCUSED_WINDOW 623ADDBUTTONSTYLEFLAG = ["!"]ADDBUTTONSTYLEKEYWORD *("," ["!"]ADDBUTTONSTYLEKEYWORD) 624ADDBUTTONSTYLEKEYWORD = 1*("UseTitleStyle" / "UseBorderStyle") *("Raised" / "Sunk" / "Flat") 625 626CMD_ADDTITLESTYLE = "AddTitleStyle" [ADDTITLESTYLESTATE] 627 [ADDTITLESTYLESTYLE] [ADDTITLESTYLEFLAG] 628ADDTITLESTYLESTATE = "ActiveUp" 629ADDTITLESTYLESTATE =/ "ActiveDown" 630ADDTITLESTYLESTATE =/ "InactiveUp" 631ADDTITLESTYLESTATE =/ "InactiveDown" 632ADDTITLESTYLESTATE =/ ADDTITLESTYLEACTIVE 633ADDTITLESTYLESTATE =/ "Inactive" 634ADDTITLESTYLESTATE =/ "toggled" 635ADDTITLESTYLESTATE =/ "AllActive" 636ADDTITLESTYLESTATE =/ "AllInactive" 637ADDTITLESTYLEFLAG = ["!"] ADDTITLESTYLEFLAGKEYWORD *("," ["!"] ADDTITLESTYLEFLAGKEYWORD) 638ADDTITLESTYLEACTIVE = "Active" ; - implies FOCUSED_WINDOW 639; (XXX = TitleStyle/ButtonStyle relationships here...) 640``` 641``` 642CMD_ADDTOFUNC = "AddToFunc" FUNCNAME ADDTOFUNCFUNCDEFS RESTOFLINE_COMMAND 643ADDTOFUNCFUNCDEFS = "I" 644ADDTOFUNCFUNCDEFS =/ "M" 645ADDTOFUNCFUNCDEFS =/ "C" 646ADDTOFUNCFUNCDEFS =/ "H" 647ADDTOFUNCFUNCDEFS =/ "D" 648``` 649``` 650CMD_ADDTOMENU = "AddToMenu" MENUNAME [ADDTOMENULABEL RESTOFLINE_COMMAND] 651ADDTOMENULABEL = STRING 652``` 653``` 654CMD_ANIMATEDMOVE = "AnimatedMove" ANIMATEMOVEARGS ANIMATEMOVEARGS 655 [ANIMATEDMOVEKEYWORD] 656ANIMATEMOVEARGS = !!! 657ANIMATEDMOVEKEYWORD = "Warp" 658``` 659``` 660CMD_ASTERISK = "Asterisk" [MODULE_LINE] 661``` 662``` 663CMD_BEEP = "Beep" 664``` 665``` 666CMD_BORDERSTYLE = "BorderStyle" BORDERSTYLESTATE 667 [BORDERSTYLESTYLE] [BORDERSTYLEFLAG] 668BORDERSTYLESTATE = "Active" / "Inactive" 669BORDERSTYLESTYLE = "TiledPixmap" / "Colorset" 670BORDERSTYLEFLAG = ["!"] BORDERSTYLEKEYWORD ("," ["!"] BORDERSTYLEKEYWORD) 671BORDERSTYLEKEYWORD = "HiddenHandles" 672BORDERSTYLEKEYWORD =/ "NoInset" 673BORDERSTYLEKEYWORD =/ "Raised" 674BORDERSTYLEKEYWORD =/ "Sunk" 675BORDERSTYLEKEYWORD =/ "Flat" 676BORDERSTYLEKEYWORD =/ "Simple" 677``` 678``` 679CMD_BUGOPTS = "BugOpts" BUGOPTSOPTION 680BUGOPTSOPTION = 1*(BUGOPTSKEYWORD [BOOL_OR_TOGGLE]) 681BUGOPTSKEYWORD = "FlickingMoveWorkaround" 682BUGOPTSKEYWORD =/ "MixedVisualWorkaround" 683BUGOPTSKEYWORD =/ "ModalityIsEvil" 684BUGOPTSKEYWORD =/ "RaiseOverNativeWindows" 685BUGOPTSKEYWORD =/ "RaiseOverUnmanaged" 686BUGOPTSKEYWORD =/ "FlickingQtDialogsWorkaround" 687BUGOPTSKEYWORD =/ "QtDragnDropWorkaround" 688BUGOPTSKEYWORD =/ "EWMHIconicStateWorkaround" 689BUGOPTSKEYWORD =/ "DisplayNewWindowNames" 690BUGOPTSKEYWORD =/ "ExplainWindowPlacement" 691BUGOPTSKEYWORD =/ "DebugCRMotionMethod" 692BUGOPTSKEYWORD =/ "TransliterateUtf8" 693``` 694``` 695CMD_BUSYCURSOR = "BusyCursor" BUSYCURSOROPTION *("," BUSYCURSOROPTION) 696BUSYCURSOROPTION = 1*(BUSYCURSORKEYWORD BOOL) 697BUSYCURSORKEYWORD = "DynamicMenu" 698BUSYCURSORKEYWORD =/ "ModuleSynchronous" 699BUSYCURSORKEYWORD =/ "Read" 700BUSYCURSORKEYWORD =/ "Wait" 701BUSYCURSORKEYWORD =/ "*" 702``` 703``` 704CMD_BUTTONSTATE = "ButtonState" BUTTONSTATEOPTION *("," BUTTONSTATEOPTION) 705BUTTONSTATEOPTION = BUTTONSTATEKEYWORD [BOOL] 706BUTTONSTATEKEYWORD = "ActiveUp" 707BUTTONSTATEKEYWORD =/ "ActiveDown" 708BUTTONSTATEKEYWORD =/ "InactiveUp" 709BUTTONSTATEKEYWORD =/ "InactiveDown" 710``` 711``` 712CMD_BUTTONSTYLE = "ButtonStyle" BUTTONSTYLEBUTTON 713 [BUTTONSTYLESTATE] [BUTTONSTYLESTYLE] [FLAGS] 714BUTTONSTYLEBUTTON = 0-9 715BUTTONSTYLEBUTTON =/ "All" 716BUTTONSTYLEBUTTON =/ "Left" 717BUTTONSTYLEBUTTON =/ "Right" 718BUTTONSTYLEBUTTON =/ "Reset" 719BUTTONSTYLEBUTTONSTATE = "ActiveUp" 720BUTTONSTYLEBUTTONSTATE =/ "ActiveDown" 721BUTTONSTYLEBUTTONSTATE =/ "InactiveUp" 722BUTTONSTYLEBUTTONSTATE =/ "InactiveDown" 723BUTTONSTYLEBUTTONSTATE =/ BUTTONSTYLEACTIVE 724BUTTONSTYLEBUTTONSTATE =/ "Inactive" 725BUTTONSTYLEBUTTONSTATE =/ TOGGLE 726BUTTONSTYLEBUTTONSTATE =/ "AllActive" 727BUTTONSTYLEBUTTONSTATE =/ "AllInactive" 728BUTTONSTYLEBUTTONSTATE =/ "AllNormal" 729BUTTONSTYLEBUTTONSTATE =/ "AllToggled" 730BUTTONSTYLEBUTTONSTATE =/ "AllUp" 731BUTTONSTYLEBUTTONSTATE =/ "AllDown" 732BUTTONSTYLEBUTTONSTATE =/ "AllActiveUp" 733BUTTONSTYLEBUTTONSTATE =/ "AllActiveDown" 734BUTTONSTYLEBUTTONSTATE =/ "AllInactiveUp" 735BUTTONSTYLEBUTTONSTATE =/ "AllInactiveDown" 736BUTTONSTYLEACTIVE = "Active" ; - implies FOCUSED_WINDOW 737BUTTONSTYLESTYLE = "Simple" 738BUTTONSTYLESTYLE =/ "Default" 739BUTTONSTYLESTYLE =/ "Solid" 740BUTTONSTYLESTYLE =/ "Colorset" 741BUTTONSTYLESTYLE =/ "Vector" 742BUTTONSTYLESTYLE =/ BUTTONSTYLEGRADIENT 743BUTTONSTYLESTYLE =/ "Pixmap" 744BUTTONSTYLESTYLE =/ AdjustedPixmap" 745BUTTONSTYLESTYLE =/ "ShrunkPixmap" 746BUTTONSTYLESTYLE =/ "StretchedPixmap" 747BUTTONSTYLESTYLE =/ "TiledPixmap" 748BUTTONSTYLESTYLE =/ "MiniIcon" 749BUTTONSTYLEGRADIENT = TYPE START-COLOUR END-COLOUR 750BUTTONSTYLESTYLEFLAG = 751 ["!"] BUTTONSTYLESTYLEKEYWORD *("," ["!"] BUTTONSTYLESTYLEKEYWORD) 752BUTTONSTYLESTYLEKEYWORD = "Raised" 753BUTTONSTYLESTYLEKEYWORD =/ "Sunk" 754BUTTONSTYLESTYLEKEYWORD =/ "Flat" 755BUTTONSTYLESTYLEKEYWORD =/ "UseBorderStyle" 756BUTTONSTYLESTYLEKEYWORD =/ "UseTitleStyle" 757; (XXX = "Raised, Sunk, and Flat" can only be used initially!!!") 758``` 759``` 760CMD_CHANGEMENUSTYLE = "ChangeMenuStyle" MENUSTYLENAME MENUNAME 761``` 762``` 763CMD_CLEANUPCOLORSETS = "CleanupColorsets" 764``` 765``` 766CMD_CLICKTIME = "ClickTime" POSINT 767; (stores the negative value during startup> 768``` 769``` 770CMD_CMD_CLASS_CLOSE = "Close" / "Delete" / "Destroy" 771; work on context window 772``` 773``` 774CMD_COLORMAPFOCUS = "ColormapFocus" ("FollowsMouse" / "FollowsFocus") 775``` 776``` 777CMD_COLORSET = "Colorset" COLORSET_NUM COLORSETOPTION *("," COLORSETOPTION) 778COLORSETOPTION = COLORSETKEYWORD [COLORSETVALUE] 779COLORSETKEYWORD = "fg" 780COLORSETKEYWORD =/ "Fore" 781COLORSETKEYWORD =/ "Foreground" 782COLORSETKEYWORD =/ "bg" 783COLORSETKEYWORD =/ "Back" 784COLORSETKEYWORD =/ "Background" 785COLORSETKEYWORD =/ "hi" 786COLORSETKEYWORD =/ "Hilite" 787COLORSETKEYWORD =/ "Hilight" 788COLORSETKEYWORD =/ "sh" 789COLORSETKEYWORD =/ "Shade" 790COLORSETKEYWORD =/ "Shadow" 791COLORSETKEYWORD =/ "fgsh" 792COLORSETKEYWORD =/ "Pixmap" 793COLORSETKEYWORD =/ "TiledPixmap" 794COLORSETKEYWORD =/ "AspectPixmap" 795COLORSETKEYWORD =/ "Transparent" 796COLORSETKEYWORD =/ "RootTransparent" 797COLORSETKEYWORD =/ "Shape" 798COLORSETKEYWORD =/ "TiledShape" 799COLORSETKEYWORD =/ "AspectShape" 800COLORSETKEYWORD =/ "NoShape" 801COLORSETKEYWORD =/ ("V" / "B" / "D" / "S" / "C" / "R" / "Y") "Gradient" 802COLORSETKEYWORD =/ "Tint" 803COLORSETKEYWORD =/ "fgTint" 804COLORSETKEYWORD =/ "bgTint" 805COLORSETKEYWORD =/ "Alpha" 806COLORSETKEYWORD =/ "fgAlpha" 807COLORSETKEYWORD =/ "Dither" 808COLORSETKEYWORD =/ "NoDither" 809COLORSETKEYWORD =/ "IconTint" 810COLORSETKEYWORD =/ "IconAlpha" 811COLORSETKEYWORD =/ "Plain" 812COLORSETVALUE = INT 813COLORSETVALUE =/ COLORNAME 814COLORSETVALUE =/ IMAGEFILENAME 815COLORSETVALUE =/ INTPERCENTAGE 816; (memory usage depends on highest colorset number) 817``` 818``` 819COPYMENUSTYLE = "CopyMenuStyle" MENUSTYLENAME MENUSTYLENAME 820``` 821``` 822CMD_CURSORMOVE = "CursorMove" 823 CURSORMOVEDIM[CURSORMOVESUFFIX] CURSORMOVEDIM[CURSORMOVESUFFIX] 824CURSORMOVEDIM = INT 825CURSORMOVESUFFIX = "p" 826``` 827``` 828CMD_CURSORSTYLE = "CursorStyle" CURSORSTYLECONTEXT [CURSORSTYLEXOPTION] 829CURSORSTYLECONTEXT = CURSORSTYLEKEYWORD / CURSORSTYLEX11NAME 830CURSORSTYLEKEYWORD = "POSITION" 831CURSORSTYLEKEYWORD =/ "TITLE" 832CURSORSTYLEKEYWORD =/ "DEFAULT" 833CURSORSTYLEKEYWORD =/ "SYS" 834CURSORSTYLEKEYWORD =/ "MOVE" 835CURSORSTYLEKEYWORD =/ "RESIZE" 836CURSORSTYLEKEYWORD =/ "WAIT" 837CURSORSTYLEKEYWORD =/ "MENU" 838CURSORSTYLEKEYWORD =/ "SELECT" 839CURSORSTYLEKEYWORD =/ "DESTROY" 840CURSORSTYLEKEYWORD =/ "TOP" 841CURSORSTYLEKEYWORD =/ "RIGHT" 842CURSORSTYLEKEYWORD =/ "BOTTOM" 843CURSORSTYLEKEYWORD =/ "LEFT" 844CURSORSTYLEKEYWORD =/ "TOP_LEFT" 845CURSORSTYLEKEYWORD =/ "TOP_RIGHT" 846CURSORSTYLEKEYWORD =/ "BOTTOM_LEFT" 847CURSORSTYLEKEYWORD =/ "BOTTOM_RIGHT" 848CURSORSTYLEKEYWORD =/ "TOP_EDGE" 849CURSORSTYLEKEYWORD =/ "RIGHT_EDGE" 850CURSORSTYLEKEYWORD =/ "BOTTOM_EDGE" 851CURSORSTYLEKEYWORD =/ "LEFT_EDGE" 852CURSORSTYLEKEYWORD =/ "ROOT" 853CURSORSTYLEKEYWORD =/ "STROKE" 854CURSORSTYLEKEYWORD =/ "None" 855CURSORSTYLEKEYWORD =/ "Tiny" 856CURSORSTYLEX11NAME = "top_left_corner" 857CURSORSTYLEX11NAME =/ "top_left_arrow" 858CURSORSTYLEX11NAME =/ "hand2" 859CURSORSTYLEX11NAME =/ "fleur" 860CURSORSTYLEX11NAME =/ "sizing" 861CURSORSTYLEX11NAME =/ "watch" 862CURSORSTYLEX11NAME =/ "crosshair" 863CURSORSTYLEX11NAME =/ "pirate" 864CURSORSTYLEX11NAME =/ "top_side" 865CURSORSTYLEX11NAME =/ "bottom_side" 866CURSORSTYLEX11NAME =/ "left_side" 867CURSORSTYLEX11NAME =/ "top_right_corner" 868CURSORSTYLEX11NAME =/ "bottom_left_corner" 869CURSORSTYLEX11NAME =/ "top_side" 870CURSORSTYLEX11NAME =/ "right_side" 871CURSORSTYLEX11NAME =/ "left_side" 872CURSORSTYLEX11NAME =/ "left_ptr" 873CURSORSTYLEX11NAME =/ "plus" 874CURSORSTYLEXOPTION = IMAGEFILE [INT] 875CURSORSTYLEXOPTION =/ "fg" 876CURSORSTYLEXOPTION =/ "bg" 877``` 878``` 879CMD_DEFAULTCOLORS = "DefaultColors" [(COLOUR_FG] / "-") [(COLOUR_BG - "/")] 880; XXX - We need to represent colour values here --- RGB.txt, etc. 881``` 882``` 883CMD_DEFAULTCOLORSET = "DefaultColorset" (COLORSET_NUM / "-1") 884``` 885``` 886CMD_DEFAULTFONT = "DefaultFont" [FONTNAME] 887``` 888``` 889CMD_DEFAULTICON = "DefaultIcon" [IMAGEFILE] 890``` 891``` 892CMD_DEFAULTLAYERS = "DefaultLayers" INT INT INT 893``` 894``` 895CMD_DESCHEDULE = "Deschedule" [INT] 896``` 897``` 898CMD_DESKTOPNAME = "DesktopName" INT DESKTOPNAME 899DESKTOPNAME = 1*(ALPHA DIGIT) 900``` 901``` 902CMD_DESKTOPSIZE = "DesktopSize" DESKTOPSIZDIM "x" DESKTOPSIZDIM 903DESKTOPSIZEDIM = INT 904``` 905``` 906CMD_DESTROYFUNC = "DestroyFunc" [FUNCNAME] 907``` 908``` 909CMD_DESTROYMENU = "DestroyMenu" ["recreate"] MENUNAME 910``` 911``` 912CMD_DESTROYMENUSTYLE = "DestroyMenuStyle" MENUSTYLENAME 913``` 914``` 915CMD_DESTROYMODULECONFIG = "DestroyModuleConfig" MODULECONFIG 916``` 917``` 918CMD_DESTROYSTYLE = "DestroyStyle" STYLENAME 919``` 920``` 921CMD_DESTROYWINDOWSTYLE = "DestroyWindowStyle" ; operates on context window 922``` 923``` 924CMD_ECHO = "Echo" RESTOFLINE 925``` 926``` 927CMD_ECHOFUNCDEFINITION = "EchoFuncDefinition" FUNCNAME 928``` 929``` 930CMD_EDGECOMMAND = "EdgeCommand" [DIRS_MAIN [RESTOFLINE_COMMAND]] 931``` 932``` 933CMD_EDGELEAVECOMMAND = "EdgeLeaveCommand" [DIRS_MAIN [RESTOFLINE_COMMAND]] 934``` 935``` 936CMD_EDGESCROLL = "EdgeScroll" EDGESCROLLDIM[EDGESCROLLSUFFIX] 937 EDGESCROLLDIM[EDGESCROLLSUFFIX] [EDGESCROLLOPTION] 938EDGESCROLLDIM = INT 939EDGESCROLLSUFFIX = "p" 940EDGESCROLLOPTION = "Wrap" 941EDGESCROLLOPTION =/ "WrapX" 942EDGESCROLLOPTION =/ "WrapY" 943``` 944``` 945CMD_EDGETHICKNESS = "EdgeThickness" EDGETHICKNESSVAL 946EDGETHICKNESSVAL = "0" / "1" / "2" 947``` 948``` 949CMD_EMULATE = "Emulate" EMULATEVAL 950EMULATEVAL = "Mvwm" 951EMULATEVAL =/ "Mwm" 952EMULATEVAL =/ "Win" 953``` 954``` 955CMD_ESCAPEFUNC = "EscapeFunc" 956``` 957``` 958CMD_EWMHBASESTRUTS = "EwmhBaseStruts" ["screen" XRANDRMONITORNAME] INT INT INT INT 959``` 960``` 961CMD_EWMHNUMBEROFDESKTOPS = "EwmhNumberOfDesktops" ["screen" XRANDRMONITORNAME] INT INT 962``` 963``` 964CMD_EXEC = "Exec" RESTOFLINE_COMMAND 965``` 966``` 967CMD_EXECUSESHELL = "ExecUseShell" EXECUSESHELLSHELL 968; Could technically be any external command; assume a value from /etc/shells 969EXECUSESHELLSHELL = !!! 970``` 971``` 972CMD_FAKECLICK = "FakeClick" FAKECLICKACTION *("," FAKECLICKACTION) 973FAKECLICKACTION = FAKECLICKCOMMAND FAKECLICKVALUE 974FAKECLICKCOMMAND = (FAKECLICKKEYWORD, FAKECLICKVALUE) 975FAKECLICKKEYWORD = "press" 976FAKECLICKKEYWORD =/ "release" 977FAKECLICKKEYWORD =/ "modifiers" 978FAKECLICKKEYWORD =/ "wait" 979FAKECLICKKEYWORD =/ FAKECLICKDEPTH 980FAKECLICKVALUE = "1" 981FAKECLICKVALUE =/ "2" 982FAKECLICKVALUE =/ "3" 983FAKECLICKVALUE =/ "4" 984FAKECLICKVALUE =/ "5" 985FAKECLICKVALUE =/ "Mod1" 986FAKECLICKVALUE =/ "Mod2" 987FAKECLICKVALUE =/ "Mod3" 988FAKECLICKVALUE =/ "Mod4" 989FAKECLICKVALUE =/ "Mod5" 990FAKECLICKVALUE =/ "6" 991FAKECLICKVALUE =/ "7" 992FAKECLICKVALUE =/ "8" 993FAKECLICKVALUE =/ "Shift" 994FAKECLICKVALUE =/ "Lock" 995FAKECLICKVALUE =/ "Control" 996FAKECLICKDEPTH = "depth" 997FAKECLICKDEPTH =/ "0" 998FAKECLICKDEPTH =/ "1" 999FAKECLICKDEPTH =/ "2" 1000FAKECLICKDEPTH =/ "3" 1001FAKECLICKDEPTH =/ INT 1002``` 1003``` 1004CMD_FAKEKEYPRESS = "FakeKeypress" FAKEKEYPRESSACTION *("," FAKEKEYPRESSACTION) 1005FAKEKEYPRESSACTION = FAKEKEYPRESSCOMMAND FAKEKEYPRESSVALUE 1006FAKEKEYPRESSKEYWORD = "press" 1007FAKEKEYPRESSKEYWORD =/ "release" 1008FAKEKEYPRESSKEYWORD =/ "modifiers" 1009FAKEKEYPRESSKEYWORD =/ "wait" 1010FAKEKEYPRESSKEYWORD =/ DEPTH 1011FAKEKEYPRESSVALUE = KEYNAME 1012FAKEKEYPRESSDEPTH = "depth" 1013FAKEKEYPRESSDEPTH =/ "0" 1014FAKEKEYPRESSDEPTH =/ "1" 1015FAKEKEYPRESSDEPTH =/ "2" 1016FAKEKEYPRESSDEPTH =/ "3" 1017FAKEKEYPRESSDEPTH =/ INT 1018``` 1019``` 1020CMD_FLIPFOCUS = "FlipFocus" ["nowarp"] 1021``` 1022``` 1023CMD_FOCUS = "Focus" ["nowarp"] 1024``` 1025``` 1026CMD_FOCUSSTYLE = "FocusStyle" STYLEOPTIONS 1027``` 1028``` 1029CMD_FUNCTION = "Function" [FUNCNAME] 1030``` 1031``` 1032CMD_GOTODESK = "GotoDesk" DESKNUMBER 1033DESKNUMBER = ["prev" / (INT [INT [INT [INT]]])] 1034``` 1035``` 1036CMD_GOTODESKANDPAGE = "GotoDeskAndPage" "prev" / (INT INT INT) 1037``` 1038``` 1039CMD_GOTOPAGE = "GotoPage" PAGE_ARGUMENTS 1040PAGE_ARGUMENTS = ["prev" / ([OPTIONS] 2(PAGECCORD[PAGESUFFIX]) 1041OPTIONS = ["!"] ("wrapx" / "wrapy" / "nodesklimitx" / "nodesklimity") 1042PAGECOORD = INT 1043PAGESUFFIX = "p" 1044``` 1045``` 1046CMD_HIDEGEOMETRYWINDOW = "HideGeometryWindow" [HIDEGEOMETRYWINDOWCOMMAND] 1047HIDEGEOMETRYWINDOWCOMMAND = "Never" 1048HIDEGEOMETRYWINDOWCOMMAND =/ "Move" 1049HIDEGEOMETRYWINDOWCOMMAND =/ "Resize" 1050``` 1051``` 1052CMD_HILIGHTCOLORSET = "HilightColorset" [COLORSET_NUM] 1053``` 1054``` 1055CMD_ICONIFY = "Iconify" BOOL_OR_TOGGLE 1056``` 1057``` 1058CMD_IGNOREMODIFIERS = "IgnoreModifiers" [ BINDINGMODIFIERS ] 1059``` 1060``` 1061CMD_IMAGEPATH = "ImagePath" [PATH] 1062``` 1063``` 1064CMD_INFOSTOREADD = "InfoStoreAdd" INFOSTOREKEY INFOSTOREVALUE 1065INFOSTOREKEY = STRING 1066INFOSTOREVALUE = STRING 1067``` 1068``` 1069CMD_INFOSTOREREMOVE = "InfoStoreRemove" [INFOSTOREREKEY] 1070``` 1071``` 1072CMD_KEEPRC = "KeepRc" [RESTOFLINE_COMMAND] 1073``` 1074``` 1075CMD_CLASS_KEY = ("Key" / "PointerKey") ["(" WINDOWSELECTOR ")"] KEYNAME 1076 BINDINGCONTEXT BINDINGMODIFIERS RESTOFLINE_COMMAND 1077``` 1078``` 1079CMD_KILLMODULE = "KillModule" [MODULENAME] [MODULEALIAS] 1080``` 1081``` 1082CMD_LAYER = "Layer" [INT INT] / "default" 1083``` 1084``` 1085CMD_LOCALEPATH = "LocalePath" [PATH] 1086``` 1087``` 1088CMD_CLASS_RAISELOWER = ("Lower" / "Raise" / "RaiseLower") ; operates on context window 1089``` 1090``` 1091CMD_MAXIMIZE = "Maximize" [MAXIMIZEFLAGS] [BOOL_OR_TOGGLE / "forget"] 1092 [[MAXIMIZEDIM[MAXIMIZESUFFIX]] MAXIMIZEDIM[MAXIMIZESUFFIX]] 1093MAXIMIZEGROWOPTS = "grow" 1094MAXIMIZEGROWOPTS =/ "growleft" 1095MAXIMIZEGROWOPTS =/ "growright" 1096MAXIMIZEGROWOPTS =/ "growup" 1097MAXIMIZEGROWOPTS =/ "growdown" 1098MAXIMIZEDIM = INT 1099MAXIMIZEDIM =/ MAXIMIZEGROWOPTS 1100MAXIMIZESUFFIX = "p" 1101MAXIMIZEFLAGS = "ewmhiwa" 1102MAXIMIZEFLAGS =/ "growonwindowlayer" 1103MAXIMIZEFLAGS =/ "growonlayers" 1104MAXIMIZEFLAGS =/ ("screen" / XINERAMASCR) 1105``` 1106``` 1107CMD_CLASS_MENU = ("Menu" / "Popup") MENUNAME [MENUPOSITION] [MENUCOMMAND] 1108MENUPOSITION = MENUCONTEXT_RECTANGLE INT INT [MENUOPTIONS] 1109MENUCONTEXT_RECTANGLE = "Root" !!! 1110MENUCONTEXT = "XineramaRoot" 1111MENUCONTEXT =/ "Mouse" 1112MENUCONTEXT =/ "Window" 1113MENUCONTEXT =/ "Interior" 1114MENUCONTEXT =/ "Title" 1115MENUCONTEXT =/ ("Button" INT) "Icon" 1116MENUCONTEXT =/ "Item" 1117MENUCONTEXT =/ "Context" 1118MENUCONTEXT =/ "This" 1119MENUCONTEXT =/ ("Rectangle" MENUCONTEXTGEOMETRY) 1120MENUOPTIONS = "TearoffImmediately" 1121MENUOPTIONS =/ "SelectInPlace" 1122MENUOPTIONS = !!! 1123MENUCONTEXTGEOMETRY = !!! 1124``` 1125``` 1126CMD_MENUSTYLE = "MenuStyle" MENUSTYLENAME *(["!"] MENUSTYLEOPTIONS) 1127MENUSTYLEOPTIONS = "Mvwm" 1128MENUSTYLEOPTIONS =/ "Mwm" 1129MENUSTYLEOPTIONS =/ "Win" 1130MENUSTYLEOPTIONS =/ "BorderWidth" 1131MENUSTYLEOPTIONS =/ "Foreground" 1132MENUSTYLEOPTIONS =/ "Background" 1133MENUSTYLEOPTIONS =/ "Greyed" 1134MENUSTYLEOPTIONS =/ "HilightBack" 1135MENUSTYLEOPTIONS =/ "HilightTitleBack" 1136MENUSTYLEOPTIONS =/ "ActiveFore" 1137MENUSTYLEOPTIONS =/ "MenuColorset" 1138MENUSTYLEOPTIONS =/ "ActiveColorset" 1139MENUSTYLEOPTIONS =/ "GreyedColorset" 1140MENUSTYLEOPTIONS =/ "TitleColorset" 1141MENUSTYLEOPTIONS =/ "Hilight3DThick" 1142MENUSTYLEOPTIONS =/ "Hilight3DThin" 1143MENUSTYLEOPTIONS =/ "Hilight3DOff" 1144MENUSTYLEOPTIONS =/ "Hilight3DThickness" 1145MENUSTYLEOPTIONS =/ "Animation" 1146MENUSTYLEOPTIONS =/ "Font" 1147MENUSTYLEOPTIONS =/ "TitleFont" 1148MENUSTYLEOPTIONS =/ "MenuFace" 1149MENUSTYLEOPTIONS =/ "PopupDelay" 1150MENUSTYLEOPTIONS =/ "PopupOffset" 1151MENUSTYLEOPTIONS =/ "TitleWarp" 1152MENUSTYLEOPTIONS =/ "TitleUnderlines0" 1153MENUSTYLEOPTIONS =/ "TitleUnderlines1" 1154MENUSTYLEOPTIONS =/ "TitleUnderlines2" 1155MENUSTYLEOPTIONS =/ "SeparatorsLong" 1156MENUSTYLEOPTIONS =/ "SeparatorsShort" 1157MENUSTYLEOPTIONS =/ "TrianglesSolid" 1158MENUSTYLEOPTIONS =/ "TrianglesRelief" 1159MENUSTYLEOPTIONS =/ "PopupImmediately" 1160MENUSTYLEOPTIONS =/ "PopupDelayed" 1161MENUSTYLEOPTIONS =/ "PopdownImmediately" 1162MENUSTYLEOPTIONS =/ "PopdownDelayed" 1163MENUSTYLEOPTIONS =/ "PopupActiveArea" 1164MENUSTYLEOPTIONS =/ "DoubleClickTime" 1165MENUSTYLEOPTIONS =/ "SidePic" 1166MENUSTYLEOPTIONS =/ "SideColor" 1167MENUSTYLEOPTIONS =/ "PopupAsRootMenu" 1168MENUSTYLEOPTIONS =/ "PopupAsSubmenu" 1169MENUSTYLEOPTIONS =/ "PopupIgnore" 1170MENUSTYLEOPTIONS =/ "PopupClose" 1171MENUSTYLEOPTIONS =/ "RemoveSubmenus" 1172MENUSTYLEOPTIONS =/ "HoldSubmenus" 1173MENUSTYLEOPTIONS =/ "SubmenusRight" 1174MENUSTYLEOPTIONS =/ "SubmenusLeft" 1175MENUSTYLEOPTIONS =/ "SelectOnRelease" 1176MENUSTYLEOPTIONS =/ "ItemFormat" 1177MENUSTYLEOPTIONS =/ "VerticalItemSpacing" 1178MENUSTYLEOPTIONS =/ "VerticalMargins" 1179MENUSTYLEOPTIONS =/ "VerticalTitleSpacing" 1180MENUSTYLEOPTIONS =/ "AutomaticHotkeys" 1181MENUSTYLEOPTIONS =/ "UniqueHotkeyActivatesImmediate" 1182MENUSTYLEOPTIONS =/ "MouseWheel" 1183MENUSTYLEOPTIONS =/ "ScrollOffPage" 1184MENUSTYLEOPTIONS =/ "TrianglesUseFore" 1185; add option syntax 1186``` 1187``` 1188CMD_CLASS_MODULE = ("Module" / "ModuleListenOnly") CMDMODULEARGS 1189CMDMODULEARGS = MODULENAME [MODULEALIAS] 1190``` 1191``` 1192CMD_MODULEPATH = "ModulePath" PATH 1193``` 1194``` 1195CMD_MODULESYNCHRONOUS = "ModuleSynchronous" ["Expect" STRING] ["Timeout" INT] 1196 CMDMODULEARGS 1197``` 1198``` 1199CMD_MODULETIMEOUT = "ModuleTimeout" INT 1200``` 1201``` 1202CMD_MOUSE = "Mouse" ["(" WINDOWSELECTOR ")"] BUTTON 1203 BINDINGCONTEXT BINDINGMODIFIERS COMMAND 1204``` 1205``` 1206CMD_MOVE = "Move" [MOVEARGS] 1207MOVEARGS = !!! 1208``` 1209``` 1210CMD_MOVETHRESHOLD = "MoveThreshold" [INT] 1211``` 1212``` 1213CMD_MOVETODESK = "MoveToDesk" DESKNUMBER 1214``` 1215``` 1216CMD_MOVETOPAGE = "MoveToPage" ["prev"] [MOVETOPAGEOPTIONS] 1217 2(MOVETOPAGECOORD[MOVETOPAGESUFFIX]) 1218MOVETOPAGEOPTIONS = "wrapx" / "wrapy" / "nodesklimitx" / "nodesklimity" 1219MOVETOPAGECOORD = INT 1220MOVETOPAGESUFFIX = "p" / "w" 1221``` 1222``` 1223CMD_MOVETOSCREEN = "MoveToScreen" [XRANDRMONITORNAME] 1224XRANDRMONITORNAME = !!! 1225``` 1226``` 1227CMD_NOP = "Nop" 1228``` 1229``` 1230CMD_OPAQUEMOVESIZE = "OpaqueMoveSize" [INT] 1231``` 1232``` 1233CMD_PIPEREAD = "PipeRead" TOKEN ["quiet"] 1234``` 1235``` 1236CMD_PLACEAGAIN = "PlaceAgain" *("Anim" "Icon") 1237``` 1238``` 1239CMD_PLUS = "Plus" RESTOFLINE 1240``` 1241``` 1242CMD_PRINTINFO = "PrintInfo" PRINTINFOSUBJECT 1243PRINTINFOSUBJECT = (PRINTINFOKEYWORD [PRINTINFOVAL]) 1244PRINTINFOVAL = "0" 1245PRINTINFOVAL =/ "1" 1246PRINTINFOVAL =/ "2" 1247PRINTINFOKEYWORD = "Colors" 1248PRINTINFOKEYWORD =/ "ImageCache" 1249PRINTINFOKEYWORD =/ "Locale" 1250PRINTINFOKEYWORD =/ "NLS" 1251PRINTINFOKEYWORD =/ "Style" 1252PRINTINFOKEYWORD =/ "Bindings" 1253PRINTINFOKEYWORD =/ "Infostore" 1254``` 1255``` 1256CMD_QUIT = "Quit" 1257``` 1258``` 1259CMD_QUITSCREEN = "QuitScreen" 1260``` 1261``` 1262CMD_READ = "Read" FILENAME ["quiet"] 1263``` 1264``` 1265CMD_CLASS_RECAPTURE = ("Recapture" / "RecaptureWindow") 1266``` 1267``` 1268CMD_CLASS_REFRESH = ("Refresh" / "RefreshWindow") 1269``` 1270``` 1271CMD_REPEAT = "Repeat" ["command"] 1272``` 1273``` 1274CMD_CLASS_RESIZE = ("Resize" / "ResizeMaximize") [RESIZEOPTS] 1275RESIZEOPTS = (RESIZEOPTS_BR / RESIZEOPTS_OTHER) [2RESIZEARG] 1276RESIZEOPTS_BR = ("bottomright" / "br") MOVEARGS 1277RESIZEOPTS_OTHER = 1278 ("frame" / "fixeddirection" / 1279 ("direction" (DIRS_CENTER / "automatic")) / 1280 ("warptoborder" ["automatic"])) 1281RESIZEARG = "keep" / (RESIZEARG_2 [RESIZEARGSUFFIX]) 1282RESIZEARG_2 = "w" / (["w"] RESIZEARGVAL) 1283RESIZEARGVAL = (SIGN INT) / POSINT 1284RESIZEARGSUFFIX = "p" / "c" 1285``` 1286``` 1287CMD_CLASS_RESIZEMOVE = ("ResizeMove" / "ResizeMoveMaximize") 1288 RESIZEOPTS MOVEARGS 1289``` 1290``` 1291CMD_RESTACKTRANSIENTS = "RestackTransients" 1292``` 1293``` 1294CMD_RESTART = "Restart" [STRING] 1295``` 1296``` 1297CMD_SCHEDULE = "Schedule" ["periodic"] INT [INT] RESTOFLINE_COMMAND 1298``` 1299``` 1300CMD_SCROLL = "Scroll" 1301 [(SCROLLDIM[SCROLLSUFFIX] SCROLLDIM[SCROLLSUFFIX]) / OPTION] 1302SCROLLDIM = INT 1303OPTION = "reverse" 1304SCROLLSUFFIX = "p" 1305``` 1306``` 1307CMD_SENDTOMODULE = "SendToModule" [MODULENAME] [STRING] 1308``` 1309``` 1310CMD_SETANIMATION = "SetAnimation" INT [INT] 1311``` 1312``` 1313CMD_SILENT = "Silent" RESTOFLINE_COMMAND 1314``` 1315``` 1316CMD_STATE = "State" STATENUM [BOOL] 1317``` 1318``` 1319CMD_CLASS_STICK = ("Stick" / "StickAcrossDesks" / "StickAcrossPages") 1320 [BOOL_OR_TOGGLE] 1321``` 1322``` 1323CMD_CLASS_STYLE = ("Style" / "WindowStyle") [STYLENAME] [STYLEOPTIONS] 1324; note: WindowStyle operates on context window 1325STYLEOPTIONS = STYLEOPTION ("," STYLEOPTION) 1326STYLEOPTION = !!! 1327``` 1328``` 1329CMD_TEARMENUOFF = "TearMenuOff" 1330; note: applies to menu context only 1331; note: ignores all arguments 1332; note: syntax description complete 1333``` 1334``` 1335CMD_TITLE = "Title" 1336; note: applies to menu context only 1337; note: ignores all arguments 1338; note: syntax description complete 1339``` 1340``` 1341CMD_TITLESTYLE = "TitleStyle" 1342;!!! 1343``` 1344``` 1345CMD_SETENV = "SetEnv" [TOKEN_ENVVAR [TOKEN_ENVVAL]] 1346TOKEN_ENVVAR = TOKEN 1347TOKEN_ENVVAL = TOKEN 1348; note: does nothing if no arguments are given 1349; note: uses an empty value string if the second argument is missing 1350; note: ignores rest of line 1351; note: syntax description complete 1352``` 1353``` 1354CMD_UNSETENV = "UnsetEnv" [TOKEN_ENVVAR] 1355; note: does nothing if argument is missing 1356; note: ignores rest of line 1357; note: syntax description complete 1358``` 1359``` 1360CMD_UPDATESTYLES = "UpdateStyles" 1361; note: ignores rest of line 1362; note: syntax description complete 1363``` 1364``` 1365CMD_WAIT = "Wait" [TOKEN_WAIT_PATTERN [STRIPPED_RESTOFLINE]] 1366; Note: The first argument, or - if present - the rest of the line is used as 1367; the pattern to wait for. 1368; note: the syntax with more than one argument is not documented. Comment in 1369; the sources call it the "old syntax". 1370; note: syntax description complete 1371``` 1372``` 1373CMD_WARPTOWINDOW = "WarpToWindow" [PERCENT_ARG_PAIR] 1374; note: arguments not used when used on an unmanaged window 1375; note: arguments are ignored if not valid 1376; note: ignores rest of line 1377; note: syntax description complete 1378``` 1379``` 1380;!!!todo 1381CMD_WINDOWLIST = "WindowList" ["(" WINDOWLISTCONDITIONS ")"] 1382 [WINDOWLISTPOSITION] [WINDOWLLISTOPTIONS] [COMMAND] 1383WINDOWLISTPOSITION = WINDOWLISTCONTEXT_RECTANGLE INT INT 1384 [WINDOWLISTCONTEXTOPTIONS] 1385WINDOWLISTCONTEXT_RECTANGLE = "Root" 1386WINDOWLISTCONTEXT_RECTANGLE =/ "XineramaRoot" 1387WINDOWLISTCONTEXT_RECTANGLE =/ "Mouse" 1388WINDOWLISTCONTEXT_RECTANGLE =/ "Window" 1389WINDOWLISTCONTEXT_RECTANGLE =/ "Interior" 1390WINDOWLISTCONTEXT_RECTANGLE =/ "Tiitle" 1391WINDOWLISTCONTEXT_RECTANGLE =/ ("Button" INT) 1392WINDOWLISTCONTEXT_RECTANGLE =/ "Icon" 1393WINDOWLISTCONTEXT_RECTANGLE =/ "Item" 1394WINDOWLISTCONTEXT_RECTANGLE =/ "Context" 1395WINDOWLISTCONTEXT_RECTANGLE =/ "This" 1396WINDOWLISTCONTEXT_RECTANGLE =/ ("Rectangle" GEOMETRY) 1397WINDOWLISTCONTEXTOPTIONS = "TearoffImmediately" 1398WINDOWLISTCONTEXTOPTIONS =/ "SelectInPlace" 1399WINDOWLISTOPTIONS = (WINDOWLISTKEYWORD [WINDOWLISTVALUE]) 1400WINDOWLISTOPTIONS = "Geometry" 1401WINDOWLISTOPTIONS =/ "NoGeometry" 1402WINDOWLISTOPTIONS =/ "NoGeometryWithInfo" 1403WINDOWLISTOPTIONS =/ "NoDeskNum" 1404WINDOWLISTOPTIONS =/ "NoLayer" 1405WINDOWLISTOPTIONS =/ "NoNumInDeskTitle" 1406WINDOWLISTOPTIONS =/ "NoCurrentDeskTitle" 1407WINDOWLISTOPTIONS =/ ("MaxLabelWidth" INT) 1408WINDOWLISTOPTIONS =/ "TitleForAllDesks" 1409WINDOWLISTOPTIONS =/ ("Function" FUNCNAME) 1410WINDOWLISTOPTIONS =/ ("Desk" INT) 1411WINDOWLISTOPTIONS =/ "CurrentDesk" 1412WINDOWLISTOPTIONS =/ "NoIcons" 1413WINDOWLISTOPTIONS =/ "Icons" 1414WINDOWLISTOPTIONS =/ "OnlyIcons" 1415WINDOWLISTOPTIONS =/ "NoNormal" 1416WINDOWLISTOPTIONS =/ "Normal" 1417WINDOWLISTOPTIONS =/ "OnlyNormal" 1418WINDOWLISTOPTIONS =/ "NoSticky" 1419WINDOWLISTOPTIONS =/ "Sticky" 1420WINDOWLISTOPTIONS =/ "OnlySticky" 1421WINDOWLISTOPTIONS =/ "NoStickyAcrossPages" 1422WINDOWLISTOPTIONS =/ "StickyAcrossPages" 1423WINDOWLISTOPTIONS =/ "OnlyStickyAcrossPages" 1424WINDOWLISTOPTIONS =/ "NoStickyAcrossDesks" 1425WINDOWLISTOPTIONS =/ "StickyAcrossDesks" 1426WINDOWLISTOPTIONS =/ "OnlyStickyAcrossDesks" 1427WINDOWLISTOPTIONS =/ "NoOnTop" 1428WINDOWLISTOPTIONS =/ "OnTop" 1429WINDOWLISTOPTIONS =/ "OnlyOnTop" 1430WINDOWLISTOPTIONS =/ "NoOnBottom" 1431WINDOWLISTOPTIONS =/ "OnlyOnBottom" 1432WINDOWLISTOPTIONS =/ (Layer INT [INT]) 1433WINDOWLISTOPTIONS =/ "UseSkipList" 1434WINDOWLISTOPTIONS =/ "OnlySkipList" 1435WINDOWLISTOPTIONS =/ "SortByResource" 1436WINDOWLISTOPTIONS =/ "SortByClass" 1437WINDOWLISTOPTIONS =/ "NoHotKeys" 1438WINDOWLISTOPTIONS =/ "SelectOnRelease" 1439WINDOWLISTOPTIONS =/ "ReverseOrder" 1440WINDOWLISTOPTIONS =/ "NoDeskSort" 1441WINDOWLISTOPTIONS =/ "CurrentAtEnd" 1442WINDOWLISTOPTIONS =/ "IconifiedAtEnd" 1443WINDOWLISTOPTIONS =/ "UseIconName" 1444WINDOWLISTOPTIONS =/ "Alphabetic" 1445WINDOWLISTOPTIONS =/ "NotAlphabetic" 1446WINDOWLISTKEYWORD = !!! 1447WINDOWLISTVALUE = !!! 1448; note: !!! to do 1449``` 1450``` 1451CMD_WINDOWSHADE = "WindowShade" ["shadeagain"] 1452 ["last" / DIRS_MINOR] [WINDOWSHADEMODE] 1453WINDOWSHADEMODE = WINDOWSHADETOGGLE / WINDOWSHADEON / WINDOWSHADEOFF 1454WINDOWSHADETOGGLE = () / TOGGLE 1455WINDOWSHADEON = TRUE 1456WINDOWSHADEOFF = FALSE / "2" 1457; note: defaults to toggle 1458; note: if "last" or DIRS_MINOR is present and valid, ignore the 1459; WINDOWSHADEMODE argument if present 1460; note: ignores rest of line 1461; note: syntax description complete 1462``` 1463``` 1464CMD_XSYNC = "XSync" 1465; note: ignores all arguments 1466; note: syntax description complete 1467``` 1468``` 1469CMD_XSYNCHRONIZE = "XSynchronize" [BOOL_OR_TOGGLE_DEFAULT_TOGGLE] 1470; note: argument defaults to toggle if missing or invalid 1471; note: ignores rest of line 1472; note: syntax description complete 1473``` 1474``` 1475CMD_XORPIXMAP = "XorPixmap" [IMAGEFILE] 1476; note: if argument is missing, maps to "XorValue 0" 1477; note: ignores rest of line 1478; note: syntax description complete 1479``` 1480``` 1481CMD_XORVALUE = "XorValue" [INTEGER_ARGUMENT] 1482; note: argument defaults to 0 if missing or malformed 1483; note: argument is converted to unsinged long before use 1484; note: argument should be parsed as unsigned long to prevent misinterpretation 1485; note: ignores rest of line 1486; note: syntax description complete 1487``` 1488``` 1489;; decor commands 1490 1491CMD_ADDTODECOR = "AddToDecor" [TOKEN_DECORNAME] RESTOFLINE_COMMAND 1492; note: does nothing if the decor name is missing 1493; note: if no decor with that name exists, creates a new one 1494; note: adds the command to the decor 1495; note: syntax description complete 1496 1497CMD_CHANGEDECOR = "ChangeDecor" [TOKEN_DECORNAME] 1498; note: does nothing if no decor name is given 1499; note: ignores rest of line 1500; note: syntax description complete 1501; note: operates on current window 1502 1503CMD_DESTROYDECOR = "DestroyDecor" ["recreate"] [TOKEN_DECORNAME] 1504; note: does nothing if no decor name is given 1505; note: ignores rest of line 1506; note: syntax description complete 1507 1508CMD_UPDATEDECOR = "UpdateDecor" [TOKEN_DECORNAME] 1509; note: updates all decors if decor name is missing 1510; note: ignores rest of line 1511; note: syntax description complete 1512``` 1513``` 1514;; conditional commands 1515 1516CMD_BREAK = "Break" [BREAKLEVELS] 1517BREAKLEVELS = INT 1518; note: uses -1 if BREAKLEVELS is missing or invalid (<= 0) 1519; note: syntax description complete 1520``` 1521``` 1522CMD_CLASS_PICK = ("ThisWindow" / "Pick" / "PointerWIndow" ) 1523 [SELECTCMDCONDITION] RESTOFLINE_COMMAND 1524; note: syntax description complete 1525``` 1526``` 1527CMD_ALL = "All" [ALLOPTIONS] [SELECTCMDCONDITION] RESTOFLINE_COMMAND 1528ALLOPTIONS = "Reverse" 1529ALLOPTIONS =/ "UseStack" 1530; note: syntax description complete 1531``` 1532``` 1533CMD_NOWINDOW = "NoWindow" RESTOFLINE_COMMAND 1534; note: executes the command without a window context 1535; note: syntax description complete 1536``` 1537``` 1538CMD_CLASS_CIRCULATE = ("Any" / "Current" / "Next" / "None" / "Prev") 1539 [SELECTCMDCONDITION] RESTOFLINE_COMMAND 1540; note: syntax description complete 1541``` 1542``` 1543CMD_DIRECTION = "Direction" ["FromPointer"] DIRS_CENTER 1544 [SELECTCMDCONDITION] RESTOFLINE_COMMAND 1545; note: syntax description complete 1546``` 1547``` 1548CMD_SCANFORWINDOW = "ScanForWindow" ["FromPointer"] DIRS_MAIN DIRS_MAIN 1549 [SELECTCMDCONDITION] RESTOFLINE_COMMAND 1550; note: syntax description complete 1551``` 1552``` 1553CMD_WINDOWID = "WindowId" 1554 [("root" [WINDOWIDSCREENNUM]) / (WINDOWID [SELECTCMDCONDITION])] 1555 RESTOFLINE_COMMAND 1556; does nothing if no argument is given of the window id is invalid 1557; note: syntax description complete 1558WINDOWIDSCREENNUM = POSINT 1559; note: valid range is 0 to <number of screens - 1> 1560; note: mvwm has replaced Xinerama with XRandr, therfore using integets to 1561; refer to monitors won't work. 1562WINDOWID = LONGINT 1563; note: long value parsed by strtol without error checking 1564``` 1565``` 1566CMD_TEST = "Test" TESTCMDCONDITION RESTOFLINE_COMMAND 1567TESTCMDCONDITIONSTRING = [STRING_IN_BRACES / STRING_IN_PARENTHESES] 1568; note: the STRING_IN_... is then parsed with the TESTCMDCONDITIONS rule 1569TESTCMDCONDITIONS = STRING_COMMA_TERMINATED *["," STRING_COMMA_TERMINATED] 1570; note: the TESTCMDCONDITIONS is then parsed with the TESTCMDCONDNEG rule 1571TESTCMDCONDNEG = ["!"] TESTCMDCOND 1572TESTCMDCOND = ("version" ((TOKEN_TESTCMDOPERATOR VERSION) / TOKEN_VERSIONPATTERN)) 1573TESTCMDCOND =/ ("EnvIsSet" TOKEN_ENVVAR) 1574TESTCMDCOND =/ ("EnvMatch" ENVMATCHARG) 1575TESTCMDCOND =/ (("EdgeHasPointer" / "EdgeIsActive") (DIRS_MAIN / "Any")) 1576TESTCMDCOND =/ ("Start" / "Init" / "Restart" / "Exit" / "Quit" / "ToRestart") 1577TESTCMDCOND =/ ("True" / "False") 1578TESTCMDCOND =/ (("F" / "R" / "W" / "X" / "I") "," FILENAME) 1579TOKEN_TESTCMDOPERATOR = ">=" / ">" / "<=" / "==" / "!=" 1580ENVMATCHARG = ("infostore."INFOSTOREKEY) / TOKEN_ENVVAR 1581TESTCMDVERSIONPATTERN = TOKEN 1582; note: TESTCMDVERSIONPATTERN is compared to the version string (x.y.z) and may 1583; contain wildcards. 1584``` 1585``` 1586CMD_TESTRC = "TestRc" [STRING_IN_BRACES / STRING_IN_PARENTHESES] 1587 RESTOFLINE_COMMAND 1588TESRRCRCNEG = ["!"] TESTRCRC 1589TESTRCRC = "1" / "match" 1590TESTRCRC =/ "0" / "nomatch" 1591TESTRCRC =/ "-1" / "error" 1592TESTRCRC =/ "-2" / "break" 1593; note: the STRING_IN_... is then parsed with the TESTRCRC rule 1594; note: does nothing if no command is given 1595: note: the condition inside the braces or parentheses may contain quoted 1596; note: syntax description complete 1597``` 1598``` 1599;; !!! more common rules 1600 1601; Integer arguments as parsed by GetIntegerArguments() 1602INTEGER_ARGUMENT = INT 1603 1604; Loaded by PictureFindImageFile 1605IMAGEFILE = TOKEN 1606; note: if file not found, try again with IMAGEFILE ".gz" 1607``` 1608``` 1609; parsed by parse_gravity_argument 1610DIR_N = "-" / "N" / "North" / "Top" / "t" / "Up" / "u" 1611DIR_E = "]" / "E" / "East" / "Right" / "r" / "Right" / "r" 1612DIR_S = "_" / "S" / "South" / "Bottom" / "b" / "Down" / "d" 1613DIR_W = "[" / "W" / "West" / "Left" / "l" / "Left" / "l" 1614DIR_NE = "^" / "NE" / "NorthEast" / "TopRight" / "tr" / "UpRight" / "ur" 1615DIR_SE = ">" / "SE" / "SouthEast" / "BottomRight" / "br" / "DownRight" / "dr" 1616DIR_SW = "v" / "SW" / "SouthWest" / "BottomLeft" / "bl" / "DownLeft" / "dl" 1617DIR_NE = "<" / "NW" / "NorthWest" / "TopLeft" / "tl" / "UpLeft" / "ul" 1618DIR_C = "." / "C" / "Center" / "Centre" 1619DIRS_MAJOR = DIR_N / DIR_E / DIR_S / DIR_W 1620DIRS_MINOR = DIRS_MAIN / DIR_NE / DIR_SE / DIR_SW / DIR_NW 1621DIRS_ALL = DIRS_MAIN / DIRS_DIAG / DIR_C 1622``` 1623``` 1624; Parsed by ParseToggleArgument 1625BOOL_OR_TOGGLE_DEFAULT_TOGGLE = BOOL / TOGGLE 1626BOOL_OR_TOGGLE_DEFAULT_TRUE = BOOL / TOGGLE 1627BOOL_OR_TOGGLE_DEFAULT_FALSE = BOOL / TOGGLE 1628BOOL_DEFAULT_TRUE = BOOL 1629BOOL_DEFAULT_FALSE = BOOL 1630``` 1631``` 1632; parsed by strtol 1633LONGINT = INT 1634``` 1635``` 1636; parsed by select_cmd() 1637SELECTCMDCONDITION = [STRING_IN_BRACES / STRING_IN_PARENTHESES] 1638; note: the STRING_IN_... is then parsed with the CONDITIONMASK rule 1639``` 1640``` 1641; parsed by CreateFlagString 1642CONDITIONMASK = [CM_COND_NEG *("," CM_COND_NEG)] 1643CM_COND_NEG = ["!"] CM_COND 1644CM_COND = ("AcceptsFocus") 1645CM_COND =/ ("Focused") 1646CM_COND =/ ("HasPointer") 1647CM_COND =/ ("Iconic") 1648CM_COND =/ ("Visible") 1649CM_COND =/ ("Overlapped") 1650CM_COND =/ ("PlacedByButton" [BUTTON]) 1651CM_COND =/ ("PlacedByButton3") 1652CM_COND =/ ("Raised") 1653CM_COND =/ ("Sticky") 1654CM_COND =/ ("StickyAcrossPages") 1655CM_COND =/ ("StickyAcrossDesks") 1656CM_COND =/ ("StickyIcon") 1657CM_COND =/ ("StickyAcrossPagesIcon") 1658CM_COND =/ ("StickyAcrossDesksIcon") 1659CM_COND =/ ("Maximized") 1660CM_COND =/ ("FixedSize") 1661CM_COND =/ ("FixedPosition") 1662CM_COND =/ ("HasHandles") 1663CM_COND =/ ("Iconifiable") 1664CM_COND =/ ("Maximizable") 1665CM_COND =/ ("Closable") 1666CM_COND =/ ("Shaded") 1667CM_COND =/ ("Transient") 1668CM_COND =/ ("PlacedByMvwm") 1669CM_COND =/ ("CurrentDesk") 1670CM_COND =/ ("CurrentPage") 1671CM_COND =/ ("CurrentGlobalPage") 1672CM_COND =/ ("CurrentPageAnyDesk") 1673CM_COND =/ ("CurrentScreen") 1674CM_COND =/ ("AnyScreen") 1675CM_COND =/ ("CurrentGlobalPageAnyDesk") 1676CM_COND =/ ("CirculateHit") 1677CM_COND =/ ("CirculateHitIcon") 1678CM_COND =/ ("CirculateHitShaded") 1679CM_COND =/ ("State" STATENUM) 1680CM_COND =/ ("Layer" [INT]) 1681; argument is the layer number; negative values are silently ignored 1682CM_COND =/ NAMELIST 1683CM_NAMELIST = NAME *["|" NAME] 1684CM_NAME = STRING 1685; up to and excluding next "|" 1686``` 1687``` 1688QUOTED_TOKEN = TOKEN 1689``` 1690``` 1691STATENUM = DIGIT / ("1" DIGIT) / ("2" DIGIT) / "30" / "31" 1692``` 1693``` 1694; Parsed by GetOnePercentArgument() 1695PERCENT_ARG = INT [PERCENT_ARG_SUFFIX] 1696PERCENT_ARG_SUFFIX = "p" / "P" 1697; Parsed by GetTwoPercentArguments() 1698PERCENT_ARG_PAIR = 2PERCENT_ARG / RECTANGLE_ARGS 1699; Parsed by GetRectangleArguments() 1700RECTANGLE_ARGS = INT RECT_CHARACTER INT 1701RECT_CHARACTER = %x01-09 / %x0b-4f / %x51-6f / %x71-ff 1702; note: any character except p, P and \n. 1703DQ_RECT_CHARACTER = %x01-09 / %x0b-4f / %x51-6f / %x71-ff 1704``` 1705``` 1706;; string rules 1707 1708DQUOTE = %x22 ; " 1709SQUOTE = %x27 ; ' 1710BQUOTE = %x60 ; ` 1711CQUOTE = %x5c ; \ 1712 1713; any character except \, ", ', `, whitespace, newline 1714SCHAR_UNQ = %x01-08 1715SCHAR_UNQ =/ %x0b-1f 1716SCHAR_UNQ =/ %x21 1717SCHAR_UNQ =/ %x23-26 1718SCHAR_UNQ =/ %x28-5b 1719SCHAR_UNQ =/ %x5d-5f 1720SCHAR_UNQ =/ %x61-ff 1721 1722; any character except \, ", ', `, ), whitespace, newline 1723SCHAR_UNQ_NO_CPAREN = %x01-08 1724SCHAR_UNQ_NO_CPAREN =/ %x0b-1f 1725SCHAR_UNQ_NO_CPAREN =/ %x21 1726SCHAR_UNQ_NO_CPAREN =/ %x23-26 1727SCHAR_UNQ_NO_CPAREN =/ %x28 1728SCHAR_UNQ_NO_CPAREN =/ %x2a-5b 1729SCHAR_UNQ_NO_CPAREN =/ %x5d-5f 1730SCHAR_UNQ_NO_CPAREN =/ %x61-ff 1731 1732; any character except \, ", ', `, ], whitespace, newline 1733SCHAR_UNQ_NO_CBRACE = %x01-08 1734SCHAR_UNQ_NO_CBRACE =/ %x0b-1f 1735SCHAR_UNQ_NO_CBRACE =/ %x21 1736SCHAR_UNQ_NO_CBRACE =/ %x23-26 1737SCHAR_UNQ_NO_CBRACE =/ %x28-5b 1738SCHAR_UNQ_NO_CBRACE =/ %x5e-5f 1739SCHAR_UNQ_NO_CBRACE =/ %x61-ff 1740 1741; any character except \, ", ', `, comma, whitespace, newline 1742SCHAR_UNQ_NO_COMMA = %x01-08 1743SCHAR_UNQ_NO_COMMA =/ %x0b-1f 1744SCHAR_UNQ_NO_COMMA =/ %x21 1745SCHAR_UNQ_NO_COMMA =/ %x23-26 1746SCHAR_UNQ_NO_COMMA =/ %x28-2b 1747SCHAR_UNQ_NO_COMMA =/ %x2d-5b 1748SCHAR_UNQ_NO_COMMA =/ %x5d-5f 1749SCHAR_UNQ_NO_COMMA =/ %x61-ff 1750 1751; \ followed by any character except newline 1752SCHAR_CQ_CHAR = "\" (%x01-09 /%x0b-ff) 1753 1754; any character except ", whitespace, newline (\ quotes resolved) 1755SCHAR_DQ = SCHAR_UNQ 1756SCHAR_DQ =/ SQUOTE 1757SCHAR_DQ =/ BQUOTE 1758SCHAR_DQ =/ SCHAR_CQ_CHAR 1759; any character except ', whitespace, newline (\ quotes resolved) 1760SCHAR_SQ = SCHAR_UNQ 1761SCHAR_SQ =/ DQUOTE 1762SCHAR_SQ =/ BQUOTE 1763SCHAR_SQ =/ SCHAR_CQ_CHAR 1764; any character except `, whitespace, newline (\ quotes resolved) 1765SCHAR_BQ = SCHAR_UNQ 1766SCHAR_BQ =/ DQUOTE 1767SCHAR_BQ =/ SQUOTE 1768SCHAR_BQ =/ SCHAR_CQ_CHAR 1769; any simple character or one quoted with \ 1770SCHAR_CQ = SCHAR_UNQ 1771SCHAR_CQ =/ SCHAR_CQ_CHAR 1772``` 1773``` 1774; unquoted string 1775STRING_UNQ = 1*SCHAR_UNQ 1776STRING_UNQ_NO_CPAREN = 1*SCHAR_UNQ_NO_CPAREN 1777STRING_UNQ_NO_CBRACE = 1*SCHAR_UNQ_NO_CBRACE 1778STRING_UNQ_NO_COMMASTRING_UNQ_NO_COMMA = 1*SCHAR_UNQ_NO_COMMA 1779; strings quoted with ", ', ` 1780STRING_DQ = DQUOTE 1*SCHAR_DQ DQUOTE 1781STRING_SQ = SQUOTE 1*SCHAR_SQ SQUOTE 1782STRING_BQ = BQUOTE 1*SCHAR_BQ BQUOTE 1783STRING_Q_PAIR = STRING_DQ / STRING_SQ / STRING_BQ 1784 1785STRING = 1*(STRING_UNQ / STRING_DQ / STRING_SQ / STRING_BQ) 1786TOKEN = STRING 1787 1788; a string with embedded whitespace enclosed in [] used in condigions 1789STRING_IN_BRACES = *WS 1790 "[" *(STRING_UNQ_NO_CBRACE / STRING_Q_PAIR / 1*WSC) "]" 1791; a string with embedded whitespace enclosed in () used in conditions 1792STRING_IN_PARENTHESES = *WS 1793 "[" *(STRING_UNQ_NO_CPAREN / STRING_Q_PAIR / 1*WSC) "]" 1794; a string with embedded whitespace terminated by an unquoted comma 1795STRING_COMMA_TERMINATED = *(STRING_UNQ_NO_COMMA / STRING_Q_PAIR / 1*WSC) 1796``` 1797``` 1798;; !!! obsolete commands removed in mvwm 1799 1800CMD_GNOMEBUTTON = "GnomeButton" 1801CMD_GNOMESHOWDESKS = "GnomeShowDesks" 1802CMD_SAVESESSION = "SaveSession" 1803CMD_SAVEQUITSESSION = "SaveQuitSession" 1804CMD_STROKE = "Stroke" 1805CMD_STROKEFUNC = "StrokeFunc" 1806CMD_QUITSESSION = "QuitSession" 1807CMD_XINERAMA = "Xinerama" 1808CMD_XINERAMAPRIMARYSCREEN = "XineramaPrimaryScreen" 1809CMD_XINERAMASLS = "XineramaSls" 1810CMD_XINERAMASLSSCREENS = "XineramaSlsScreens" 1811CMD_XINERAMASLSSIZE = "XineramaSlsSize" 1812 1813;; !!! obsolete commands in fvwm2 1814 1815CMD_COLORLIMIT = "ColorLimit" 1816CMD_WINDOWFONT = "WindowFont" ; Style * Font ... 1817CMD_WINDOWSHADEANIMATE = "WindowShadeAnimate" ; Style * WindowShadeSteps 1818CMD_WINDOWSDESK = "WindowsDesk" ; See 'MoveToDesk' 1819CMD_DESK = "Desk" ; See 'Gotodesk' 1820CMD_EDGERESISTANCE = "EdgeResistance" ; Style * EdgeMoveDelay, EdgeMoveResistance 1821CMD_GLOBALOPTS = "GlobalOpts" ; Various Style options 1822CMD_HILIGHTCOLOR = "HilightColor" ; Style 1823CMD_ICONFONT = "IconFont" FONTNAME ; Style 1824CMD_ICONPATH = "IconPath" ; ImagePath 1825CMD_PIXMAPPATH = "PixmapPath" ; ImagePath 1826CMD_SNAPATTRACTION = "SnapAttraction" ; Style * SnapAttraction 1827CMD_SNAPGRID = "SnapGrid" ; Style * SnapGrid 1828``` 1829