「FVWM」-Control Window State@20210120

The commands described in this article are used to control the state of the window.

Close

If the window accepts the delete window agreement, it will send a message to the window asking it to delete itself normally. If the window does not understand the delete window protocol, the window will be destroyed like the Destroy command.

Note: If the window accepts the delete window agreement, but does not close by itself, the window will not be deleted.

Destroy

Destroying the application window usually causes the application to crash.

Delete

Sending a message to the window, asking it to delete itself, often causes the application to exit.

Iconify [bool]

If the window has not been iconified, it will be marked as iconified; if the window has been iconified, it will be unmarked. The optional parameter bool is a boolean parameter. "True" means that only iconization is allowed, and "False" means that iconization is prohibited. Use "toggle" to switch between iconified and non-iconified states.

There are many style options that affect the appearance and behavior of the icon (such as StickyIcon, NoIcon).

For backward compatibility, the optional parameter bool can also be a positive number representing "True" or a negative number representing "False". Please note that this syntax is obsolete and will be removed in the future.

Maximize [flags] [bool|forget] [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 just the parameter "forget" a maximized window reverts back into normal state but keeps its current maximized size. This can be useful in conjunction with the commands ResizeMaximize and ResizeMoveMaximize. If the window is not maximized, nothing happens.

 

 

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.

 

Refresh

Causes all windows on the screen to redraw themselves. All pending updates to all window styles and appearances will be applied immediately. For example, if the Style or TitleStyle command is issued within the fvwm function.

RefreshWindow

Causes the selected window to redraw itself. All pending updates to the style and appearance of the window will be applied immediately. E.g. If the Style or TitleStyle command is issued in the fvwm function.

Stick [bool]

If the bool parameter is empty or "toggle", the Stick command will make the window sticky (if it is not already sticky); or if it is sticky, it will be non-sticky.

To make the window sticky regardless of its current state, the bool parameter must be "True". To make it non-sticky, use "False".

StickAcrossPages [bool]

Works like Stick, but only across pages, not across the desktop.

StickAcrossDesks [bool]

Works like Stick, but can only span the desktop, not across the page.

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.

 

WindowShadeAnimate [steps[p]]

This command is obsolete. Please use the WindowShadeSteps option of the Style command instead .

Recapture

Cause fvwm to regain all windows. This ensures that the latest style parameters are used. The recapture operation is visually disturbing.

Since fvwm version 2.4, only a few Style options require Recapture to take effect (such as UseStyle). This command is obsolete and should no longer be used. If you want to do something that can only be done with this command, please report this to the fvwm-workers mailing list < [email protected] >. This command may be deleted sometime in the future. Please read the note at the end of the "Delayed Execution of Commands" section to learn how to avoid the Recapture command.

RecaptureWindow

Causes fvwm to recapture the selected window.

This command is obsolete and should no longer be used. See Recapture details.

references

 

 

Guess you like

Origin blog.csdn.net/u013670453/article/details/112910860