1 /* -*-c-*- */
2 /* This program is free software; you can redistribute it and/or modify
3  * it under the terms of the GNU General Public License as published by
4  * the Free Software Foundation; either version 2 of the License, or
5  * (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, see: <http://www.gnu.org/licenses/>
14  */
15 
16 /* ---------------------------- included header files ---------------------- */
17 
18 #include "config.h"
19 
20 #include "fvwm.h"
21 #include "execcontext.h"
22 #include "commands.h"
23 #include "cursor.h"
24 #include "functions.h"
25 #include "misc.h"
26 #include "functable.h"
27 
28 /* ---------------------------- local definitions -------------------------- */
29 
30 /* The function names in the first field *must* be in lowercase or else the
31  * function cannot be called.  The func parameter of the macro is also used
32  * for parsing by modules that rely on the old case of the commands.
33  */
34 #define CMD_ENT(cmd, func, cmd_id, flags, cursor) \
35 	{ cmd, func, cmd_id, flags, cursor }
36 
37 /* ---------------------------- local macros ------------------------------- */
38 
39 /* ---------------------------- imports ------------------------------------ */
40 
41 /* ---------------------------- included code files ------------------------ */
42 
43 /* ---------------------------- local types -------------------------------- */
44 
45 /* ---------------------------- forward declarations ----------------------- */
46 
47 /* ---------------------------- local variables ---------------------------- */
48 
49 /* ---------------------------- exported variables (globals) --------------- */
50 
51 /* IMPORTANT: command description should not be longer than 53 characters. */
52 /* If you change func_table format, change also perllib/FVWM/create-commands */
53 /* The next line must be blank for modules to properly parse this file. */
54 
55 const func_t func_table[] =
56 {
57 	/* CMD_ENT("#", CMD_Comment, 0, 0, 0), */
58 	/* # - Comment line (ignored) */
59 
60 	/* CMD_ENT("*", CMD_Asterisk, 0, 0, 0), */
61 	/* * - Module configuration line (no space after asterisk) */
62 
63 	CMD_ENT("+", CMD_Plus, F_ADDMENU2, 0, 0),
64 	/* + - Continue the last AddToFunc, AddToMenu or AddToDecor */
65 
66 	CMD_ENT("addbuttonstyle", CMD_AddButtonStyle, F_ADD_BUTTON_STYLE,
67 		FUNC_DECOR, 0),
68 	/* - Add to a button style (see ButtonStyle) */
69 
70 	CMD_ENT("addtitlestyle", CMD_AddTitleStyle, F_ADD_TITLE_STYLE,
71 		FUNC_DECOR, 0),
72 	/* - Add to a title style (see TitleStyle) */
73 
74 	CMD_ENT("addtodecor", CMD_AddToDecor, F_ADD_DECOR, 0, 0),
75 	/* - Add a decor definition (will be obsolete) */
76 
77 	CMD_ENT("addtofunc", CMD_AddToFunc, F_ADDFUNC, FUNC_ADD_TO, 0),
78 	/* - Add a function definition */
79 
80 	CMD_ENT("addtomenu", CMD_AddToMenu, F_ADDMENU, 0, 0),
81 	/* - Add a menu definition */
82 
83 	CMD_ENT("all", CMD_All, F_ALL, 0, 0),
84 	/* - Operate on all windows matching the given condition */
85 
86 	CMD_ENT("animatedmove", CMD_AnimatedMove, F_ANIMATED_MOVE,
87 		FUNC_NEEDS_WINDOW, CRS_MOVE),
88 	/* - Like Move, but uses animation to move windows */
89 
90 	CMD_ENT("any", CMD_Any, F_ANY, 0, 0),
91 	/* - Operate if there is any window matching the condition */
92 
93 	CMD_ENT("beep", CMD_Beep, F_BEEP, 0, 0),
94 	/* - Produce a bell */
95 
96 	CMD_ENT("borderstyle", CMD_BorderStyle, F_BORDERSTYLE,
97 		FUNC_DECOR, 0),
98 	/* - Define a window border look (will be reworked) */
99 
100 	CMD_ENT("break", CMD_Break, F_BREAK, 0, 0),
101 	/* - Stop executing the current (but not parent) function */
102 
103 	CMD_ENT("bugopts", CMD_BugOpts, F_BUG_OPTS, 0, 0),
104 	/* - Set some application bug workarounds */
105 
106 	CMD_ENT("busycursor", CMD_BusyCursor, F_BUSY_CURSOR, 0, 0),
107 	/* - Show/don't show the wait cursor in certain operations */
108 
109 	CMD_ENT("buttonstate", CMD_ButtonState, F_BUTTON_STATE, 0, 0),
110 	/* - Disable some titlebar button states (not recommended) */
111 
112 	CMD_ENT("buttonstyle", CMD_ButtonStyle, F_BUTTON_STYLE,
113 		FUNC_DECOR, 0),
114 	/* - Define a window button look (will be reworked) */
115 
116 	CMD_ENT("changedecor", CMD_ChangeDecor, F_CHANGE_DECOR,
117 		FUNC_NEEDS_WINDOW, CRS_SELECT),
118 	/* - Attach decor to a window (will be obsolete) */
119 
120 	CMD_ENT("changemenustyle", CMD_ChangeMenuStyle, F_CHANGE_MENUSTYLE,
121 		0, 0),
122 	/* - Attach menu style to a menu (see MenuStyle) */
123 
124 	CMD_ENT("cleanupcolorsets", CMD_CleanupColorsets, F_NOP, 0, 0),
125 	/* - Reset all used colorsets with the default gray colors */
126 
127 	CMD_ENT("clicktime", CMD_ClickTime, F_CLICK, 0, 0),
128 	/* - Set a time in milliseconds for click and double click */
129 
130 	CMD_ENT("close", CMD_Close, F_CLOSE,
131 		FUNC_NEEDS_WINDOW, CRS_DESTROY),
132 	/* - Try to Delete a window, if this fails, Destroy it */
133 
134 	CMD_ENT("colorlimit", CMD_ColorLimit, F_COLOR_LIMIT, 0, 0),
135 	/* - Set limit on colors used (obsolete) */
136 
137 	CMD_ENT("colormapfocus", CMD_ColormapFocus, F_COLORMAP_FOCUS, 0, 0),
138 	/* - Change the colormap behaviour for low-depth X servers */
139 
140 	CMD_ENT("colorset", CMD_Colorset, F_NOP, 0, 0),
141 	/* - Manage colors used like fg, bg, image bg, gradient bg */
142 
143 	CMD_ENT("copymenustyle", CMD_CopyMenuStyle, F_COPY_MENU_STYLE, 0, 0),
144 	/* - Copy the existing menu style to new or existing one */
145 
146 	CMD_ENT("current", CMD_Current, F_CURRENT, 0, 0),
147 	/* - Operate on the currently focused window */
148 
149 	CMD_ENT("cursormove", CMD_CursorMove, F_MOVECURSOR, 0, 0),
150 	/* - Move the cursor pointer non interactively */
151 
152 	CMD_ENT("cursorstyle", CMD_CursorStyle, F_CURSOR_STYLE, 0, 0),
153 	/* - Define different cursor pointer shapes and colors */
154 
155 	CMD_ENT("defaultcolors", CMD_DefaultColors, F_DFLT_COLORS, 0, 0),
156 	/* - Set colors for the feedback window (will be obsolete) */
157 
158 	CMD_ENT("defaultcolorset", CMD_DefaultColorset, F_DFLT_COLORSET,
159 		0, 0),
160 	/* - Set colors for the Move/Resize feedback window */
161 
162 	CMD_ENT("defaultfont", CMD_DefaultFont, F_DFLT_FONT, 0, 0),
163 	/* - The default font to use (mainly for feedback window) */
164 
165 	CMD_ENT("defaulticon", CMD_DefaultIcon, F_DFLT_ICON, 0, 0),
166 	/* - The default icon to use for iconified windows */
167 
168 	CMD_ENT("defaultlayers", CMD_DefaultLayers, F_DFLT_LAYERS, 0, 0),
169 	/* - Set StaysOnBottom, StaysPut, StaysOnTop layer numbers */
170 
171 	CMD_ENT("delete", CMD_Delete, F_DELETE,
172 		FUNC_NEEDS_WINDOW, CRS_DESTROY),
173 	/* - Try to delete a window using the X delete protocol */
174 
175 	CMD_ENT("deschedule", CMD_Deschedule, F_DESCHEDULE, 0, 0),
176 	/* - Remove commands sheduled earlier using Schedule */
177 
178 	CMD_ENT("desk", CMD_Desk, F_GOTO_DESK, 0, 0),
179 	/* - (obsolete, use GotoDesk instead) */
180 
181 	CMD_ENT("desktopconfiguration", CMD_DesktopConfiguration,
182 		F_DESKTOP_CONFIGURATION, 0, 0),
183 	/* - Defines how desktops are managed. */
184 
185 	CMD_ENT("desktopname", CMD_DesktopName, F_DESKTOP_NAME, 0, 0),
186 	/* - Define the desktop names used in WindowList, modules */
187 
188 	CMD_ENT("desktopsize", CMD_DesktopSize, F_SETDESK, 0, 0),
189 	/* - Set virtual desktop size in units of physical pages */
190 
191 	CMD_ENT("destroy", CMD_Destroy, F_DESTROY,
192 		FUNC_NEEDS_WINDOW, CRS_DESTROY),
193 	/* - Kill a window without any warning to an application */
194 
195 	CMD_ENT("destroydecor", CMD_DestroyDecor, F_DESTROY_DECOR, 0, 0),
196 	/* - Delete decor defined by AddToDecor (will be obsolete) */
197 
198 	CMD_ENT("destroyfunc", CMD_DestroyFunc, F_DESTROY_FUNCTION, 0, 0),
199 	/* - Delete function defined using AddToFunc */
200 
201 	CMD_ENT("destroymenu", CMD_DestroyMenu, F_DESTROY_MENU, 0, 0),
202 	/* - Delete menu defined using AddToMenu */
203 
204 	CMD_ENT("destroymenustyle", CMD_DestroyMenuStyle, F_DESTROY_MENUSTYLE,
205 		0, 0),
206 	/* - Delete menu style defined using MenuStyle */
207 
208 	CMD_ENT("destroymoduleconfig", CMD_DestroyModuleConfig, F_DESTROY_MOD,
209 		0, 0),
210 	/* - Delete matching module config lines defined using "*" */
211 
212 	CMD_ENT("destroystyle", CMD_DestroyStyle, F_DESTROY_STYLE, 0, 0),
213 	/* - Delete style defined using Style */
214 
215 	CMD_ENT("destroywindowstyle", CMD_DestroyWindowStyle,
216 		F_DESTROY_WINDOW_STYLE, FUNC_NEEDS_WINDOW, CRS_SELECT),
217 	/* - Delete style defined using WindowStyle */
218 
219 	CMD_ENT("direction", CMD_Direction, F_DIRECTION, 0, 0),
220 	/* - Operate on the next window in the specified direction */
221 
222 	CMD_ENT("echo", CMD_Echo, F_ECHO, 0, 0),
223 	/* - Print message to stderr, mainly for debugging */
224 
225 	CMD_ENT("echofuncdefinition", CMD_EchoFuncDefinition,
226 		F_ECHO_FUNC_DEFINITION, 0, 0),
227 	/* - Print the definion of a function */
228 
229 	CMD_ENT("edgecommand", CMD_EdgeCommand, F_EDGE_COMMAND, 0, 0),
230 	/* - Bind one or another screen edge to an fvwm action */
231 
232 	CMD_ENT("edgeleavecommand", CMD_EdgeLeaveCommand, F_EDGE_LEAVE_COMMAND,
233 		0, 0),
234 	/* - Bind one or another screen edge to an fvwm action */
235 
236 	CMD_ENT("edgeresistance", CMD_EdgeResistance, F_EDGE_RES, 0, 0),
237 	/* - Control viewport scrolling and window move over edge */
238 
239 	CMD_ENT("edgescroll", CMD_EdgeScroll, F_EDGE_SCROLL, 0, 0),
240 	/* - Control how much of the viewport is scrolled if any */
241 
242 	CMD_ENT("edgethickness", CMD_EdgeThickness, F_NOP, 0, 0),
243 	/* - Control how closely to edge to run command/scrolling */
244 
245 	CMD_ENT("emulate", CMD_Emulate, F_EMULATE, 0, 0),
246 	/* - Only used to position the position/size window */
247 
248 	CMD_ENT("escapefunc", CMD_EscapeFunc, F_ESCAPE_FUNC, 0, 0),
249 	/* - Abort a wait or ModuleSynchonous command */
250 
251 	CMD_ENT("ewmhbasestruts", CMD_EwmhBaseStruts, F_EWMH_BASE_STRUTS, 0, 0),
252 	/* - Define restricted areas of the screen */
253 
254 	CMD_ENT("ewmhnumberofdesktops", CMD_EwmhNumberOfDesktops,
255 		F_EWMH_NUMBER_OF_DESKTOPS, 0, 0),
256 	/* - For ewmh pager, define number of desktops */
257 
258 	CMD_ENT("exec", CMD_Exec, F_EXEC, 0, 0),
259 	/* - Execute an external command */
260 
261 	CMD_ENT("execuseshell", CMD_ExecUseShell, F_EXEC_SETUP, 0, 0),
262 	/* - The shell to use to execute an external command */
263 
264 	CMD_ENT("fakeclick", CMD_FakeClick, F_FAKE_CLICK, 0, 0),
265 	/* - Generate a mouse click */
266 
267 	CMD_ENT("fakekeypress", CMD_FakeKeypress, F_FAKE_KEYPRESS,
268 		0, 0),
269 	/* - Send a keyboard event to a window */
270 
271 	CMD_ENT("flipfocus", CMD_FlipFocus, F_FLIP_FOCUS,
272 		FUNC_NEEDS_WINDOW, CRS_SELECT),
273 	/* - Focus a window without rotating windowlist order */
274 
275 	CMD_ENT("focus", CMD_Focus, F_FOCUS,
276 		FUNC_NEEDS_WINDOW, CRS_SELECT),
277 	/* - Give focus to a window */
278 
279 	CMD_ENT("focusstyle", CMD_FocusStyle, F_FOCUSSTYLE, 0, 0),
280 	/* - Configure focus and raise policy for windows */
281 
282 	CMD_ENT("function", CMD_Function, F_FUNCTION, 0, 0),
283 	/* Function - Execute a user defined function, see AddToFunc */
284 
285 	CMD_ENT("geometrywindow", CMD_GeometryWindow, F_GEOMWINDOW, 0, 0),
286 	/* - Configuration settings for position/size window */
287 
288 	CMD_ENT("globalopts", CMD_GlobalOpts, F_GLOBAL_OPTS, 0, 0),
289 	/* - (obsolete, use corresponding Style * instead) */
290 
291 	CMD_ENT("gotodesk", CMD_GotoDesk, F_GOTO_DESK, 0, 0),
292 	/* - Switch viewport to another desk same page */
293 
294 	CMD_ENT("gotodeskandpage", CMD_GotoDeskAndPage, F_GOTO_DESK, 0, 0),
295 	/* - Switch viewport to another desk and page */
296 
297 	CMD_ENT("gotopage", CMD_GotoPage, F_GOTO_PAGE, 0, 0),
298 	/* - Switch viewport to another page same desk */
299 
300 	CMD_ENT("hidegeometrywindow", CMD_HideGeometryWindow,
301 		F_HIDEGEOMWINDOW, 0, 0),
302 	/* - (obsolete, use GeometryWindow Hide instead) */
303 
304 	CMD_ENT("hilightcolor", CMD_HilightColor, F_HICOLOR, 0, 0),
305 	/* - (obsolete, use Style * HighlightFore/Back) */
306 
307 	CMD_ENT("hilightcolorset", CMD_HilightColorset, F_HICOLORSET, 0, 0),
308 	/* - (obsolete, use Style * HighlightColorset) */
309 
310 	CMD_ENT("iconfont", CMD_IconFont, F_ICONFONT, 0, 0),
311 	/* - (obsolete, use Style * IconFont) */
312 
313 	CMD_ENT("iconify", CMD_Iconify, F_ICONIFY,
314 		FUNC_NEEDS_WINDOW, CRS_SELECT),
315 	/* - Change iconification status of a window (minimize) */
316 
317 	CMD_ENT("iconpath", CMD_IconPath, F_ICON_PATH, 0, 0),
318 	/* - (obsolete, use ImagePath instead) */
319 
320 	CMD_ENT("ignoremodifiers", CMD_IgnoreModifiers, F_IGNORE_MODIFIERS,
321 		0, 0),
322 	/* - Modifiers to ignore on mouse and key bindings */
323 
324 	CMD_ENT("imagepath", CMD_ImagePath, F_IMAGE_PATH, 0, 0),
325 	/* - Directories to search for images */
326 
327 	CMD_ENT("infostoreadd", CMD_InfoStoreAdd, F_INFOSTOREADD, 0, 0),
328 	/* - Adds an entry (key/value pairs) to the infostore */
329 
330 	CMD_ENT("infostoreclear", CMD_InfoStoreClear, F_INFOSTORECLEAR, 0, 0),
331 	/* - Clears all entries from the infostore */
332 
333 	CMD_ENT("infostoreremove", CMD_InfoStoreRemove, F_INFOSTOREREMOVE, 0, 0),
334 	/* - Removes an entry from the infostore */
335 
336 	CMD_ENT(PRE_KEEPRC, CMD_KeepRc, F_KEEPRC, 0, 0),
337 	/* KeepRc - Do not modify the previous command return code */
338 
339 	CMD_ENT("key", CMD_Key, F_KEY, 0, 0),
340 	/* - Bind or unbind a key to an fvwm action */
341 
342 	CMD_ENT("killmodule", CMD_KillModule, F_KILL_MODULE, 0, 0),
343 	/* - Stops an fvwm module */
344 
345 	CMD_ENT("layer", CMD_Layer, F_LAYER,
346 		FUNC_NEEDS_WINDOW, CRS_SELECT),
347 	/* - Change the layer of a window */
348 
349 	CMD_ENT("localepath", CMD_LocalePath, F_LOCALE_PATH, 0, 0),
350 	/* - Directories/domains to search for locale data */
351 
352 	CMD_ENT("lower", CMD_Lower, F_LOWER,
353 		FUNC_NEEDS_WINDOW, CRS_SELECT),
354 	/* - Lower a window within a layer */
355 
356 	CMD_ENT("maximize", CMD_Maximize, F_MAXIMIZE,
357 		FUNC_NEEDS_WINDOW, CRS_SELECT),
358 	/* - Toggle maximal-size status of a window */
359 
360 	CMD_ENT("menu", CMD_Menu, F_STAYSUP, 0, 0),
361 	/* - Display (post) a menu */
362 
363 	CMD_ENT("menustyle", CMD_MenuStyle, F_MENUSTYLE, 0, 0),
364 	/* - Control appearance and behavior of a menu */
365 
366 	CMD_ENT("module", CMD_Module, F_MODULE, 0, 0),
367 	/* - Invoke an fvwm module */
368 
369 	CMD_ENT("modulelistenonly", CMD_ModuleListenOnly, F_MODULE_LISTEN_ONLY,
370 		0, 0),
371 	/* - Invoke an fvwm module */
372 
373 	CMD_ENT("modulepath", CMD_ModulePath, F_MODULE_PATH, 0, 0),
374 	/* - Modify the directories to search for an fvwm module */
375 
376 	CMD_ENT("modulesynchronous", CMD_ModuleSynchronous, F_MODULE_SYNC,
377 		0, 0),
378 	/* - Invoke an fvwm module synchronously */
379 
380 	CMD_ENT("moduletimeout", CMD_ModuleTimeout, F_NOP, 0, 0),
381 	/* - Set timeout value for response from module */
382 
383 	CMD_ENT("mouse", CMD_Mouse, F_MOUSE, 0, 0),
384 	/* - Bind or unbind a mouse button press to an fvwm action */
385 
386 	CMD_ENT("move", CMD_Move, F_MOVE,
387 		FUNC_NEEDS_WINDOW, CRS_MOVE),
388 	/* - Move a window */
389 
390 	CMD_ENT("movethreshold", CMD_MoveThreshold, F_MOVE_THRESHOLD, 0, 0),
391 	/* - Set number of pixels in a click and a hold vs. a drag */
392 
393 	CMD_ENT("movetodesk", CMD_MoveToDesk, F_MOVE_TO_DESK,
394 		FUNC_NEEDS_WINDOW, CRS_SELECT),
395 	/* - Move a window to another desk same page */
396 
397 	CMD_ENT("movetopage", CMD_MoveToPage, F_MOVE_TO_PAGE,
398 		FUNC_NEEDS_WINDOW, CRS_SELECT),
399 	/* - Move a window to another page same desk */
400 
401 	CMD_ENT("movetoscreen", CMD_MoveToScreen, F_MOVE_TO_SCREEN,
402 		FUNC_NEEDS_WINDOW, CRS_SELECT),
403 	/* - Move a window to another Xinerama screen */
404 
405 	CMD_ENT("next", CMD_Next, F_NEXT, 0, 0),
406 	/* - Operate on the next window matching conditions */
407 
408 	CMD_ENT("none", CMD_None, F_NONE, 0, 0),
409 	/* - Perform command if no window matches conditions */
410 
411 	CMD_ENT("nop", CMD_Nop, F_NOP, FUNC_DONT_REPEAT, 0),
412 	/* - Do nothing (used internally) */
413 
414 	CMD_ENT("nowindow", CMD_NoWindow, F_NOP, 0, 0),
415 	/* - Prefix that runs a command without a window context */
416 
417 	CMD_ENT("opaquemovesize", CMD_OpaqueMoveSize, F_OPAQUE, 0, 0),
418 	/* - Set maximum size window fvwm should move opaquely */
419 
420 	CMD_ENT("pick", CMD_Pick, F_PICK, FUNC_NEEDS_WINDOW, CRS_SELECT),
421 	/* - Prefix to force a window context, prompted if needed */
422 
423 	CMD_ENT("piperead", CMD_PipeRead, F_READ, 0, 0),
424 	/* - Exec system command interpret output as fvwm commands */
425 
426 	CMD_ENT("pixmappath", CMD_PixmapPath, F_PIXMAP_PATH, 0, 0),
427 	/* - (obsolete, use ImagePath instead) */
428 
429 	CMD_ENT("placeagain", CMD_PlaceAgain, F_PLACEAGAIN,
430 		FUNC_NEEDS_WINDOW, CRS_SELECT),
431 	/* - Replace a window using initial window placement logic */
432 
433 	CMD_ENT("pointerkey", CMD_PointerKey, F_POINTERKEY, 0, 0),
434 	/* - Bind an action to a key based on pointer not focus */
435 
436 	CMD_ENT("pointerwindow", CMD_PointerWindow, F_POINTERWINDOW, 0, 0),
437 	/* - Operate on window under pointer if it meets conditions */
438 
439 	CMD_ENT("popup", CMD_Popup, F_POPUP, 0, 0),
440 	/* - Display (pop-up) a menu, see also Menu */
441 
442 	CMD_ENT("prev", CMD_Prev, F_PREV, 0, 0),
443 	/* - Operate on the precious window matching conditions */
444 
445 	CMD_ENT("printinfo", CMD_PrintInfo, F_PRINTINFO, 0, 0),
446 	/* - Print information about the state of fvwm */
447 
448 	CMD_ENT("propertychange", CMD_PropertyChange, F_NOP, 0, 0),
449 	/* - Internal, used for inter-module communication */
450 
451 	CMD_ENT("quit", CMD_Quit, F_QUIT, 0, 0),
452 	/* - Exit fvwm */
453 
454 	CMD_ENT("quitscreen", CMD_QuitScreen, F_QUIT_SCREEN, 0, 0),
455 	/* - Stop managing the specified screen */
456 
457 	CMD_ENT("quitsession", CMD_QuitSession, F_QUIT_SESSION, 0, 0),
458 	/* - Ask session manager to shut down itself and fvwm */
459 
460 	CMD_ENT("raise", CMD_Raise, F_RAISE,
461 		FUNC_NEEDS_WINDOW, CRS_SELECT),
462 	/* - Raise a window in a layer */
463 
464 	CMD_ENT("raiselower", CMD_RaiseLower, F_RAISELOWER,
465 		FUNC_NEEDS_WINDOW, CRS_SELECT),
466 	/* - Alternately raise or lower a window in a layer */
467 
468 	CMD_ENT("read", CMD_Read, F_READ, 0, 0),
469 	/* - Read fvwm commands from a file */
470 
471 	CMD_ENT("readwritecolors", CMD_ReadWriteColors, F_NOP, 0, 0),
472 	/* - Used for colorset speed hacks (will be removed?) */
473 
474 	CMD_ENT("refresh", CMD_Refresh, F_REFRESH, 0, 0),
475 	/* - Cause all windows to redraw themselves */
476 
477 	CMD_ENT("refreshwindow", CMD_RefreshWindow, F_REFRESH,
478 		FUNC_NEEDS_WINDOW, CRS_SELECT),
479 	/* - Cause one window to redraw itself */
480 
481 	CMD_ENT(PRE_REPEAT, CMD_Repeat, F_REPEAT, FUNC_DONT_REPEAT, 0),
482 	/* - Repeat (very unreliably) the last command, don't use */
483 
484 	CMD_ENT("resize", CMD_Resize, F_RESIZE,
485 		FUNC_NEEDS_WINDOW, CRS_RESIZE),
486 	/* - Cause a window to be resized */
487 
488 	CMD_ENT("resizemaximize", CMD_ResizeMaximize, F_RESIZE_MAXIMIZE,
489 		FUNC_NEEDS_WINDOW, CRS_RESIZE),
490 	/* - Resize a window and mark window as maximized */
491 
492 	CMD_ENT("resizemove", CMD_ResizeMove, F_RESIZEMOVE,
493 		FUNC_NEEDS_WINDOW, CRS_RESIZE),
494 	/* - Resize and move in one operation */
495 
496 	CMD_ENT("resizemovemaximize", CMD_ResizeMoveMaximize,
497 		F_RESIZEMOVE_MAXIMIZE, FUNC_NEEDS_WINDOW, CRS_RESIZE),
498 	/* - Resize and move in one operation and mark maximized */
499 
500 	CMD_ENT("restacktransients", CMD_RestackTransients, F_RESTACKTRANSIENTS,
501 		FUNC_NEEDS_WINDOW, CRS_SELECT),
502 	/* - Regroup the window transients in the stack */
503 
504 	CMD_ENT("restart", CMD_Restart, F_RESTART, 0, 0),
505 	/* - Restart itself or replace with another window manager */
506 
507 	CMD_ENT("savequitsession", CMD_SaveQuitSession, F_SAVE_QUIT_SESSION,
508 		0, 0),
509 	/* - Cause session manager to save and shutdown fvwm */
510 
511 	CMD_ENT("savesession", CMD_SaveSession, F_SAVE_SESSION, 0, 0),
512 	/* - Cause session manager to save the session */
513 
514 	CMD_ENT("scanforwindow", CMD_ScanForWindow, F_SCANFORWINDOW, 0, 0),
515 	/* - Operate on the matching window in the given direction */
516 
517 	CMD_ENT("schedule", CMD_Schedule, F_SCHEDULE, 0, 0),
518 	/* - Run an fvwm command after a delay */
519 
520 	CMD_ENT("scroll", CMD_Scroll, F_SCROLL, 0, 0),
521 	/* - Scroll the desktop viewport */
522 
523 	CMD_ENT("send_configinfo", CMD_Send_ConfigInfo, F_CONFIG_LIST,
524 		FUNC_DONT_REPEAT, 0),
525 	/* - Internal, used for module communication */
526 
527 	CMD_ENT("send_reply", CMD_Send_Reply, F_SEND_REPLY,
528 		FUNC_DONT_REPEAT, 0),
529 	/* - Internal, used for module communication */
530 
531 	CMD_ENT("send_windowlist", CMD_Send_WindowList, F_SEND_WINDOW_LIST,
532 		FUNC_DONT_REPEAT, 0),
533 	/* - Internal, used for module communication */
534 
535 	CMD_ENT("sendtomodule", CMD_SendToModule, F_SEND_STRING,
536 		FUNC_DONT_REPEAT, 0),
537 	/* - Send a string (action) to a module */
538 
539 	CMD_ENT("set_mask", CMD_set_mask, F_SET_MASK, FUNC_DONT_REPEAT, 0),
540 	/* - Internal, used for module communication */
541 
542 	CMD_ENT("set_nograb_mask", CMD_set_nograb_mask, F_SET_NOGRAB_MASK,
543 		FUNC_DONT_REPEAT, 0),
544 	/* - Internal, used for module communication */
545 
546 	CMD_ENT("set_sync_mask", CMD_set_sync_mask, F_SET_SYNC_MASK,
547 		FUNC_DONT_REPEAT, 0),
548 	/* - Internal, used for module communication */
549 
550 	CMD_ENT("setanimation", CMD_SetAnimation, F_SET_ANIMATION, 0, 0),
551 	/* - Control animated moves and menus */
552 
553 	CMD_ENT("setenv", CMD_SetEnv, F_SETENV, 0, 0),
554 	/* - Set an environment variable */
555 
556 	CMD_ENT(PRE_SILENT, CMD_Silent, F_SILENT, 0, 0),
557 	/* Silent - Suppress errors on command, avoid window selection */
558 
559 	CMD_ENT("snapattraction", CMD_SnapAttraction, F_SNAP_ATT, 0, 0),
560 	/* - Control attraction of windows during move */
561 
562 	CMD_ENT("snapgrid", CMD_SnapGrid, F_SNAP_GRID, 0, 0),
563 	/* - Control grid used with SnapAttraction */
564 
565 	CMD_ENT("state", CMD_State, F_STATE,
566 		FUNC_NEEDS_WINDOW, CRS_SELECT),
567 	/* - Control user defined window states */
568 
569 	CMD_ENT("status", CMD_Status, F_STATUS, 0, 0),
570 	/* - Sets if we send status. */
571 
572 	CMD_ENT("stick", CMD_Stick, F_STICK,
573 		FUNC_NEEDS_WINDOW, CRS_SELECT),
574 	/* - Change window stickyness */
575 
576 	CMD_ENT("stickacrossdesks", CMD_StickAcrossDesks, F_STICKACROSSDESKS,
577 		FUNC_NEEDS_WINDOW, CRS_SELECT),
578 	/* - Change window stickyness on a desk basis */
579 
580 	CMD_ENT("stickacrosspages", CMD_StickAcrossPages, F_STICKACROSSPAGES,
581 		FUNC_NEEDS_WINDOW, CRS_SELECT),
582 	/* - Change window stickyness on a page basis */
583 
584 	CMD_ENT("style", CMD_Style, F_STYLE, 0, 0),
585 	/* - Set attributes of windows that match a pattern */
586 
587 	CMD_ENT("tearmenuoff", CMD_TearMenuOff, F_TEARMENUOFF, 0, 0),
588 	/* TearMenuOff - Convert a menu to a window, for use in menu items */
589 
590 	CMD_ENT("test", CMD_Test, F_TEST_, 0, 0),
591 	/* - Execute command if conditions are met */
592 
593 	CMD_ENT("testrc", CMD_TestRc, F_TESTRC, 0, 0),
594 	/* - Conditional switch (may be changed) */
595 
596 	CMD_ENT("thiswindow", CMD_ThisWindow, F_THISWINDOW, 0, 0),
597 	/* - Operate on the context window if it meets conditions */
598 
599 	CMD_ENT("title", CMD_Title, F_TITLE, 0, 0),
600 	/* Title - Insert title into a menu */
601 
602 	CMD_ENT("titlestyle", CMD_TitleStyle, F_TITLESTYLE, FUNC_DECOR, 0),
603 	/* - Control window title */
604 
605 	CMD_ENT("unsetenv", CMD_UnsetEnv, F_SETENV, 0, 0),
606 	/* - Remove an environment variable */
607 
608 	CMD_ENT("updatedecor", CMD_UpdateDecor, F_UPDATE_DECOR, 0, 0),
609 	/* - Update window decor (obsolete and not needed anymore) */
610 
611 	CMD_ENT("updatestyles", CMD_UpdateStyles, F_UPDATE_STYLES, 0, 0),
612 	/* - Cause styles to update while still in a function */
613 
614 	CMD_ENT("wait", CMD_Wait, F_WAIT, 0, 0),
615 	/* - Pause until a matching window appears */
616 
617 	CMD_ENT("warptowindow", CMD_WarpToWindow, F_WARP,
618 		FUNC_NEEDS_WINDOW | FUNC_ALLOW_UNMANAGED,
619 		CRS_SELECT),
620 	/* - Warp the pointer to a window */
621 
622 	CMD_ENT("windowfont", CMD_WindowFont, F_WINDOWFONT, 0, 0),
623 	/* - (obsolete, use Style * Font) */
624 
625 	CMD_ENT("windowid", CMD_WindowId, F_WINDOWID, 0, 0),
626 	/* - Execute command for window matching the windowid */
627 
628 	CMD_ENT("windowlist", CMD_WindowList, F_WINDOWLIST, 0, 0),
629 	/* - Display the window list as a menu to select a window */
630 
631 	CMD_ENT("windowshade", CMD_WindowShade, F_WINDOW_SHADE,
632 		FUNC_NEEDS_WINDOW, CRS_SELECT),
633 	/* - Shade/unshade a window */
634 
635 	CMD_ENT("windowshadeanimate", CMD_WindowShadeAnimate, F_SHADE_ANIMATE,
636 		0, 0),
637 	/* - (obsolete, use Style * WindowShadeSteps) */
638 
639 	CMD_ENT("windowstyle", CMD_WindowStyle, F_WINDOW_STYLE,
640 		FUNC_NEEDS_WINDOW, CRS_SELECT),
641 	/* - Set styles on the selected window */
642 
643 	CMD_ENT("xorpixmap", CMD_XorPixmap, F_XOR, 0, 0),
644 	/* - Use a pixmap for move/resize rubber-band */
645 
646 	CMD_ENT("xorvalue", CMD_XorValue, F_XOR, 0, 0),
647 	/* - Change bits used for move/resize rubber-band */
648 
649 	CMD_ENT("xsync", CMD_XSync, F_XSYNC, 0, 0),
650 	/* - For debugging, send all pending requests to X server */
651 
652 	CMD_ENT("xsynchronize", CMD_XSynchronize, F_XSYNCHRONIZE, 0, 0),
653 	/* - For debugging, cause all X requests to be synchronous */
654 
655 	{ "", 0, 0, 0, 0 }
656 };
657