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