31.4.1. CursorMove
CursorMove horizontal[p] vertical[p]
Moves the mouse pointer by horizontal pages in the X direction and vertical pages in the Y direction. Either or both entries may be negative. Both horizontal and vertical values are expressed in percent of pages, so
CursorMove 100 100
means to move down and right by one full page.
CursorMove 50 25
means to move right half a page and down a quarter of a page. Alternatively, the distance can be specified in pixels by appending a 'p' to the horizontal and/or vertical specification. For example
CursorMove -10p -10p
means move ten pixels up and ten pixels left. The CursorMove function should not be called from pop-up menus.
31.4.2. FlipFocus
FlipFocus [NoWarp]
Executes a Focus command as if the user had used the pointer to select the window. This command alters the order of the WindowList in the same way as clicking in a window to focus, i.e. the target window is removed from the WindowList and placed at the start. This command is recommended for use with the Direction command and in the function invoked from WindowList.
31.4.3. Focus
Focus [NoWarp]
Sets the keyboard focus to the selected window. If the NoWarp argument is given, this is all it does. Otherwise it also moves the viewport or window as needed to make the selected window visible. This command does not automatically raise the window. Does not warp the pointer into the selected window (see WarpToWindow function). Does not de-iconify. This command does not alter the order of the WindowList, it rotates the WindowList around so that the target window is at the start.
When the NoWarp argument is given, Focus cannot transfer the keyboard focus to windows on other desks.
To raise and/or warp a pointer to a window together with Focus or FlipFocus, use a function, like:
AddToFunc SelectWindow
+ I Focus
+ I Iconify false
+ I Raise
+ I WarpToWindow 50 8p
31.4.4. WarpToWindow
WarpToWindow x[p] y[p]
Warps the cursor to the associated window. The parameters x and y default to percentage of window down and in from the upper left hand corner (or number of pixels down and in if 'p' is appended to the numbers). If a number is negative the opposite edge is used and the direction reversed. This command works also with windows that are not managed by fvwm. In this case fvwm does not bring the window onto the screen if it is not visible. For example it is possible to warp the pointer to the center of the root window on screen 1:
WindowId root 1 WarpToWindow 50 50
Window State
31.5.1. Close
Close
If the window accepts the delete window protocol a message is sent to the window asking it to gracefully remove itself. If the window does not understand the delete window protocol then the window is destroyed as with the Destroy command. Note: if the window accepts the delete window protocol but does not close itself in response, the window is not deleted.
31.5.2. Delete
Delete
Sends a message to a window asking that it remove itself, frequently causing the application to exit.
31.5.3. Destroy
Destroy
Destroys an application window, which usually causes the application to crash and burn.
31.5.4. Iconify
Iconify [bool]
Iconifies a window if it is not already iconified or de-iconifies it if it is already iconified. The optional argument bool is a boolean argument. "True" means only iconification is allowed, while "False" forces de-iconification. Using "toggle" switches between iconified and de-iconified states.
There are a number of Style options which influence the appearance and behavior of icons (e.g. StickyIcon, NoIcon).
For backward compatibility, the optional argument may also be a positive number instead of "True", or a negative number instead of "False". Note that this syntax is obsolete, and will be removed in the future.
31.5.5. Maximize
Maximize [flags] [bool] [horizontal[p]] [vertical[p]]
Without its optional arguments (or if the bool bit has the value "toggle") Maximize causes the window to alternately switch from a full-screen size to its normal size. To force a window into maximized (normal) state you can use a "True" or "False" value for the bool argument.
With the optional arguments horizontal and vertical, which are expressed as percentage of a full screen, the user can control the new size of the window. An optional suffix 'p' can be used to indicate pixels instead of percents of the screen size. If horizontal is greater than 0 then the horizontal dimension of the window is set to horizontal*screen_width/100. If the value is smaller than 0 the size is subtracted from the screen width, i.e. -25 is the same as 75. If horizontal is "grow", it is maximized to curren available space until finding any obstacle. The vertical resizing is similar. If both horizontal and vertical values are "grow", it expands vertically first, then horizontally to find space. Instead of the horizontal "grow" argument, "growleft" or "growright" can be used respectively "growup" and "growdown". The optional flags argument is a space separated list containing the following key words: ewmhiwa, growonwindowlayer, growonlayers and screen. ewmhiwa causes fvwm to ignore the EWMH working area. growonwindowlayer causes the various grow methods to ignore windows with a layer other than the current layer of the window which is maximized. The growonlayers option must have two integer arguments. The first one is the minimum layer and the second one the maximum layer to use. Windows that are outside of this range of layers are ignored by the grow methods. A negative value as the first or second argument means to assume no minimum or maximum layer. screen must have an argument which specifies the Xinerama screen on which to operate. It can be 'p' for the primary screen, 'c' for the current screen (containing the mouse pointer), 'g' for the global screen or the screen number itself (counting from zero). This option is only useful with multiple Xinerama screens.
Here are some examples. The following adds a title-bar button to switch a window to the full vertical size of the screen:
Mouse 0 4 A Maximize 0 100
The following causes windows to be stretched to the full width:
Mouse 0 4 A Maximize 100 0
This makes a window that is half the screen size in each direction:
Mouse 0 4 A Maximize 50 50
To expand a window horizontally until any other window is found:
Mouse 0 4 A Maximize 0 grow
To expand a window until any other window on the same or a higher layer is hit.
Mouse 0 4 A Maximize growonlayers $[w.layer] -1 grow grow
To expand a window but leave the lower 60 pixels of the screen unoccupied:
Mouse 0 4 A Maximize 100 -60p
Values larger than 100 can be used with caution.
31.5.6. Recapture
Recapture
This command is obsolete and should not be used anymore. Should you want to do something specific that you cannot do without it, please report this to the fvwm-workers mailing list <fvwm-workers@fvwm.org>. This command may be removed at some point in the future. Please read the note at the end of the section Delayed Execution of Commands to learn about how to avoid the Recapture command.
Causes fvwm to recapture all of its windows. This ensures that the latest style parameters are used. The recapture operation is visually disturbing.
Since fvwm version 2.4 only a very few Style options need a Recapture to take effect (e.g. UseStyle).
31.5.7. RecaptureWindow
RecaptureWindow
This command is obsolete and should not be used anymore. See Recapture For details.
Causes fvwm to recapture the chosen window.
31.5.8. Refresh
Refresh
Causes all windows on the screen to redraw themselves. All pending updates of all windows' styles and looks are applied immediately. E.g. if Style or TitleStyle commands were issued inside a fvwm function.
31.5.9. RefreshWindow
RefreshWindow
Causes the chosen window to redraw itself. All pending updates of the window's style and look are applied immediately. E.g. if Style or TitleStyle commands were issued inside a fvwm function.
31.5.10. Stick
Stick [bool]
If the bool argument is empty or "toggle", the Stick command makes a window sticky if it is not already sticky, or non-sticky if it is already sticky. To make a window sticky regardless of its current state the bool argument must be "True". To make it non-sticky use "False".
31.5.11. StickAcrossPages
StickAcrossPages [bool]
Works like Stick but only sticks a window across pages, not across desks.
31.5.12. StickAcrossDesks
StickAcrossDesks [bool]
Works like Stick but only sticks a window across desks, not across pages.
31.5.13. WindowShade
WindowShade [bool] | [[ShadeAgain] direction ]
Toggles the window shade feature for titled windows. Windows in the shaded state only display a title-bar. If bool is not given or "toggle", the window shade state is toggled. If bool is "True", the window is forced to the shaded state. If bool is "False", then the window is forced to the non-shaded state. To force shading in a certain direction, the direction argument can be used. Any of the strings "North", "South", "West", "East", "NorthWest", "NorthEast", "SouthWest", "SouthEast" or "Last" can be given. The direction can be abbreviated with the usual one or two letters "N", "NW", etc. Using a direction on a window that was already shaded unshades the window. To shade it in a different direction, use the ShadeAgain option. The direction Last shades the window in the direction it last was shaded. If the window has never been shaded before it is shaded as if no direction had been given. Windows without titles can be shaded too. Please refer also to the options WindowShadeSteps, WindowShadeShrinks, WindowShadeScrolls, WindowShadeLazy, WindowShadeAlwaysLazy and WindowShadeBusy options of the Style command. Examples:
Style * WindowShadeShrinks, WindowShadeSteps 20, \
WindowShadeLazy
Mouse 1 - S WindowShade North
Mouse 1 [ S WindowShade West
Mouse 1 ] S WindowShade E
Mouse 1 _ S WindowShade S
Note: When a window that has been shaded with a direction argument changes the direction of the window title (see TitleAtTop Style option), the shading direction does not change. This may look very strange. Windows that were shaded without a direction argument stay shaded in the direction of the title bar.
For backward compatibility, the optional argument may also be 1 to signify "on", and 2 to signify "off". Note that this syntax is obsolete, and will be removed in the future.
31.5.14. WindowShadeAnimate
WindowShadeAnimate [steps [p]]
This command is obsolete. Please use the WindowShadeSteps option of the Style command instead.