FVWM3COMMANDS(1)
π NAME π
okay so bestie, this is FVWM3COMMANDS(1) β the manual page for fvwm built-in commands. yes, ALL of them. grab a snack. π
β¨ LIST OF FVWM COMMANDS β¨
the command descriptions below are grouped into the following sections. they're hopefully sorted in order of usefulness to the newcomer. π«Ά
- Menu commands
- Miscellaneous commands
- Commands affecting window movement and placement
- Commands for focus and mouse movement
- Commands controlling window state
- Commands for mouse and key bindings
- The Style command (controlling window styles)
- Other commands controlling window styles
- Commands controlling the virtual desktop
- Commands for user functions and shell commands
- Conditional commands
- Module commands
- Quit, restart and session management commands
- Colorsets
- Color gradients
π§Έ Miscellaneous Commands π§Έ
BugOpts [option [bool]], ...
ngl this one is fvwm's little bug-workaround closet. it controls several workarounds for bugs in third party programs. the individual options are separated by commas. the optional argument bool is a boolean argument and controls if the bug workaround is enabled or not. it can either be "True" or "False" to turn the option on or off, or "toggle" to switch is back and forth. if bool is omitted, the default setting is restored. π
DebugRandRβ activates monitor layout debug messages.FlickeringMoveWorkaroundβ disablesConfigureNotifyevents that are usually sent to an application while it is moved. if some windows flicker annoyingly while being moved, this option may help you. note that if this problem occurs it is not an fvwm bug, it is a problem of the application. πMixedVisualWorkaroundβ makes fvwm install the root colormap before it does some operations using the root window visuals. this is only useful when the-visualoption is used to start fvwm and then only with some configurations of some servers (e.g. Exceed 6.0 with an 8 bit PseudoColor root and fvwm using a 24 bit TrueColor visual).ModalityIsEvilβ controls whether Motif applications have the ability to have modal dialogs (dialogs that force you to close them first before you can do anything else). the default is to not allow applications to have modal dialogs. use this option with care. once this option is turned on, you have to restart fvwm to turn it off. πRaiseOverNativeWindowsβ makes fvwm try to raise the windows it manages over native windows of the X server's host system. this is needed for some X servers running under Windows, Windows NT or Mac OS X. fvwm tries to detect if it is running under such an X server and initializes the flag accordingly.RaiseOverUnmanagedβ makes fvwm try to raise the windows it manages overoverride_redirectwindows. this is used to cope with ill-mannered applications that use long-lived windows of this sort, contrary to ICCCM conventions. it is useful with theUnmanagedstyle option too.FlickeringQtDialogsWorkaroundβ suppresses flickering of the focused window in some modules when using KDE or QT applications with application modal dialog windows. by default this option is turned on. this option may be visually disturbing for other applications using windows not managed by fvwm. since these applications are rare it is most likely safe to leave this option at its default.QtDragnDropWorkaroundβ suppresses the forwarding of unknownClientEventmessages to windows β usually this is harmless, but Qt has problems handling unrecognisedClientEventmessages. enabling this option might therefore help for Qt applications using DragnDrop. this option is off by default.EWMHIconicStateWorkaroundβ needed by EWMH compliant pagers or taskbars which represent windows which are on a different desktops as iconified. these pagers and taskbars use a version of the EWMH specification before version 1.2 (the current KDE 2 & 3 versions). these pagers and taskbars use theIconicStateWM_STATEstate to determine if an application is iconified. this state, according to the ICCCM, does not imply that a window is iconified (in the usual sense). turning on this option forces fvwm to establish an equivalence between theIconicStateWM_STATEstate and the iconified window. this violates ICCCM compliance but should not cause big problems. by default this option is off.DisplayNewWindowNamesβ with this enabled, fvwm prints the name, icon name (if available), resource and class of new windows to the console. this can help in finding the correct strings to use in theStylecommand. πExplainWindowPlacementβ when this option is enabled, fvwm prints a message to the console whenever a new window is placed orPlaceAgainis used. the message explains on which desk, page, screen and position it was placed and why. this option can be used to figure out why a specific window does not appear where you think it should. iykyk β¨DebugCRMotionMethodβ enables some debugging code in theConfigureRequesthandling routines of fvwm. it is not helpful for the user, but if you report a bug to the fvwm team we may ask you to enable this option. πTransliterateUtf8β enables transliteration during conversions from utf-8 strings. by default fvwm will not transliterate during conversion, but will fall back to alternate strings provided by the clients if conversion from utf-8 fails due to characters which have no direct correspondence in the target charecter set. some clients however neglect to set non utf-8 properties correctly in which case this option may help.
BusyCursor [Option bool], ...
this one controls the cursor during the execution of certain commands. Option can be DynamicMenu, ModuleSynchronous, Read, Wait or *. an option must be followed by a boolean argument bool. you can use commas to separate individual options. if you set an option to "True", then when the corresponding command is run, fvwm displays the cursor of the WAIT context of the CursorStyle command. "False" forces to not display the cursor. the default is:
BusyCursor DynamicMenu False, ModuleSynchronous False, \
Read False, Wait False
the * option refers to all available options. π
- the
Readoption controls thePipeReadcommand. - the
DynamicMenuoption affects theDynamicPopupActionandMissingSubmenuFunctionoptions of theAddToMenucommand. if this option is set to"False", then the busy cursor is not displayed during a dynamic menu command even if this command is aReadorPipeReadcommand and theReadoption is set to"True". - the
ModuleSynchronousoption affects theModuleSynchronouscommand. if this option is set to"False", then the busy cursor is not displayed while fvwm waits for a module started byModuleSynchronousto complete its startup. - the
Waitoption affects only the root cursor. during a wait pause the root cursor is replaced by the busy cursor and fvwm is still fully functional (you can escape from the pause, see theEscapeFunccommand). if you want to use this option and if you do not use the default root cursor, you must set your root cursor with theCursorStylecommand.
ClickTime [delay]
specifies the maximum delay in milliseconds between a button press and a button release for the Function command to consider the action a mouse click. the default delay is 150 milliseconds. omitting the delay value resets the ClickTime to the default.
ClickTime also specifies the delay between two clicks to be interpreted as a double-click. π±οΈ
ColormapFocus FollowsMouse | FollowsFocus
by default, fvwm installs the colormap of the window that the cursor is in. but if you use
ColormapFocus FollowsFocus
then the installed colormap is the one for the window that currently has the keyboard focus. it's giving "wherever the keyboard is, that's the vibe" π¦
CursorStyle context [num | name | None | Tiny | file [x y] [fg bg]]
defines a new cursor for the specified context. note that this command can not control the shapes an applications uses, for example, to indicate that it is busy. the various contexts are:
POSITION(top_left_corner) β used when initially placing windowsTITLE(top_left_arrow) β used in a window title-barDEFAULT(top_left_arrow) β used in windows that do not set their cursorSYS(hand2) β used in one of the title-bar buttonsMOVE(fleur) β used when moving or resizing windowsRESIZE(sizing) β used when moving or resizing windowsWAIT(watch) β used during certain fvwm commands (seeBusyCursorfor details)MENU(top_left_arrow) β used in menusSELECT(crosshair) β used when the user is required to select a windowDESTROY(pirate) β used forDestroy,Close, andDeletecommandsTOP(top_side) β used in the top side-bar of a windowRIGHT(right_side) β used in the right side-bar of a windowBOTTOM(bottom_side) β used in the bottom side-bar of a windowLEFT(left_side) β used in the left side-bar of a windowTOP_LEFT(top_left_corner) β used in the top left corner of a windowTOP_RIGHT(top_right_corner) β used in the top right corner of a windowBOTTOM_LEFT(bottom_left_corner) β used in the bottom left corner of a windowBOTTOM_RIGHT(bottom_right_corner) β used in the bottom right corner of a windowTOP_EDGE(top_side) β used at the top edge of the screenRIGHT_EDGE(right_side) β used at the right edge of the screenBOTTOM_EDGE(bottom_side) β used at the bottom edge of the screenLEFT_EDGE(left_side) β used at the left edge of the screenROOT(left_ptr) β used as the root cursor
the defaults are shown in parentheses above. if you ever want to restore the default cursor for a specific context you can just omit the second argument. π
the second argument is either the numeric value of the cursor as defined in the include file X11/cursorfont.h or its name (without the XC_ prefix). alternatively, the xpm file name may be specified. the name can also be None (no cursor) or Tiny (a single pixel as the cursor). β¨
# make the kill cursor be XC_gumby (both forms work):
CursorStyle DESTROY 56
CursorStyle DESTROY gumby
okay so β alternatively, your cursor can be loaded straight from an image file: XPM, PNG or SVG, pick your fighter. And if fvwm was compiled with Xcursor support? Then it's full ARGB baby, and you can load (possibly animated π) cursor files made with the xcursorgen program. If not β no Xcursor for you β the cursor gets converted to monochrome. Tragic but functional. π
The optional x and y arguments (they come after a file argument) set the hot-spot coordinate, and here 0 0 is the top left corner of the image. Coordinates inside the image boundary are valid and they override any hot-spot defined in the (XPM/Xcursor) image file itself. If your hot-spot is invalid or undefined, it just gets plopped in the center of the image. whatever, it tried.
CursorStyle ROOT cursor_image.png 0 0
The optional fg and bg arguments set the foreground and background colors for the cursor, and they default to black and white (reverse video compared to the actual bitmap, iykyk). π Heads up though: these colors are only used with monochrome cursors. Otherwise they're silently ignored β not even a peep. π
CursorStyle ROOT nice_arrow.xpm yellow black
β¨ DefaultFont β¨
DefaultFont [fontname]
Sets the default font to fontname, bestie. This is the font fvwm reaches for whenever no other font has been specified. Wanna reset it back to the built-in default? Just omit the argument and it snaps right back. πΈ
This default font gets used for menus, window titles, icon titles, AND the geometry feedback windows during a move or resize operation. She's booked and busy. π
If you wanna override the default in a specific context, use the Style * Font, Style * IconFont, or MenuStyle commands. Slay. β¨
π DefaultIcon π
DefaultIcon filename
Sets the default icon used when a window has neither a client-supplied icon nor an icon supplied via the Icon option of the Style command. So basically the fallback bestie for icon-less windows. π«Ά
π§ DefaultLayers π§
DefaultLayers bottom put top
Changes the layers that get used for the StaysOnBottom, StaysPut, and StaysOnTop Style options. Initially the layers are 2, 4 and 6. Three little numbers, one big vibe check. β
π Deschedule π
Deschedule [command_id]
Removes all commands that were scheduled with the id command_id (via the Schedule command) from the list of commands to be executed β unless they were already executed, in which case, too late, it's done. π
If you omit the command_id, the value of the variable $[schedule.last] is used as the id. Convenient. π
π¦ Emulate π¦
Emulate Fvwm | Mwm | Win
This command is the catch-all for how miscellaneous things are done by fvwm. Right now it affects two things: where the move/resize feedback window appears, and how window placement is aborted. π
Want more Mwm- or Win-like behavior? Call Emulate with Mwm or Win as its argument. With Mwm, resize and move feedback windows show up in the center of the screen instead of the upper left corner. This also changes how manual placement is aborted β peep the ManualPlacement description for the tea. π
β¨ EscapeFunc β¨
By default, the key sequence Ctrl-Alt-Escape lets you escape from a Wait pause and from a locked ModuleSynchronous command. The EscapeFunc command, used together with the Key command, is how you configure that key sequence. Example time:
Key Escape A MC -
Key Escape A S EscapeFunc
That right there replaces the Ctrl-Alt-Escape key sequence with Shift-Escape for aborting a Wait pause and ModuleSynchronous command. So iconic. π
Heads up:EscapeFuncused outside theKeycommand does nothing. Literally nothing. Don't do it. π
πΈ FakeClick πΈ
FakeClick [command value] ...
Okay so this one is mainly intended for debugging fvwm and no guarantees are made that it works for you. Read that again, bestie. π
FakeClick can simulate mouse button press and release events and pass them to fvwm or to applications. The parameters are a list of commands consisting of pairs of command tokens and integer values:
- The
pressandreleasecommands are followed by the appropriate mouse button number and generate a button press or release event on the window below the pointer. - The
waitcommand pauses fvwm for the given number of milliseconds. - The
modifierscommand simulates pressing or releasing modifier keys. The values1to5are mapped toMod1toMod5, while6,7and8are mapped toShift,LockandControl. The modifier stays set for any further button events. To release a modifier key, use the corresponding negative number. - The
depthcommand determines which window the button events get sent to:- depth
1β all events go to the root window, regardless of the pointer's position. - depth
2β the event is passed to the top level window under the pointer, which is usually the frame window. - depth
3β events go to the client window. - Higher numbers go to successive sub windows.
- Zero (
0) goes to the smallest window that contains the pointer.
- depth
Note that events propagate upward. π¦
FakeClick depth 2 press 1 wait 250 release 1
That simulates a click with button 1 in the parent window (depth 2) with a delay of 250 milliseconds between the press and the release. Chef's kiss. β¨
Note: all command names can be abbreviated with their first letter. π
π FakeKeypress π
FakeKeypress [command value] ...
Again: mainly intended for debugging fvwm and no guarantees are made that it works for you. Same energy as FakeClick, different body part. π
FakeKeypress can simulate key press and release events and pass them to fvwm or applications. The parameters are a list of commands consisting of pairs of command tokens and values.
The press and release commands are followed by a key name. That key name is a standard X11 key name as defined in /usr/include/X11/keysymdef.h (without the XK_ prefix), or the keysym database /usr/X11R6/lib/X11/XKeysymDB. The wait, modifiers and depth commands are the exact same ones used by FakeClick. π«Ά
Save all GVim sessions with: "Esc:w\n"
All (gvim) FakeKeypress press Escape \
press colon \
press w \
press Return
Save & exit all GVim sessions with: "Esc:wq\n"
All (gvim) FakeKeypress press Escape \
press colon \
press w \
press q \
press Return
Send A to a specific window:
WindowId 0x3800002 FakeKeypress press A
Note: all command names can be abbreviated with their first letter. π
π ImagePath π
ImagePath path
Specifies a colon separated list of directories in which to search for images (both monochrome and pixmap). To find an image given by a relative pathname, fvwm looks into each directory listed in turn, and uses the first file found. First come, first served, periodt. π
Now for the spicy part πΆοΈ β if a directory is given in the form "/some/dir;.ext", that means all images in this directory have the extension .ext forced. The original image name (which may contain another extension, or no extension at all) is not probed β instead .ext is added or replaces the original extension.
This is useful, for example, if a user has some image directories with .xpm images and other image directories with the same names, but .png images. π
The path may contain environment variables such as $HOME (or ${HOME}). Further, a + in the path is expanded to the previous value of the path, which lets you append or prepend to the path super easily. Chef's kiss. β¨
For example:
ImagePath $HOME/icons:+:/usr/include/X11/bitmaps
π LocalePath π
LocalePath path
Specifies a colon separated list of "locale path" in which to search for string translations. A locale path is made up of a directory path and a text domain separated by a semicolon (;). As an example, the default locale path is:
/install_prefix/share/locale;fvwm
where install_prefix is the fvwm installation directory. With such a locale path, translations are searched for in
/install_prefix/share/locale/lang/LC_MESSAGES/fvwm.mo
where lang depends on the locale. πΈ
Rules of the game:
- If no directory is given, the default directory path is assumed.
- If no text domain is given,
fvwmis assumed. - With no argument at all, the default locale path is restored.
Just like with the ImagePath command, path may contain environment variables and a + to append or prepend the locale path easily. π
For example, the fvwm-themes package uses
LocalePath ";fvwm-themes:+"
to add locale catalogs.
The default fvwm catalog contains a few strings used by the fvwm executable itself (Desk and Geometry) and strings used in some default configuration files and FvwmForm configuration. You can take a look at the po/ subdirectory of the fvwm source to get the list of the strings with a possible translation in various languages. At present, very few languages are supported. π
The main use of locale catalogs is via the "$[gt.string]" parameter:
DestroyMenu MenuFvwmWindowOps
AddToMenu MenuFvwmWindowOps "$[gt.Window Ops]" Title
+ "$[gt.&Move]" Move
+ "$[gt.&Resize]" Resize
+ "$[gt.R&aise]" Raise
+ "$[gt.&Lower]" Lower
+ "$[gt.(De)&Iconify]" Iconify
+ "$[gt.(Un)&Stick]" Stick
+ "$[gt.(Un)Ma&ximize]" Maximize
+ "" Nop
+ "$[gt.&Close]" Close
+ "$[gt.&Destroy]" Destroy
That gives you a menu in the locale languages if translations are available. Iconic behavior. π
Note that the FvwmScript module has a set of special instructions for string translation. It is out of the scope of this discussion to explain how to build locale catalogs. Please refer to the GNU gettext documentation. π«Ά
β PrintInfo β
PrintInfo subject [verbose]
Print information on subject to the debug log file, which defaults to $HOME/.fvwm/fvwm3-output.log. Environment variables $FVWM_USERDIR and $FVWM3_LOGFILE can alter this default. For this logfile to be written, either fvwm3 has to be started with the -v option, or the SIGUSR2 signal can be used to toggle opening/closing the debug log file. π
An optional integer argument to debug log file, which defaults to $HOME/.fvwm/fvwm3-output.log. Environment variables $FVWM_USERDIR and $FVWM3_LOGFILE can alter this default. For this logfile to be written, either fvwm3 has to be started with the -v option or SIGUSR2 signal can be used to toggle opening/closing debug log file. π (yes bestie, the page literally says this bit twice, we're just keeping the receipts)
An optional integer argument verbose defines the level of information which is given. The current valid subjects are:
Colorsβ prints information about the colors used by fvwm. This is useful on screens which can only display 256 (or less) colors at once. If verbose is one or greater, the palette used by fvwm is printed. If you have a limited color palette and you run out of colors, this command might be helpful. πImageCacheβ prints information about the images loaded by fvwm. If verbose is one or greater, all images in the cache will be listed together with their respective reuse. πLocaleβ spills the tea on your locale and the fonts fvwm ended up using.verbosecan be1or2. πnlsβ tells you everything about the locale catalogs fvwm used. πbindingsβ dumps info on every single binding fvwm has: key bindings AND mouse bindings.verbosedoes literally nothing here, bestie. π±οΈβ¨οΈinfostoreβ shows you every entry chilling in the infostore, listing the key and its value.verbosehas no effect with this one either. π¦
β° Schedule [Periodic] delay_ms [command_id] command β°
So the command gets executed after about delay_ms milliseconds. This is lowkey useful in some tricky setups. β¨
The command runs in the same context window as the Schedule command itself.
You can optionally pass an integer argument, command_id, in decimal, hexadecimal, or octal format. That id is what you hand to the Deschedule command to yeet the scheduled command before it ever runs. If you don't give an id, fvwm just uses negative id numbers β starting at -1 and going down by one every time you use Schedule. π
Heads up bestie: the Schedule command AND its arguments go through the usual command line expansion, and then when command finally executes, it gets expanded again. So you might need to quote the parts of the command that must not be expanded twice. π
Note: a window's id, the way it comes back from $[w.id], can be used as the command_id. Example:
Current Schedule 1000 $[w.id] WindowShade
Schedule also supports the optional keyword Periodic, which means the command should be executed every delay_ms. Example:
Schedule Periodic 10000 PipeRead '[ -N "$MAIL" ] && echo \
Echo You have mail'
Use the Deschedule command to stop periodic commands. π
π State state [bool] π
Sets, clears, or toggles one of the 32 user defined states that are associated with each window. The state is a number ranging from 0 to 31. π¦
These states mean absolutely nothing to fvwm itself, but you can check them in conditional commands like Next with the State condition. π
The optional bool argument is a boolean. "True" sets the given state, "False" clears it, and "toggle" flips it to the opposite state. If you don't pass bool at all, the state gets toggled anyway. β¨
πͺ WindowList [(conditions)] [position] [options] [double-click-action] πͺ
Generates a pop-up menu (and pops it up, obviously) showing the title and geometry of every window currently on the desktop. It's giving task manager but make it fvwm. π
The format of the geometry part is: desk(layer): x-geometry sticky, where desk and layer are the corresponding numbers and sticky is either empty or a capital S. Iconified windows have their geometry shown in parentheses. π«Ά
Selecting an item from the window list pop-up menu causes the interpreted function "WindowListFunc" to run, with the window id of that window passed in as $0. The default "WindowListFunc" looks like this:
AddToFunc WindowListFunc
+ I Iconify off
+ I FlipFocus
+ I Raise
+ I WarpToWindow 5p 5p
You can absolutely destroy the built-in "WindowListFunc" and create your own if these defaults aren't your vibe. π₯
The window list menu uses the "WindowList" menu style if it's defined (see the MenuStyle command). Otherwise the default menu style is used. To switch back to the default menu style, issue the command:
DestroyMenuStyle WindowList
Example:
MenuStyle WindowList SelectOnRelease Meta_L
The conditions can be used to exclude certain windows from the window list. Please refer to the Current command for the deets. Only windows matching the given conditions show up in the window list. The options below work the other way around, bestie: windows that would otherwise not be included in the window list can be selected with them. The conditions always override the options. β οΈ
The position arguments are the same as for Menu. The double-click-action command is invoked if the user double-clicks (or hits the key rapidly twice if the menu is bound to a key) when bringing up the window list. The double-click-action must be quoted if it's more than one word. π
The double-click-action is useful for defining a default window if you've bound the window list to a key (or button) like this:
# Here we call an existing function, but
# it may be different. See the default
# WindowListFunc definition earlier in this
# man page.
AddToFunc SwitchToWindow
+ I WindowListFunc
Key Tab A M WindowList "Prev SwitchToWindow"
Hitting Alt-Tab once brings up the window list; hit it twice and the focus flips between the current and the last focused window. With the proper SelectOnRelease menu style (see the example above) a window is selected as soon as you release the Alt key. π
The options passed to WindowList are separated by commas and can be:
Geometry / NoGeometry / NoGeometryWithInfo, NoDeskNum, NoLayer, NoNumInDeskTitle, NoCurrentDeskTitle, MaxLabelWidth width, TitleForAllDesks, Function funcname, Desk desknum, CurrentDesk, NoIcons / Icons / OnlyIcons, NoNormal / Normal / OnlyNormal, NoSticky / Sticky / OnlySticky, NoStickyAcrossPages / StickyAcrossPages / OnlyStickyAcrossPages, NoStickyAcrossDesks / StickyAcrossDesks / OnlyStickyAcrossDesks, NoOnTop / OnTop / OnlyOnTop, NoOnBottom / OnBottom / OnlyOnBottom, Layer m [n], UseSkipList / OnlySkipList, NoDeskSort, ReverseOrder, CurrentAtEnd, IconifiedAtEnd, UseIconName, Alphabetic / NotAlphabetic, SortByResource, SortByClass, NoHotkeys, SelectOnRelease ,ShowPage, ShowPageX, ShowPageY, ShowScreen.
(Note β normal means not iconic, sticky, or on top.) π
With the SortByResource option windows are alphabetically sorted first by resource class, then by resource name, and then by window name (or icon name if UseIconName is specified). ReverseOrder also works in the expected manner. π€
With the SortByClass option windows are sorted just like with SortByResource, but the resource name isn't taken into account β only the resource class. β¨
The SelectOnRelease option works exactly like the MenuStyle option with the same name, but it overrides the option given in a menu style. By default, this option is set to the left key. To switch it off, use SelectOnRelease without a key name. π±οΈ
If you pass in a function via Function funcname, it gets called within a window context of the selected window:
AddToFunc IFunc I Iconify toggle
WindowList Function IFunc, NoSticky, CurrentDesk, NoIcons
If you use the Layer m [n] option, only windows in layers between m and n are displayed. n defaults to m. With the ReverseOrder option the order of the windows in the list is reversed. π
With the CurrentAtEnd option the currently focused window (if there is one) is shown at the bottom of the list. This is mostly intended for simulating the Alt-Tab behavior in another GUI. π
IconifiedAtEnd makes iconified windows get moved to the end of the list. This is also from another GUI. π₯οΈ
The NoGeometry option causes fvwm to not display the geometries as well as the separators which indicate the different desktops. NoGeometryWithInfo removes the geometries but keeps the desktop information and indicates iconic windows. NoDeskNum causes fvwm to not display the desktop number in the geometry or before the window title with the NoGeometryWithInfo option. NoNumInDeskTitle is only useful if a desktop name is defined with the DesktopName command β it causes fvwm to not display the desktop number before the desktop name. By default, the WindowList menu has a title which indicates the current desk or the selected desktop if the Desk condition is used. The NoCurrentDeskTitle option removes this title. TitleForAllDesks causes fvwm to add a menu title with the desk name and/or number before each group of windows on the same desk. With NoLayer, the layer of the window is not displayed. The options ShowPage, ShowPageX and ShowPageY enable displaying the page of the window rounded to multiples of the display size. With ShowScreen, the window's screen name is displayed. πΈ
The MaxLabelWidth option takes the number of characters to print as its argument. No more than that many characters of the window name are visible. βοΈ
If you wanted to use the WindowList as an icon manager, you could invoke the following:
WindowList OnlyIcons, Sticky, OnTop, Geometry
(Note β the Only options essentially wipe out all the other ones... but not the OnlyListSkip option, which just causes WindowList to only consider the windows with the WindowListSkip style.) π
π§ XSync π§
When XSync is called, the X function with the same name is used to send all pending X requests to the server. This command is intended for debugging only. π
π§ XSynchronize [bool] π§
The XSynchronize command controls whether X requests are sent to the X server immediately or not. Normally, requests are sent in larger batches to save unnecessary communication. To send requests immediately, use "True" as the argument; to disable this use "False"; or to toggle between both methods use "Toggle" or just omit the bool argument. Fvwm defaults to synchronized requests when started with the --debug option. This command is intended for debugging only. π
β + β
Used to continue adding to the last specified decor, function, or menu. See the discussion for AddToDecor, AddToFunc, and AddToMenu. π
π¦ Window Movement and Placement π¦
β¨ AnimatedMove x y [Warp] β¨
Move a window in an animated fashion. Similar to the Move command. The options are the same, except they're required, since it doesn't make sense to have a user move the window interactively and animatedly. π If the optional argument Warp is specified, the pointer is warped along with the window. π
β¨ GeometryWindow Hide | Show | Colorset n | Position x y | Screen S β¨
Configures the position or size window that's usually shown when a window is moved or resized interactively. You can use this to hide it, show it, change the colorset, change the location, or change the screen of the geometry window. Multiple options can be set at once, separated by spaces. Details of each option are described below. π
GeometryWindow Hide [Never | Move | Resize]
GeometryWindow Hide [Never | Move | Resize]β hides / switches off the geometry window. Pass the optionalMoveorResizeand it'll only hide during that specific operation, cute and situational like that. PassNeverand it switches the geometry window back on again (which is literally the same asShow).GeometryWindow Show [Never | Move | Resize]β shows / switches the geometry window back on (yep, equivalent toHide Never). With the optionalMoveorResizeit only shows during that respective operation. AndNeverswitches the geometry window off (equivalent toHide, we love a symmetrical queen π ).GeometryWindow Colorsetcset β sets the colorset of the geometry window to cset. Use the literal optiondefaultfor cset if you want the default colorset back.GeometryWindow Position [+|-]x[p] [+|-]y[p]β configures where the geometry window pops up. x and y are relative coordinates given as a percentage of the screen size. Leading-means the coordinates get computed from the left/bottom of the screen respectively. Slap apon the end and they're read as a number of pixels from the respective screen edge instead. Give no position arguments at all and the geometry window's position returns to its default: upper left corner, or the center if you're emulating MWM.GeometryWindow ScreenRANDRNAME β picks which screen the geometry window shows up on. Default behaviour is the current screen. Give a valid RANDRNAME and it'll always show on that screen. Usecurrentas the RANDRNAME to go back to the default.
Examples, bestie, take notes β¨:
# Position the geometry window in the center of the screen
GeometryWindow Position 50 50
# Position the geometry window next to the RightPanel
GeometryWindow Position -120p 0
# Use colorset 2 for the geometry window
GeometryWindow Colorset 2
# Only show the geometry window on the primary monitor
GeometryWindow Screen $[monitor.primary]
# Hide the geometry window
GeometryWindow Hide
Layer
Layer [arg1 arg2] | [default]β drops the current window into a brand new layer. If arg1 is non-zero then the next layer is the current layer number plus arg1. If arg1 is zero then the new layer is just arg2. Simple math, no cap.
Special case alert π¨: default puts the window back in its default layer, aka the layer it was in originally. Same thing happens if you give no arguments, or arguments that are invalid.
Lower
Lowerβ lets the user lower a window. Heads up though: this only lowers a window within its own layer. Wanna yeet it to the absolute bottom? You need this:
AddToFunc lower-to-bottom
+ I Layer 0 0
+ I Lower
Move
Move [options]β lets the user move a window. Call it from somewhere inside a window or on its border and that window is the one that moves. Call it from the root window and the user gets to pick the target window.Movetakes a whole menu of options so you can start an interactive move, specify an exact position, or give it a direction.
Move with no options at all starts an interactive move. The window may snap to other windows and to screen boundaries β that's configurable with the SnapAttraction style. Dragging a window to the edge of the screen can be used to drag it onto other pages. (Peep EdgeScroll and the EdgeMoveDelay style for the deets.)
Holding down Alt disables snapping and lets you switch pages with zero delay. Interactive movement can be aborted with the Escape key, or with any mouse button that isn't set to place the window. By default mouse button 2 is the cancel-the-move button. Wanna change that? Use the Mouse command with the special context 'P' for Placement.
The window condition PlacedByButton can be used to check whether a specific button was pressed to place the window (see the Current command).
If you give the single argument pointer, the top left corner of the window gets moved to the pointer position before an interactive move starts β this is mainly for internal use by modules like FvwmPager, iykyk.
Move pointer
Wanna move a window in a given direction until it bonks into another window, an icon, or a screen boundary? Say less:
Move shuffle [options] _direction_(s)
The direction can be North/N/Up/U, East/E/Right/R, South/S/Down/D, or West/W/Left/L. The window moves in that direction until it hits another window or the EwmhBaseStruts/screen boundary. When a window is already at the EwmhBaseStruts/screen boundary, it'll move to the next monitor in that direction, if one exists. If a window is outside the current working area (partly off screen), it moves to the edge of the working area. Windows honor the EWMH working area and stop at the EwmhBaseStruts unless you pass the literal option ewmhiwa. Give multiple direction(s) and the window moves them in the order you stated them. Periodt.
The literal option Warp warps the mouse pointer to the window. The literal option all_windows considers all windows on the same monitor instead of just the windows in the path the window is moving through β this lets it move to the boundary of a window it's next to. The literal option both_sides considers both the close side and the far side of the window (by default only the close side gets considered).
If you give the literal option snap followed by a snap type of windows, icons, or same, then the window only stops when it hits another window, an icon, or the same type respectively. If you give the literal option layers followed by two integers specifying a min layer and max layer, then only windows on layers between min and max will stop the window. Like so:
# Shuffle the window Right.
Move shuffle Right
# Shuffle Up, only consider windows on Layer 3.
Move shuffle layers 3 3 Up
# Shuffle Left then Up
Move shuffle Left Up
# Shuffle Up then Left (may not be same position as above)
Move shuffle Up Left
Move can also move a window to a specified position:
Move [screen _S_] [desk _N_] [w | m | v]_x_[p | w] \
[w | m | v]_y_[p | w] [Warp] [ewmhiwa]
This moves the window to the x and y position (explained below). By default the EWMH working area of each monitor is honored (each monitor's working area is set via EwmhBaseStruts and respects any strut hints provided by windows on the monitor). Which means: if a window is placed outside the working area, its position gets adjusted to fit inside the working area of the screen that the center of the window is on. If you pass the trailing option ewmhiwa, the window position ignores the working area and won't get adjusted (this option is required if you want to move windows off the screen and have full control over where it lands). If you pass the option Warp then the pointer gets warped to the window.
If you give the literal option screen followed by a RandR screen name S, the coordinates are interpreted relative to that screen. The width and height of the screen get used for the calculations instead of the display dimensions. The screen is interpreted the same way as in the MoveToScreen command.
If you give the literal option desk followed by a desk number N, the window is placed on that desk after it's been moved. This does two things: first, you can move a window's position and desk in one single command. Second, when a window is moved between monitors its desk gets updated to match the new monitor β this option can override that behaviour by specifying which desk the window should end up on.
The positional arguments x and y can specify an absolute or relative position from either the left/top (positive values) or right/bottom (negative values) of the global screen (the bounding box containing all monitors) or of a specified screen. By default the numeric value you give is interpreted as a percentage of the screen's width/height, but a trailing p flips that to mean pixels, while a trailing w means percent of the window width/height. To move the window relative to its current position, add the w (for "window") prefix before the x and/or y value. To move the window to a position relative to the current location of the pointer, add the m (for "mouse") prefix. To move the window relative to the virtual screen coordinates, add the v (for "virtual screen") prefix β this one is mostly for internal use with FvwmPager, but you can use it to give exact coordinates on the virtual screen and it's best used with the p suffix. To leave either coordinate unchanged, keep can be specified in place of x or y.
For advanced uses, x and y can be used multiple times, but without the prefix m or w. (Peep the complex examples below.)
Simple examples:
# Interactive move
Mouse 1 T A Move
# Move window to top left is at (10%,10%)
Mouse 2 T A Move 10 10
# Move top left to (10pixels,10pixels)
Mouse 3 T A Move 10p 10p
More complex examples (these can be bound as actions to keystrokes, etc.; only the command is shown, though):
# Move window so bottom right is at bottom
# right of screen
Move -0 -0
# Move window so top left corner is 10 pixels
# off the top left screen edge
Move +-10 +-10
# Move window 5% to the right, and to the
# middle vertically
Move w+5 50
# Move window up 10 pixels, and so left edge
# is at x=40 pixels
Move 40p w-10p
# Move window to the mouse pointer location
Move m+0 m+0
# Move window to center of screen (50% of screen
# position minus 50% of widow size).
Move 50-50w 50-50w
Also go look at the AnimatedMove command π
MoveToDesk
MoveToDesk [prev | arg1 [arg2] [min max]]β moves the selected window to another desktop. The arguments are the same as for theGotoDeskcommand. No arguments at all? The window gets moved to the current desk.
π MoveThreshold [pixels] π
Okay bestie, so when you press a mouse button on an object, fvwm is like βhold up, is this a click or a drag?β π Ngl, it's giving click-or-drag anxiety. It waits. If the mouse moves by more than pixels pixels, it assumes it's a drag. Previous fvwm versions hardwired pixels to 3, which is now the default. If pixels is negative or omitted, the default value is restored β and that default might be increased when 16000x9000 pixel displays become affordable. π
π¦ MoveToPage π¦
MoveToPage [options] [x[p | w] y[p | w]] | [prev]
Moves the selected window to another page (x,y). The upper left page is (0,0), the upper right is (M,0), where M is one less than the current number of horizontal pages specified in the DesktopSize command. Similarly the lower left page is (0,N), and the lower right page is (M,N). Negative page numbers refer to pages from the rightmost/lowest page. If x and y are not given, the window is moved to the current page (a window that has the focus but is off-screen can be retrieved with this). Iconic.
Moving windows to a page relative to the current page can be achieved by adding a trailing 'p' after any or both numerical arguments. To move the window relative to its current location, add a trailing 'w'. To move a window to the previous page use prev as the single argument.
Windows are usually not moved beyond desk boundaries. Lowkey respectful.
Possible options are:
wrapxandwrapyβ wrap around the x or y coordinate when the window is moved beyond the border of the desktop. For example, withwrapx, when the window moves past the right edge of the desktop, it reappears on the left edge. πnodesklimitxandnodesklimityβ allow moving windows beyond the desk boundaries in x and y direction (disabling thewrapxandwrapyoptions). π
Examples:
# Move window to page (2,3)
MoveToPage 2 3
# Move window to lowest and rightmost page
MoveToPage -1 -1
# Move window to last page visited
MoveToPage prev
# Move window two pages to the right and one
# page up, wrap at desk boundaries
MoveToPage wrapx wrapy +2p -1p
π MoveToScreen [screen] π
Moves the selected window to another screen. The screen argument must be a valid RandR name. No cap, that's it. β¨
π
OpaqueMoveSize [percentage] π
Tells fvwm the maximum size window with which opaque window movement should be used. The percentage is percent of the total screen area (may be greater than 100). With
OpaqueMoveSize 0
all windows are moved using the traditional rubber-band outline. With
OpaqueMoveSize unlimited
or if a negative percentage is given all windows are moved as solid windows. The default is
OpaqueMoveSize 5
which allows small windows to be moved in an opaque manner but large windows are moved as rubber-bands. If percentage is omitted or invalid the default value is set. To resize windows in an opaque manner you can use the ResizeOpaque style. See the Style command. Slay. π«Ά
π PlaceAgain [Anim] [Icon] π
Causes the current windowβs position to be re-computed using the initial window placement logic. The window is moved to where it would have been if it were a new window that had just appeared. Most useful with Smart or Clever (ReallySmart) placement. With the optional argument Anim an animated move is used to place the window in its new position. With the additional option Icon, the icon is placed again instead. Main character energy for real. β¨
π Raise π
Allows the user to raise a window. Note that this raises a window only in its layer. To bring a window to the absolute top, use
AddToFunc raise-to-top
+ I Layer 0 ontop
+ I Raise
where ontop is the highest layer used in your setup. iykyk. π
πΈ RaiseLower πΈ
Alternately raises and lowers a window. The window is raised if it is obscured by any window (except for its own transients when RaiseTransient style is used; see the Style command) otherwise it is lowered. Vibe check passed. π₯
π Resize π
Resize [[frame] [direction dir] [warptoborder automatic]
[fixeddirection] width[p | c | wa | da] height[p | c]]
Allows for resizing a window. If called from somewhere in a window or its border, then that window is resized. If called from the root window then the user is allowed to select the target window.
Resize without options starts an interactive resize.
If the EdgeResizeDelay style is set or the Alt key is held down, the window can be resized across the edge of the screen.
The operation can be aborted with the Escape key or by pressing any mouse button (except button 1 which confirms it).
If the optional arguments width and height are provided, then the window is resized so that its dimensions are width by height. The units of width and height are percent-of-screen, unless a letter 'p' is appended to one or both coordinates, in which case the location is specified in pixels. With a 'c' suffix the unit defined by the client application (hence the c) is used. With the suffix 'wa' the value is a percentage of the width or height size of the EWMH working area, and with the suffix 'da' it is a percentage of the width or height of the EWMH dynamic working area. So you can say
Resize 80c 24c
to make a terminal window just big enough for 80x24 characters. Iconic terminal moment. π
If the width or height is prefixed with the letter 'w' the size is not taken as an absolute value but added to the current size of the window. Example:
# Enlarge window by one line
Resize keep w+1c
Both, width and height can be negative. In this case the new size is the screen size minus the given value. If either value is "keep", the corresponding dimension of the window is left untouched. The new size is the size of the client window, thus
Resize 100 100
may make the window bigger than the screen. To base the new size on the size of the whole fvwm window, add the frame option after the command. The options fixeddirection, direction and warptoborder are only used in interactive move operations. With fixeddirection the same border is moved even if the pointer moves past the opposite border. The direction option must be followed by a direction name such as "NorthWest", "South" or "East" (you get the idea). Resizing is started immediately, even if the pointer is not on a border. If the special option automatic is given as a direction argument, then the direction to resize is calculated based on the position of the pointer in the window. If the pointer is in the middle of the window, then no direction is calculated. The warptoborder option can be used to warp the pointer to the direction indicated. As with the automatic option for direction, the border to warp to is calculated based on the pointerβs proximity to a given border. Also, if resizing is started by clicking on the window border, the pointer is warped to the outer edge of the border.
AddToFunc ResizeSE I Resize Direction SE
Mouse 3 A M ResizeSE
β¨ Resize β the bottomright / br remix β¨
Resize [bottomright | br x y]
An alternate syntax is used if the keyword bottomright or in short br follows the command name. In this case, the arguments x and y specify the desired position of the bottom right corner of the window. They are interpreted exactly like the x and y arguments of the Move command. Actually, any of the options accepted by the Move command can be used. Periodt. π
π¦ ResizeMaximize [resize-arguments] π¦
Combines the effects of Resize and Maximize in a single command. When used on a maximized window, the window is resized and is still in the maximized state afterwards. When used on an unmaximized window, the window is resized and put into the maximized state afterwards. This is useful if the user wants to resize the window temporarily and then return to the original geometry. The resize-arguments are the same as for the Resize command. Obsessed with the efficiency. β¨
π« ResizeMove resize-arguments move-arguments π«
This command does the same as the Resize and Move commands, but in a single call which is less visually disturbing. The resize-arguments are exactly the same arguments as for the Resize command and the move-arguments are exactly the same arguments as for the Move command except the pointer option which is not supported by the ResizeMove command.
Examples:
# Move window to top left corner and cover
# most of the screen
ResizeMove -10p -20p 0 0
# Grow the focused window towards the top of screen
Current Resize keep w+$[w.y]p keep 0
Note: Fvwm may not be able to parse the command properly if the option bottomright of the Resize command is used. Careful bestie! π
π ResizeMoveMaximize resize-arguments move-arguments π
Combines the effects of ResizeMove and Maximize in a single command. When used on a maximized window, the window is resized and moved and is still in the maximized state afterwards. When used on an unmaximized window, the window is resized and put into the maximized state afterwards. This is useful if the user wants to resize the window temporarily and then return to the original geometry. The resize-arguments and move-arguments are the same as for the ResizeMove command. No notes. π
π RestackTransients π
This command regroups the transients of a window close to it in the stacking order as if the window had just been lowered and then raised. The position of the window itself is not altered. Only windows that use either the RaiseTransient or LowerTransient style are affected at all. When RestackTransients is used on a transient window with the StackTransientParent style set, it is redirected to the parent window. Stacking order drama, handled. π
π SetAnimation milliseconds-delay [fractions-to-move-list] π
Sets the time between frames and the list of fractional offsets to customize the animated moves of the AnimatedMove command and the animation of menus (if the menu style is set to animated; see MenuStyle command). If the fractions-to-move-list is omitted, only the time between frames is altered. The fractions-to-move-list specifies how far the window should be offset at each successive frame as a fraction of the difference between the starting location and the ending location. e.g.:
SetAnimation 10 -.01 0 .01 .03 .08 .18 .3 \
.45 .6 .75 .85 .90 .94 .97 .99 1.0
Animated slay. β¨
Sets the delay between frames to 10 milliseconds, and it sets the positions of all 16 frames of the animation motion. Negative values are totally allowed, bestie, and they're honestly the cute part β you can use them to make the motion look more cartoonish by briefly scooting slightly in the opposite direction of the main motion. The settings above are the default. π
XorPixmap [pixmap]
Picks the pixmap that gets xor'ed in when you're doing rubber-band window moving or resizing. It's giving backup plan energy: it has a better chance of making the rubber-band actually visible if XorValue isn't giving you good results. There's an example pixmap, resize.rainbow.xpm, that ships with the icon distribution. Want to turn XorPixmap back off? Just use the XorValue command, or leave out the pixmap argument entirely. β¨
XorValue [number]
Changes the value that bits get xor'ed with when you're doing rubber-band window moving or resizing. Valid values go from zero up to the maximum value of an unsigned long integer on your system. Setting this is a trial-and-error situation, ngl β no formula, just vibes and testing. The default value 0 tries to find a value that gives a good contrast to black and white. That default value is what you get if the number you give is omitted or invalid. π
π Focus & Mouse Movement π
CursorBarrier [destroy] [options] [left top right bottom]
A cursor barrier is a box that the cursor cannot be moved outside of β unless it gets warped out with CursorMove or WarpToWindow, because those play by their own rules. The left, top, right, and bottom values are the percent distance the box is placed from each of the corresponding edges of the desktop. If a value ends with a p, it's read as a pixel amount instead. Give the coords option and those values become the left/top and right/bottom coordinates of the box's corners instead. Give the screen RandRname option and the positions get computed relative to that specific monitor. Use screen c to drop the barrier on the current monitor. π
Multiple barriers? Yes bestie, just call CursorBarrier multiple times. That's how you build multiple regions to confine the cursor to β like one per monitor in a multi-monitor setup β and then use CursorMove or WarpToWindow to hop the cursor between the barriers. If you include the destroy command, all barriers get destroyed and the mouse roams free again. If destroy is followed by an integer N, only that barrier dies (barriers are numbered in the order they're created, starting at 0). If the integer is negative, it counts backwards β so "-1" is the most recent barrier created, "-2" is the second most recent, and so on. When a barrier is destroyed, all the barriers after it get renumbered. In practice, the move is destroy -1 to kill the most recent barrier without touching any of the earlier ones. π
By default, the key binding ctrl+shift+D will destroy all cursor barriers by calling CursorBarrier destroy.
Here are some examples:
# A barrier 15% from left/right and 10% from top/bottom.
CursorBarrier 15 10 15 10
# A barrier to confine the mouse to the current monitor.
CursorBarrier screen c
# A barrier to confine the mouse to a selected window
Pick CursorBarrier coords $[w.x]p $[w.y]p \
$[math.+.$[w.x],$[w.width]]p $[math.+.$[w.y],$[w.height]]p
# Destroy all barriers
CursorBarrier destroy
Heads up: if theCURSOR_BARRIERlimit gets hit, all definedCursorBarriersare undefined. In pratice, this is unlikely to happen though. If it does happen, a message is printed tofvwm3's debug logs.
CursorBarrier only works if fvwm is complied with the XFixes extension.
CursorMove [screen RANDRNAME] horizontal[p] vertical[p]
Without the screen option, CusorMove moves the mouse cursor a horizontal distance and a vertical distance from where it currently is. The values are either a percent of the virtual desktop size, or a pixel distance if you tack a 'p' onto the end. Either one β or both β can be negative. For example:
# Move down and right by one full page.
CursorMove 100 100
# Move down two full pages.
CursorMove 0 200
# Move half page right and quarter page up.
CursorMove 50 -25
# Move left 100 pixels and down 50 pixels.
CursorMove -100p 50p
If you include the screen option followed by a valid RandR monitor name, CursorMove will move the cursor to the absolute position (starting at the top left corner) given by the arguments β either as percent values of the monitor's size, or as an absolute location with the 'p' suffix. For example:
# Move cursor to center of monitor DP-1
CursorMove screen DP-1 50 50
# Move cursor to the exact location (400, 200) of monitor DP-2
CursorMove screen DP-2 400p 200p
When you're moving to a specified screen, the horizontal and vertical values always get shifted to land inside the current page of the specified monitor. So for instance '50', '150', and '-150' all end up at the center of the monitor, and none of them will change the monitor's page. Use GotoPage if you want to change the page of a specified monitor. Negative values can be used to specify a distance from the right/bottom corner of the monitor. π¦
CusorMove can only move the cursor relative to its current position, or to an absolute position on a given monitor. Want to move the cursor relative to a window? That's WarpToWindow's whole thing.
FlipFocus [NoWarp]
Runs a Focus command as if the user had used the pointer to select the window. This command alters the order of the WindowList the exact same way clicking in a window to focus does β meaning the target window gets yanked out of the WindowList and plopped at the start. This command is recommended for use with the Direction command and in the function invoked from WindowList. π
Focus [NoWarp]
Sets the keyboard focus to the selected window. If the NoWarp argument is given, that is literally all it does. Otherwise it also moves the viewport or the window as needed to make the selected window visible. This command does not automatically raise the window. It does not warp the pointer into the selected window (see the WarpToWindow function for that). It does not de-iconify. And it does not alter the order of the WindowList β it rotates the WindowList around so that the target window ends up at the start.
When the NoWarp argument is given, Focus cannot transfer the keyboard focus to windows on other desks.
Want 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
WarpToWindow [!raise | raise] x[p] y[p]
Warps the cursor to the associated window and raises it β unless the option !raise is present, in which case it stays put. The parameters x and y default to a percentage of the window, down and in from the upper left hand corner (or a 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 gets reversed. π§
This command also works with windows that are not managed by fvwm. In that case, fvwm does not bring the window onto the screen if it isn't visible. For example, it's possible to warp the pointer to the center of the root window:
WindowId root WarpToWindow 50 50
π Window State π
Close
If the window accepts the delete window protocol, a message gets sent to it asking it to gracefully remove itself. If the window doesn't understand the delete window protocol, then the window is destroyed just like 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. It just sits there. Rude.
Delete
Sends a message to a window asking that it remove itself, which frequently causes the application to exit. Politely. π
Destroy
Destroys an application window, which usually causes the application to crash and burn. No negotiation, no asking nicely, it's just gone. π₯
Iconify [bool]
Iconifies a window if it's not already iconified, or de-iconifies it if it already is. The optional argument bool is a boolean argument. "True" means only iconification is allowed, while "False" forces de-iconification. Using "toggle" switches between the iconified and de-iconified states.
There are a number of Style options that 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. So maybe don't, bestie. π
Maximize [flags] [bool | forget] [horizontal[p]] [vertical[p]]
Without its optional arguments β or if the bool bit has the value "toggle" β Maximize makes the window alternately switch from a full-screen size to its normal size. Want to force a window into maximized (or normal) state? Pass 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. That's useful in conjunction with the commands ResizeMaximize and ResizeMoveMaximize. If the window isn't maximized, nothing happens at all.
With the optional horizontal and vertical arguments, which are expressed as a percentage of a full screen, you get to 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 β so -25 is the same as 75. If horizontal is "grow", the window is maximized to the current available space until it finds any obstacle. The vertical resizing works the same way. If both the horizontal and vertical values are "grow", it expands vertically first, then horizontally, hunting for space. And instead of the horizontal "grow" argument, you can use "growleft" or "growright", and respectively "growup" and "growdown". π
The optional flags argument is a space separated list, and she contains these keywords, mwah: fullscreen, ewmhiwa, growonwindowlayer, growonlayers, keepgrowing, all_windows, both_sides, and screen. Let's break it down bestie:
fullscreenβ makes the window go fullscreen if the appropriate EWMH hint is set β¨ewmhiwaβ tells fvwm to ignore the EWMH working area, periodtgrowonwindowlayerβ makes the various grow methods ignore windows sitting on a layer that isn't the current layer of the window being maximizedgrowonlayersβ this one needs two integer arguments. First = the minimum layer, second = the maximum layer to use. Windows outside that layer range get ignored by the grow methods. And a negative value as the first or second argument means "assume no minimum or maximum layer" π«Άall_windowsβ considers all windows on the same monitor in the direction the window is growing. Use this to grow a window right up to the edge of a window it's next toboth_sidesβ considers both sides of other windows when growing (by default only the close side gets considered, lowkey unfair). Use this to grow a window to the boundaries of a window it's currently inside ofkeepgrowingβ lets the window keep growing past any window boundary it's currently touching, until it grows into the next closest window boundary πscreenβ must have an argument, which specifies the screen on which to operate
Here are some examples, because reading is one thing and seeing it is another π
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. β οΈ Like, you can. But be careful, bestie.
β¨ 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. It's giving "glow up on demand" π
πΈ 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. One window, one glow up, no group chat drama π¦
π 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". Basically: commit to the bit, or don't.
π StickAcrossPages [bool] π
Works like Stick but only sticks a window across pages, not across desks.
π StickAcrossDesks [bool] π
Works like Stick but only sticks a window across desks, not across pages.
π WindowShade [bool] | [[ShadeAgain] direction] π
Toggles the window shade feature for titled windows. Windows in the shaded state only display a title-bar. Iconic behaviour, honestly.
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. Don't build your whole personality on it bestie π
π±οΈ Mouse & Key Bindings β¨οΈ
π IgnoreModifiers [Modifiers] π
Tells fvwm which modifiers to ignore when matching Mouse or Key bindings. IgnoreModifiers affects the ClickToFocus style too. This command belongs into your config. If you issue it when your fvwm session is already up and running the results are unpredictable. π The should appear before any applications or modules are started in your config file (e.g. with the Exec command).
Modifiers has the same syntax as in the Mouse or Key bindings, with the addition of 'L' meaning the caps lock key. The default is "L". Modifiers can be omitted, meaning no modifiers are ignored. This command comes in handy if the num-lock and scroll-lock keys interfere with your shortcuts. With XFree86 '2' usually is the num-lock modifier and '5' refers to the scroll-lock key. To turn all these pesky modifiers off you can use this command:
IgnoreModifiers L25
If the Modifiers argument is the string "default", fvwm reverts back to the default value "L".
Important This command creates a lot of extra network traffic, depending on your CPU, network connection, the number ofKeyorMousecommands in your configuration file and the number of modifiers you want to ignore. If you do not have a lightning fast machine or very few bindings you should not ignore more than two modifiers. I.e. do not ignore
if you have no problem with it. In the FAQ you can find a better solution of this problem.
π EdgeCommand [screen RANDRNAME] [direction [Function]] π
Binds a specified fvwm command Function to an edge of the screen. Direction may be one of "North", "Top", "West", "Left", "South", "Bottom", "Right" and "East". If Function is omitted the binding for this edge is removed. If EdgeCommand is called without any arguments all edge bindings are removed. If the literal option screen followed by a RandR screen name RANDRNAME is given, the command is set only for the given monitor. Multi-monitor girlies, this one's for you π«Ά
Function is executed when the mouse pointer enters the invisible pan frames that surround the visible screen. The binding works only if EdgeThickness is set to a value greater than 0. If a function is bound to an edge, scrolling specified by EdgeScroll is disabled for this edge. It is possible to bind a function only to some edges and use the other edges for scrolling. This command is intended to raise or lower certain windows when the mouse pointer enters an edge. FvwmAuto can be used get a delay when raising or lowering windows.
The following example raises FvwmButtons if the mouse pointer enters the top edge of the screen.
# Disable EdgeScrolling but make it possible
# to move windows over the screen edge
EdgeResistance -1
Style * EdgeMoveDelay 250
Style * EdgeMoveResistance 20
# Set thickness of the edge of the screen to 1
EdgeThickness 1
# Give focus to FvwmButtons if the mouse
# hits top edge
EdgeCommand Top Next (FvwmButtons) Focus
# Make sure the Next command matches the window
Style FvwmButtons CirculateHit
Module FvwmButtons
Module FvwmAuto 100 "Silent AutoRaiseFunction" \
"Silent AutoLowerFunction"
# If any window except FvwmButtons has
# focus when calling this function
# FvwmButtons are lowered
DestroyFunc AutoLowerFunction
AddToFunc AutoLowerFunction
+ I Current (!FvwmButtons) All (FvwmButtons) Lower
# If FvwmButtons has focus when calling this function raise it
DestroyFunc AutoRaiseFunction
AddToFunc AutoRaiseFunction
+ I Current (FvwmButtons) Raise
Normally, the invisible pan frames are only on the screen edges that border virtual pages. If a screen edge has a command bound to it, the pan frame is always created on that edge.
π¦ EdgeLeaveCommand [screen RANDRNAME] [direction [Function]] π¦
Binds a specified fvwm command Function to an edge of the screen. Direction may be one of "North", "Top", "West", "Left", "South", "Bottom", "Right" and "East". If Function is omitted the binding for this edge is removed. If EdgeLeaveCommand is called without any arguments all edge bindings are removed. If the literal option screen followed by a RandR screen name RANDRNAME is given, the command is set only for the given monitor.
Function is executed when the mouse pointer leaves the invisible pan frames that surround the visible screen. The binding works only if EdgeThickness is set to a value greater than 0. If a function is bound to an edge, scrolling specified by EdgeScroll is disabled for this edge. It is possible to bind a function only to some edges and use the other edges for scrolling. This command is intended to raise or lower certain windows when the mouse pointer leaves an edge. FvwmAuto can be used get a delay when raising or lowering windows. See example for EdgeCommand.
Normally, the invisible pan frames are only on the screen edges that border virtual pages. If a screen edge has a command bound to it, the pan frame is always created on that edge.
β¨οΈ Key [(window)] Keyname Context Modifiers Function
okay bestie, keyboard bindings time!! This one binds a keyboard key to a specified fvwm command, or removes the binding if Function is -. The syntax is the same as for a Mouse binding except that the mouse button number gets swapped out for a Keyname. β¨
Normally, the key binding is activated when the key is pressed. Keyname is a standard X11 key name as defined in /usr/include/X11/keysymdef.h (without the XK_ prefix), or the keysym database /usr/X11R6/lib/X11/XKeysymDB. Only key names that are generated with no modifier keys, or with just the one key whose name the source text forgot to actually print right here, are guaranteed to work. iykyk
Context and Modifiers are defined as in the Mouse binding. But here's the plot twist π β when you press a key, the context window is the window that has the keyboard focus. That is not necessarily the same as the window the pointer is over (hi, SloppyFocus and ClickToFocus). Also note that key bindings with the 'R' (root window) context do not work properly with SloppyFocus and ClickToFocus. If you run into problems, use the PointerKey command instead. And if you want to bind keys to a window with SloppyFocus or ClickToFocus that are supposed to work when the pointer is not over the window, fvwm assumes the pointer is over the client window β i.e. you have to use the 'W' context. π
The special context 'M' for menus can be used to (re)define the menu controls. It can be used alone or together with 'T', 'S', 'I', '[', ']', '-' and '_'. See the Menu Bindings section for details.
The following example binds the built-in window list to pop up when F11 is hit, no matter where the mouse pointer is:
Key F11 A SCM WindowList
Binding a key to a title-bar button causes that button to appear. Please refer to the Mouse command for details.
π±οΈ Mouse [(window)] Button Context Modifiers Function
Defines a mouse binding, or removes the binding if Function is -. Button is the mouse button number. If Button is zero then any button performs the specified function. heads up tho: only mouse buttons 1 to 5 are fully supported by X11. Any number above this works only partially β complex functions can not be used with these buttons, and neither can any operation that requires dragging the pointer with the button held. This is due to limitations of X11, not because fvwm is being dramatic. By default, the highest allowed button number is 9.
Context describes where the binding applies. Valid contexts are:
'R'β the root window π±'W'β an application window'D'β a desktop application (as kdesktop or Nautilus desktop)'T'β a window title-bar'S'β a window side, top, or bottom bar'[',']','-'and'_'β the left, right, top or bottom side only'F'β a window frame (the corners)'<','^','>'and'v'β the top left, top right, bottom right or bottom left corner'I'β an icon window'0'through'9'β title-bar buttons
β¦or any combination of these letters. 'A' is for any context. For instance, a context of "FST" applies when the mouse is anywhere in a window's border except the title-bar buttons. Only 'S' and 'W' are valid for an undecorated window.
The special context 'M' for menus can be used to (re)define the menu controls. It can be used alone or together with 'T', 'S', 'I', '[', ']', '-' and '_'. See the Menu Bindings section for details.
The special context 'P' controls what buttons can be used to place a window. When using this context no modifiers are allowed (Modifiers must be N), no window is allowed, and the Function must be one of PlaceWindow, PlaceWindowDrag, PlaceWindowInteractive, CancelPlacement, CancelPlacementDrag, CancelPlacementInteractive or -.
PlaceWindow makes Button usable for window placement, both for interactive and drag move. CancelPlacement does the inverse β that is, it makes Button cancel move for both interactive and drag move. It may however not override how new windows are resized after being placed. That is controlled by the Emulate command. Also, a window being dragged can always be placed by releasing the button hold while dragging, regardless of whether it is set to PlaceWindow or not. π«Ά
PlaceWindowDrag and PlaceWindowInteractive / CancelPlacementDrag and CancelPlacementInteractive work as PlaceWindow / CancelPlacement with the exception that they only affect either windows dragged / placed interactively.
- is equivalent to CancelPlacement.
The following example makes all buttons but button 3 usable for interactive placement and makes drag moves started by other buttons than one cancel if button 1 is pressed before finishing the move:
Mouse 0 P N PlaceWindow
Mouse 3 P N CancelPlacement
Mouse 1 P N CancelPlacementDrag
By default, the binding applies to all windows. You can specify that a binding only applies to specific windows by putting the window name in brackets. The window name is a wildcard pattern specifying the class, resource or name of the window you want the binding to apply to.
The following example shows how the same key-binding can be used to perform different functions depending on the window that is focused:
Key (rxvt) V A C Echo ctrl-V-in-RXVT
Key (*term) V A C Echo ctrl-V-in-Term
Key (*vim) V A C --
Key V A C Echo ctrl-V-elsewhere
A -- action indicates that the event should be propagated to the specified window to handle. This is only a valid action for window-specific bindings.
This example shows how to display the WindowList when Button 3 is pressed on an rxvt window:
Mouse (rxvt) 3 A A WindowList
Note that Fvwm actually intercepts all events for a window-specific binding and (if the focused window doesn't match any of the bindings) sends a synthetic copy of the event to the window. This should be transparent to most applications, however (for security reasons) some programs ignore these synthetic events by default β xterm is one of them. To enable handling of these events, add the following line to your ~/.Xdefaults file:
XTerm*allowSendEvents: true
Modifiers is any combination of 'N' for no modifiers, 'C' for control, 'S' for shift, 'M' for Meta, 'L' for Caps-Lock or 'A' for any modifier. For example, a modifier of "SM" applies when both the shift and Meta keys are down (that's literally what S and M mean in the list right above π
). X11 modifiers mod1 through mod5 are represented as the digits '1' through '5'. The modifier 'L' is ignored by default. To turn it on, use the IgnoreModifiers command.
Function is one of fvwm's commands.
The title-bar buttons are numbered with odd numbered buttons on the left side of the title-bar and even numbers on the right. Smaller-numbered buttons are displayed toward the outside of the window while larger-numbered buttons appear toward the middle of the window (0 is short for 10). In summary, the buttons are numbered:
1 3 5 7 9 0 8 6 4 2
The highest odd numbered button which has an action bound to it determines the number of buttons drawn on the left side of the title bar. The highest even number determines the number of right side buttons which are drawn. Actions can be bound to either mouse buttons or keyboard keys. β¨
π― PointerKey [(window)] Keyname Context Modifiers Function
This command works exactly like the Key command. The only difference is that the binding operates on the window under the pointer. Normal key bindings operate on the focused window instead. The PointerKey command can for example be used to bind keys to the root window if you are using SloppyFocus or ClickToFocus. However β some applications (xterm is one example) are unable to handle this key anymore, even if the pointer is over the xterm window. It is recommended to use the PointerKey command only for key combinations that are not needed in any application window. π
Example:
Style * SloppyFocus
PointerKey f1 a m Menu MainMenu
π₯οΈ Controlling the Virtual Desktop π
DesktopName desk name
Defines the name of the desktop number desk to name. This name is used in the WindowList command and in the FvwmPager, where it overrides the Label configuration option. Moreover, if consecutive names starting from desktop 0 are defined, then these names can be used by any EWMH compliant application (as a pager). π
DesktopConfiguration global | per-monitor | shared
This command controls the behaviour of how desktops should be managed by FVWM. By default, for all screens detected by FVWM through RandR support, the option of global means that all windows on the same desk across monitors is treated as one β hence, when a change of desktop/page happens, the same change occurs across all monitors.
With per-monitor, each RandR monitor has a separate copy of desktops, and hence function independently of one another when switching desks/pages.
When shared is set, the desktops are shared amongst all monitors. So for example, with the following number of desktops defined with two monitors ([] is monitor1, and <> is monitor2):
[0] 1 2 <3> 4
Moving between desktops would still honor the monitor the desktop is being requested on. If monitor1 wanted to switch to desktop 3, then that desktop is exchanged with monitor2 such that the following showed the active desktop on both monitors:
<0> 1 2 [3] 4
This concept is similar to how spectrwm or xmonad handles desktops. π
Note: these each DesktopConfiguration mode can be changed on-the-fly.
DesktopSize HorizontalxVertical
Defines the virtual desktop size in units of the physical screen size. π
EdgeResistance delay, EdgeResistance scrolling moving [screen-scrolling]
Tells how hard it should be to change the desktop viewport by moving the mouse over the edge of the screen. The parameter tells how many milliseconds the pointer must spend on the screen edge before fvwm moves the viewport. This is intended for people who use
EdgeScroll 100 100
but find themselves accidentally flipping pages when they do not want to. we've all been there bestie If -1 is given as the delay, scrolling is disabled completely.
The second form of invocation with two or three arguments is obsolete and should be replaced with the following three commands as needed:
EdgeResistance scrolling
Style * EdgeMoveDelay scrolling
Style * EdgeMoveResistance moving
or
Style * EdgeMoveResistance moving screen-scrolling
Fvwm does this substitution all on its own and prints a warning β no cap, it just quietly handles the switch for you and tells you it did. π
π EdgeScroll π
EdgeScroll [screen RANDRNAME] horizontal[p] vertical[p] [wrap | wrapx | wrapy]β sets what percentage of a page gets scrolled when your cursor yeets itself into the edge of a page.
The optional screen RANDRNAME bit names the RandR monitor this setting should apply to, ignoring every other monitor. Skip it and the value applies to all monitors, bestie. β¨
A trailing p changes the whole interpretation to mean pixels instead.
If you do not want any paging or scrolling when you hit the edge of a page, drop this in your config file:
EdgeScroll 0 0
β¦or, possibly better, set the EdgeThickness to zero. See the EdgeThickness command. And if you want whole pages, use:
EdgeScroll 100 100
Both horizontal and vertical should be positive numbers, periodt.
If the horizontal and vertical percentages are multiplied by 1000, or one of the keywords wrap, wrapx and wrapy is given, then scrolling wraps around at the edge of the desktop. And if you go:
EdgeScroll 100000 100000
fvwm scrolls by whole pages, wrapping around at the edge of the desktop. Iconic behaviour, honestly. π¦
πΈ EdgeThickness πΈ
EdgeThickness [screen RANDRNAME] 0 | 1 | 2β this is the width or height of the invisible window that fvwm creates on the edges of the screen, the ones used for the edge scrolling feature.
The optional screen RANDRNAME specifies the RandR monitor this setting should apply to, ignoring all other monitors. No option? It applies the value to all monitors. π«Ά
So here's the tea: in order to enable page scrolling via the mouse, four windows called the "pan frames" get placed at the very edge of the screen. That's literally how fvwm detects the mouse's presence at the window edge. Because of the way this works, they need to be at the top of the stack and they eat mouse events β so if you have any kind of error along the lines of: "mouse clicks at the edge of the screen do the wrong thing", you're having trouble with the pan frames, and (assuming you don't use the mouse to flip between pages) you should set the EdgeThickness to 0. π
A value of0completely disables mouse edge scrolling, even while dragging a window.1gives the smallest pan frames, which seem to work best except on some servers.2is the default.
Pan frames of 1 or 2 pixels can sometimes be confusing, lowkey. For example, if you drag a window over the edge of the screen so that it straddles a pan frame, clicks on the window near the edge of the screen are treated as clicks on the root window. π
π EwmhBaseStruts π
EwmhBaseStruts screen RANDRNAME left right top bottomβ whereleft,right,topandbottomare positive or null integers which define bands at the edge of the screen.
If screen is given, followed by the RANDRNAME of a given display, then the EwmhBaseStruts are defined for just that RANDRNAME. left defines a band on the left of your screen of width left, right defines a band on the right of your screen of width right, top defines a band on the top of your screen of height top, and bottom defines a band on the bottom of your screen of height bottom. The unit is the pixel and the default is 0 0 0 0. π
These areas define additional reserved space, on top of the reserved space defined by some ewmh compliant applications. This is used to compute the Working Area. See the Extended Window Manager Hints section for a definition of the Working Area. β¨
π EwmhNumberOfDesktops π
EwmhNumberOfDesktops num [max]β this command is useful only for an ewmh compliant pager or taskbar (likekpagerorkicker taskbar) and not for fvwm modules (FvwmPagerorFvwmIconMan).
It causes a compliant application to consider at least num desktops (desktop 0 to desktop num-1). The optional argument max causes a compliant application to never consider more than max desktops. If max is 0 (the default) there is no limitation.
The actual number of desktops is determined dynamically. It is at least num, but it can be d if there is a window on desktop d-1 (or if the current desktop is desktop d-1) and d is less or equal to max or max is null. Moreover, a compliant pager can ask to change num itself. This is accepted by fvwm only if this number is less than or equal to max or if max is null. π§
Note that negative desktops are not supported by the ewmh specification.
The default is 4 0.
β GotoDesk β
GotoDesk [screen RANDRNAME] [prev | arg1 [arg2] [min max]]β switches the current viewport to another desktop (workspace, room).
The current monitor is used in per-monitor and shared DesktopConfiguration, unless the literal screen followed by a valid RandR monitor name is included.
The command takes 1, 2, 3, or 4 arguments:
- A single argument is interpreted as a relative desk number.
- Two arguments are understood as a relative and an absolute desk number.
- Three arguments specify a relative desk and the minimum and maximum of the allowable range.
- Four arguments specify the relative, absolute, minimum and maximum values.
If a literal prev is given as the single argument, the last visited desk number is used. π
If arg1 is non zero then the next desktop number is the current desktop number plus arg1.
If arg1 is zero then the new desktop number is arg2. (If arg2 is not present, then the command has no effect.)
If min and max are given, the new desktop number is no smaller than min and no bigger than max. Values out of this range are truncated (if you gave an absolute desk number) or wrapped around (if you gave a relative desk number).
The syntax is the same as for MoveToDesk, which moves a window to a different desktop. π₯
The number of active desktops is determined dynamically. Only desktops which contain windows or are currently being displayed are active. Desktop numbers must be between 0 and 2147483647 (is that enough?). Negative desktop numbers are not supported by the EWMH specifications and are no longer supported in fvwm. π
π¦ GotoDeskAndPage π¦
GotoDeskAndPage screen | prev | desk xpage ypageβ switches the current viewport to another desktop and page, similar to theGotoDeskandGotoPagecommands. The new desk isdeskand the new page is (xpage,ypage). Two birds, one stone, slay. β¨
π GotoPage π
GotoPage screen | prev | [options] x[p] y[p]β moves the desktop viewport to page (x,y).
The upper left page is (0,0), the upper right is (M,0), where M is one less than the current number of horizontal pages specified in the DesktopSize command. The lower left page is (0,N), and the lower right page is (M,N), where N is the desktop's vertical size as specified in the DesktopSize command. To switch to a page relative to the current one, add a trailing p after any or both numerical arguments. π
Possible options are wrapx and wrapy to wrap around the x or y coordinate when the viewport is moved beyond the border of the desktop.
The name of the RandR screen.
To go to the last visited page use prev as the first argument.
The GotoPage function should not be used in a pop-up menu.
Examples:
# Go to page (2,3)
GotoPage 2 3
# Go to lowest and rightmost page
GotoPage -1 -1
# Go to last page visited
GotoPage prev
# Go two pages to the right and one page up
GotoPage +2p -1p
π Scroll π
Scroll [screen RANDRNAME] [horizonal[p] vertical[p] | reverse]β scrolls the virtual desktop's viewport byhorizontalpages in the x-direction andverticalpages in the y-direction, or starts interactive scrolling of the viewport.
Either or both entries may be negative. Both horizontal and vertical values are expressed in percent of pages, so:
Scroll 100 100
means to scroll down and right by one full page. And:
Scroll 50 25
means to scroll right half a page and down a quarter of a page.
The Scroll function should not be called from pop-up menus.
Normally, scrolling stops at the edge of the desktop. π
If the horizontal and vertical percentages are 100 or more and are multiplied by 1000 then scrolling wraps around at the edge of the desktop. If:
Scroll 100000 0
is executed over and over, fvwm moves to the next desktop page on each execution and wraps around at the edge of the desktop, so that every page is hit in turn. No page left behind fr fr. π₯
If the letter p is appended to each coordinate (horizontal and/or vertical), then the scroll amount is measured in pixels.
Without arguments, or if the option reverse is given, interactive scrolling takes place. The viewport scrolls as the mouse is moved. With the reverse option, scrolling is done in the opposite direction of the mouse movement, and without it, scrolling happens in the same direction as the mouse. π±οΈ
The binding:
Mouse 1 A CM Scroll reverse
gives an effect of grabbing and dragging the viewport with button 1 if Control and Meta is pressed. Main character energy, honestly. π
If screen is given, followed by the RANDRNAME of a given display, then the specified screen is scrolled. This is only useful if using per-monitor or shared DesktopConfiguration and wanting to scroll a monitor other than the current monitor. Interactive scrolling always scrolls the current monitor. β¨
π User Functions and Shell Commands π
π AddToFunc π
AddToFunc [name [I | J | M | C | H | D action]]β begins or adds to a function definition.
Here is an example:
AddToFunc Move-or-Raise I Raise
+ M Move
+ D Lower
The function name is "Move-or-Raise", and it could be invoked from a menu or a mouse binding or key binding:
Mouse 1 TS A Move-or-Raise
Obsessed with her, truly. π
fr fr, that function name absolutely cannot have any whitespace lurking inside it β no spaces, no tabs, nada. And no guarantees are made about whether function names with embedded whitespace even work, okay? This whole thing might also change in the future without further notice, so likeβ¦ don't build your whole config on it. π
So here's the tea on the letter that comes before the action β it tells you what kind of action triggers the command that follows it:
Iβ stands for "Immediate", and it fires as soon as the function is invoked. β‘Jβ kinda like "Immediate" but it's delayed until a button is pressed or released, or the pointer moves, or the function completes. It's always executed before the other function actions, periodt.Mβ stands for "Motion", aka when the user starts moving the mouse. π±οΈCβ stands for "Click", aka the user presses AND releases the mouse button.Hβ stands for "Hold", aka the user presses a mouse button and holds it down for more thanClickTimemilliseconds. β³Dβ stands for "Double-click". βοΈ
The action I causes an action to be performed on the button-press, if the function is invoked with prior knowledge of which window to act on.
There's also a whole bunch of predefined symbols that get swapped out for certain values if they show up on the command line β go peek at the Command Expansion section for the details, bestie. π
Warning β οΈ Please read the comments on executing complex functions in the section Scripting and Complex Functions. Like, actually read them. π
Examples, because examples ate:
If you call
Key F10 R A Function MailFunction xmh "-font fixed"
and MailFunction is
AddToFunc MailFunction
+ I Next ($0) Iconify off
+ I Next (AcceptsFocus, $0) Focus
+ I None ($0) Exec exec $0 $1
Then the last line of the function becomes
+ I None (xmh) Exec exec xmh -font fixed
The expansion is performed as the function is executed, so you can use the same function with all sorts of different arguments. You could use
Key F11 R A Function MailFunction zmail "-bg pink"
in the same config, if you wanted. β¨ An example of using "$[w.id]" is:
AddToFunc PrintFunction
+ I Raise
+ I Exec xdpr -id $[w.id]
Note that "$$" is expanded to '$'.
Another example: bind the right mouse button within the window button number 6 (this is a minimize button for the win95 theme) to iconify all windows of the same resource:
AddToFunc FuncIconifySameResource "I" All ($0) Iconify on
Mouse 3 6 A FuncIconifySameResource $[w.resource]
Beep π
As might be expected, this makes the terminal beep. iconic, honestly.
DestroyFunc function
Deletes a function, so that subsequent references to it are no longer valid. You can use this to change the contents of a function during a fvwm session. The function can be rebuilt using AddToFunc. π
DestroyFunc PrintFunction
Echo string
Prints a message to the debug log file, which requires logging to be enabled. See the -v option or PrintInfo for more information on both enabling debug logging and the log file location. Potentially useful for debugging things in your config or getting the value of variables. π
Echo Beginning style definitions...
Echo Current desk $[desk.n].
EchoFuncDefinition function
The EchoFuncDefinition is similar to the Echo command but prints the definition for the given function to the debug log file. It is useful to find out how fvwm handles quoting and for debugging functions. π΅οΈ
Exec command
Executes command. You should not use an ampersand '&' at the end of the command. You probably want to use an additional "exec" at the beginning of command. Without that, the shell that fvwm invokes to run your command stays until the command exits. In effect, you'll have twice as many processes running as you need. π Note that some shells are smart enough to avoid this, but it never hurts to include the "exec" anyway.
The following example binds function key in the root window, with no modifiers, to the exec function. The program rxvt is started with an assortment of options.
Key F1 R N Exec exec rxvt -fg yellow -bg blue \
-e /bin/tcsh
Note that this function doesn't wait for command to complete, so things like:
Exec "echo AddToMenu ... > /tmp/file"
Read /tmp/file
do not work reliably (see the PipeRead command). π«
ExecUseShell [shell]
Makes the Exec command use the specified shell, or the value of the $SHELL environment variable if no shell is specified, instead of the default Bourne shell (/bin/sh).
ExecUseShell
ExecUseShell /usr/local/bin/tcsh
Function FunctionName
Used to bind a previously defined function to a key or mouse button. The following example binds mouse button 1 to a function called "Move-or-Raise", whose definition was provided as an example earlier in this man page. After performing this binding fvwm executes the "move-or-raise" function whenever button 1 is pressed in a window's title-bar. π―
Mouse 1 T A Function Move-or-Raise
The keyword Function may be omitted if FunctionName does not coincide with an fvwm command.
Warning: β οΈ Please read the comments on executing complex functions in the section Scripting and Complex Functions.
InfoStoreAdd key value
Stores the value at the given key. This is useful to store generic information used in the lifetime of an fvwm config file. For example storing program preferences for opening video files. π¬
The purpose of this command is to store internal information to fvwm which can be used by fvwm functions, or when opening programs of a certain type. Previous to this command the only way to do this was via SetEnv but this is discouraged because it places such information in the environment, which pollutes it and makes the information global to other processes started by fvwm which may then modify them which might not be what's wanted. Hence the point of InfoStoreAdd is to still allow for such information to be stored, but kept internal to fvwm. π§
In this way, one can build up as many key/value pairs as needed. Recalling the value of a given key happens through fvwm's usual expansion mechanism. See the Command Expansion section for more details. For example:
InfoStoreAdd teddybearprog xteddy
# Echo the value of teddybearprog
Echo $[infostore.teddybearprog]
Removing an entry from the InfoStore is done with the InfoStoreRemove command. π§Ί
InfoStoreRemove key
Removes an entry at the given key from the InfoStore. Example:
InfoStoreRemove teddybearprog
Nop π«
Does nothing. This is used to insert a blank line or separator in a menu. If the menu item specification is
AddToMenu MyMenu " " Nop
then a blank line is inserted. If it looks like
+ "" Nop
then a separator line is inserted. Can also be used as the double-click action for Menu or Popup.
PipeRead command [quiet]
Causes fvwm to read commands from the output of the command. This command is executed by /bin/sh as if you typed it on the command line. If the command consists of more than one word it must be quoted. Useful for building up dynamic menu entries based on a directories contents, for example. If the keyword Quiet follows the command no message is produced if the command is not found. π€«
Example:
AddToMenu HomeDirMenu
PipeRead 'for i in $HOME/*; \
do echo "+ $i Exec xterm -e vi $i"; done'
Note: ThePipeReadchanges the pointer to a watch cursor by default during execution. However, some commands, for examplexwd, need to take control of the pointer themselves and do not work. To disable the watch cursor, use the command prior toPipeReadβ
BusyCursor Read off
The PipeRead command executes synchronously. If you want to Exec something, but need the command to run synchronously, you might do something like:
PipeRead 'command 1>&2'
The redirection causes any output from the program to go to stderr instead of being read as a sequence of commands by fvwm. PipeRead returns 1 if the given command could be executed or -1 if not (see the section Conditional Commands for the meaning of return codes). π
Read filename [quiet]
Causes fvwm to read commands from the file named filename. If the keyword Quiet follows the command no message is produced if the file is not found. If the file name does not begin with a slash ('/'), fvwm looks in the user's data directory, then the system data directory. The user's data directory is by default $HOME/.fvwm. It can be overridden by exporting FVWM_USERDIR set to any other directory. The Read command returns 1 if the given file could be read or -1 if not (see the section Conditional Commands for the meaning of return codes). π
SetEnv variable value
Set an environment variable to a new value, similar to the shell's export or setenv command. The variable and its value are inherited by processes started directly by fvwm. For example:
SetEnv height HEIGHT
Silent command
A number of commands require a window to operate on. If no window was selected when such a function is invoked the user is asked to select a window. Sometimes this behavior is unwanted, for example if the function was called by a module and the window that was selected at first does not exist anymore. You can prevent this by putting Silent in front of the fvwm command. If a function that needs a window is called with Silent without a window selected, it simply returns without doing anything. If Silent is used on a user defined function it affects all function and sub function calls until the original function exits. π€
Another usage of Silent is with binding commands Key, PointerKey and Mouse, this disables error messages.
Silent also disables the error message for non-existent commands. Note: This command is treated as a prefix to its command. Expansion of the command line is done as if Silent was not there.
Examples:
Silent Move 0 0
Silent User_defined_function
# do not complain on keyboards without "Help" key
Silent Key Help R A Popup HelpMenu
UnsetEnv [variable]
okay so UnsetEnv is basically the delete button for environment variables π
β it does the same kind of thing as the shell's export or unsetenv command, except fvwm-flavoured. You give it a variable, and that variable gets removed from the environment array that's inherited by processes started directly by fvwm. gone. not invited anymore. π«Ά
Wait window
bestie listen, this one is functions-only π β it's meant to be used in fvwm functions and nowhere else. What it does is make the function pause, just stop mid-step, until a new window matching window actually appears. β¨
And window is flexible like that: it can be a window's name, its class, or a resource string. It can also contain the wildcards * and ?, which get matched in the usual Unix filename manner. πΈ
It's especially useful inside the "InitFunction" when you're trying to start windows on specific desktops:
AddToFunc InitFunction
+ I Exec exec xterm -geometry 80x64+0+0
+ I Wait xterm
+ I GotoDesk 0 2
+ I Exec exec xmh -font fixed -geometry \
507x750+0+0
+ I Wait xmh
+ I GotoDesk 0 0
so the way that function works: it starts an xterm on the current desk, waits for it to map itself, then switches over to desk 2 and starts an xmh. And once the xmh window shows up, control moves to desk 0. slay. π
During a wait, fvwm stays partially functional β but any input coming from the modules gets queued up and only processed after the window appears or the command gets aborted. So for example, you literally can not focus windows withFvwmIconManorFvwmPagerwhile a wait is happening. π
Need to bail out of a Wait pause? Press Ctrl-Alt-Escape (where Alt is the first modifier). To redefine that key sequence, go see the EscapeFunc command. π§
Status On | Off
Turns status either On or Off. π What "status" means here: it sends info in JSON format down a named pipe (which you set via the FVWM_STATUS_PIPE env var) about the current desks and number of windows, etc. The whole point is giving third-party tools a fast way to find out what's happening inside fvwm. For example, that JSON could be manipulated and sent off to tools such as lemonbar, polybar, etc. β¨
The format of the JSON blob looks like this:
{
"version": 3,
"current_screen": "HDMI2",
"screens": {
"HDMI2": {
"randr_order": 0,
"current_client": "n6tadam@shuttle: ~",
"desktops": {
"0": {
"number": 0,
"is_urgent": false,
"is_current": true,
"number_of_clients": 5
},
},
},
},
}
These sections repeat for all screens/groups/etc, depending on how many there are of each. π
Conditional Commands
So conditional commands are exactly what they sound like: commands that only actually run if certain conditions are met. π Most of them work on windows β think Next, ThisWindow or All. There's one conditional command, Test, that works on global conditions that have nothing to do with windows. The syntax of the conditions is described below, and β purely for readability β the list of conditions lives at the end of this section. π
Return Codes
All commands in this section (unless it's specifically stated otherwise for that command) also come with a return code, which can be 1 if the condition was met, or 0 if it wasn't. Some commands may return -1, which means an error happened and the return code is basically useless. π And Break returns -2.
On top of that: the return codes of commands run inside a complex function are passed along to the invoking complex function. That return code is what the TestRc command reads. Check each command's description for examples. π You can also grab the return code through the variable $[cond.rc].
Non conditional commands do not modify the return code of the last conditional command. π
Important note: return codes are only defined inside functions created with theAddToFunccommand, and they are not inherited by sub functions. If you want to run a command without touching the return code, use theKeepRccommand. π«Ά
The Ring of Windows
Fvwm keeps its windows in a ring internally. Think of the focused window as a cursor sitting on the current position in that ring. π The Next command β and a whole bunch of other commands β searches forwards through the ring looking for a matching window, while Prev searches backwards.
The windows in the ring are either ordered by creation time (that's when the !FPSortWindowlistByFocus, NeverFocus or MouseFocus styles are in play) or by the last time they had the focus. π¦
List of Conditional Commands
All [options] [(conditions)] command
Execute command on all windows that meet the conditions. Returns 1 if any window matches the condition and 0 otherwise. The execution starts at the top of the window ring and continues towards the bottom. π₯
options can be any combination of Reverse and UseStack. Give Reverse and the execution order flips around. Give UseStack and All walks through windows using the stacking order instead of the window ring. See the Conditions section for a list of conditions.
This command implies the conditions CirculateHit, CirculateHitIcon and CirculateHitShaded. You can turn them off by specifying !CirculateHit etc. explicitly. π
Any [(conditions)] command
Performs command if any window which satisfies all the conditions exists. The command runs in the context of the root window. π See the Conditions section for a list of conditions.
Break [levels]
If the break command gets used inside a function, function execution is terminated immediately. π The rest of that function's commands are simply not processed.
Normally, all nested invocations of complex functions are left. But you can hand it an optional integer number levels to break out of that given number of nested functions and keep executing a higher level function instead. The Break command always has the return code -2. Example:
AddToFunc PickWindowRaiseAndDeiconify
+ I Pick
+ I TestRc (Error) Break
+ I Raise
+ I Iconify off
Current [(conditions)] command
Performs command on the currently focused window, but only if it satisfies all the conditions. π See the Conditions section for a list of conditions.
This command implies the conditions CirculateHit, CirculateHitIcon and CirculateHitShaded. They can be turned off by specifying !CirculateHit etc. explicitly. β¨
Direction [FromPointer] direction [(conditions)] command
Performs command (typically Focus) on a window sitting in the given direction which satisfies all the conditions.
Normally the starting point is the center of the currently focused window, or the context window the command was invoked in. If there's no such window β or if you pass the FromPointer option β the current position of the pointer becomes the starting point. π―
direction may be one of "North", "Northeast", "East", "Southeast", "South", "Southwest", "West", "Northwest" and "Center". Which window Direction picks depends on the angle and the distance between the center points of the windows β closer windows are considered a better match than ones farther away. The Center direction just selects the window closest to the starting point. πΈ
Returns -1 if an invalid direction was given. See the Conditions section for a list of conditions.
KeepRc command
Runs the command, but does not alter the return code of the previous command. π«Ά
Note:KeepRcis treated as a prefix to its command. Expansion of the command line is done as ifKeepRcwasn't there at all.
Next [(conditions)] command
Performs command (typically Focus) on the next window which satisfies all the conditions. If the command is running inside a window context, it starts looking for a matching window from there. Otherwise it starts at the focused window. π« See the Conditions section for a list of conditions.
None [(conditions)] command
Performs command if no window which satisfies all the conditions exists. The command runs in the context of the root window. Returns 1 if no window matches the conditions and 0 otherwise. π See the Conditions section for a list of conditions.
This command implies the conditions CirculateHit, CirculateHitIcon and CirculateHitShaded. They can be turned off by specifying !CirculateHit etc. explicitly. π
NoWindow command
Performs command, but removes the window context if there is any. π§Ή
This isn't really a conditional command β it's more of a prefix that's useful in menu items that should operate without a window, even when that menu is bound to window decorations. π
Pick [(conditions)] command
Pick works like Function if it's invoked in the context of a window. But if it's invoked in the root window, it first asks the user to pick a window, and then executes the command in the context of that window. π
This saves you from the annoying multiple-selection situation with complex functions. The command is executed only if the given conditions are met. Returns -1 if no window was selected. See the Conditions section for a list of conditions.
This command implies the conditions CirculateHit, CirculateHitIcon and CirculateHitShaded. They can be turned off by specifying !CirculateHit etc. explicitly. β¨
PointerWindow [(conditions)] command
Performs command if the window under the pointer satisfies all the conditions. Returns -1 if there's no window under the pointer. π±οΈ See the Conditions section for a list of conditions.
This command implies the conditions CirculateHit, CirculateHitIcon and CirculateHitShaded. They can be turned off by specifying !CirculateHit etc. explicitly. π
Prev [(conditions)] command
Performs command (typically Focus) on the previous window which satisfies all the conditions. If the command is running inside a window context, it starts looking for a matching window from there. Otherwise it starts at the focused window. π See the Conditions section for a list of conditions.
ScanForWindow [FromPointer] dir1 dir2 [(conditions)] commandβ runscommand(usuallyFocus, bestie, let's be real) on a window that's sitting in the direction you asked for and ticks every box inconditions. π
Normally we start from the center of the window that's currently focused, or the context window that invoked the command. If there's no such window β or if you pass the FromPointer option β then we start from wherever the pointer is chillin' right now. π±οΈ
dir1 can be any of "North", "NorthEast", "East", "SouthEast", "South", "SouthWest", "West", and "NorthWest".
Which window gets picked depends first on its position along the primary axis that dir1 gives you. If some windows share the exact same coordinate along that primary axis, then the secondary direction breaks the tie and orders them. dir2 can be any of the same values as dir1. If dir2 is not perfectly perpendicular to dir1, ScanForWindow just returns a failure. π«
Run it over and over with the same arguments and it's guaranteed that every window matching the conditions will eventually get found. If the focus hits the limit along the primary axis, it wraps around to the opposite side. Returns -1 if you handed it a bogus direction. See the Conditions section for the full list of conditions. β¨
Test [(test-conditions)] commandβ runscommandonly if all thetest-conditionsare satisfied, no cap. π
The test-conditions are keywords with possible arguments, taken from the list below, separated by commas or whitespace. They include: Version operator x.y.z, EnvIsSet varname, EnvMatch varname pattern, StrMatch string pattern, EdgeHasPointer direction, EdgeIsActive direction, Start, Init, Restart, Exit, Quit, ToRestart, True, False, F, R, W, X and I.
Prefix any test-condition with "!" and it gets negated. π
The Version operator x.y.z test-condition is fulfilled when the logical condition of the expression is true. Valid operator values are: >=, >, <=, <, == and !=.
Example:
Test (Version >= 2.5.11) Echo 2.5.11 or later.
The EnvIsSet varname test-condition is true if that environment variable is set. The EnvMatch varname pattern test-condition is true if pattern matches the given environment or infostore variable value (peep InfoStoreAdd). The pattern may contain the special "*" and "?" chars. And heads up: "varname" is written without the leading dollar sign ($). πΈ
The StrMatch string pattern tests whether the given string matches the given pattern β a case sensitive string that may contain the special "*" and "?" characters as wild cards. You can use this in place of EnvMatch with different syntax, and it also lets you test whether other variable expansions equal a certain value. For example, to test if the current monitor's name is "DP-2" use:
Test (StrMatch $[monitor.current] DP-2) Echo True
# StrMatch and EnvMatch have different syntaxes:
Test (EnvMatch HOME /home/username) ...
Test (StrMatch $[HOME] /home/username) ...
The EdgeHasPointer [direction] test-condition is true if the edge in the given direction currently contains the pointer. The EdgeIsActive [direction] test-condition is true if the edge in the given direction currently is active. An edge is active β and can contain a pointer β if either a command is bound to it or edge scroll is available in that direction. The direction may be one of Any, North, Top, Up, West, Left, South, Bottom, Down, Right and East. If no direction is specified, Any is assumed. π§
The Start test-condition is the same as either Init or Restart. It's only true on startup or restart, prior to and during StartFunction execution. The Exit test-condition is the same as either Quit or ToRestart. It's only valid on shutdown, during ExitFunction function execution. π
The True and False test-conditions are, shockingly, unconditionally true and false. π
Also, ngl, if a test-condition name isn't recognized, the Error return code gets set and the command does not run.
The F file, R file, W file, X file and I file test-conditions test for existence of the given [F]ile (possibly with [R]ead / [W]rite permissions), e[X]ecutable (in $PATH), or the [I]mage (in ImagePath). ποΈ
Example:
AddToFunc StartFunction I Test (Init) Exec exec xterm
AddToFunc VerifyVersion
+ I Test (Version 2.5.*) Echo 2.5.x detected
+ I TestRc (NoMatch) \
Test (!Version 2.6.*) Echo Future version
+ I TestRc (NoMatch) \
Echo 2.6.x is detected
Test (F $[FVWM_USERDIR]/local-config) Read local-config
Test (X xterm-utf16) Exec exec xterm-utf16
TestRc [([!]returncode)] commandβ runscommandif the last conditional command returned the valuereturncode. π
Instead of the numeric values 0 (no match), 1 (match), -1 (error), and -2 (break), you can use the symbolic names "NoMatch", "Match", "Error" and "Break". If no returncode is given, the default 0 is assumed. If the return code is prefixed with '!', the command is executed if returncode does not match the value returned by the conditional command.
The TestRc command can only be used inside functions. If the command is another conditional command, the previous return code gets replaced by the new one. π
Example:
AddToFunc ToggleXterm
+ I All (my_xtermwindow) Close
+ I TestRc (NoMatch) Exec xterm -T my_xtermwindow
ThisWindow [(conditions)] commandβThisWindowexecutes the specified command in the context of the current operand window. If there's no operand window (i.e. it was invoked in the root window), the command is just ignored.ThisWindowis never interactive. The command only runs if the givenconditionsare met. It returns-1if you use it outside a window context. See the Conditions section for the full list. πͺ
This command implies the conditions CirculateHit, CirculateHitIcon and CirculateHitShaded. You can turn those off by specifying "!CirculateHit" etc. explicitly.
WindowId [id] [(conditions)] | [root] commandβ theWindowIdcommand hunts down a specific window id and runs the specified command on it. The second form of the syntax retrieves the window id of the root window. π
The window indicated by id may belong to a window that is not managed by fvwm. Although most commands can't operate on such windows, there are some exceptions β for example the WarpToWindow command. Returns -1 if no window with the given id exists. See the Conditions section for the full list of conditions.
This command implies the conditions CirculateHit, CirculateHitIcon and CirculateHitShaded. They can be turned off by specifying !CirculateHit etc. explicitly.
Examples:
WindowId 0x34567890 Raise
WindowId root 1 WarpToWindow 50 50
WindowId $0 (Silly_Popup) Delete
Back in the day this command was mostly useful for functions used with the WindowList command, or for selective processing of FvwmEvent calls (like in the last example above). But currently these handler functions are called within a window context, so this command isn't really needed in those cases anymore. Still, it may be useful if, for example, the window id should be stored in an environment variable for further proceedings. π«Ά
Pick SetEnv BOOKMARKED_WINDOW $[w.id]
WindowId $[BOOKMARKED_WINDOW] WarpToWindow
π¦ CONDITIONS π¦
The conditions that may be given as an argument to any conditional command are a list of keywords separated by commas, enclosed in parentheses. Unless stated otherwise, conditional commands accept all the conditions listed below. π
Not me reminding you that earlier versions of fvwm required the conditions to be separated by whitespace instead of commas and enclosed in brackets instead of parentheses. That's still supported for backward compatibility, bestie. π
In addition, the conditions may include one or more window names to match against. If more than one window name is given, all of them must match. The window name, icon name, class, and resource are all considered when attempting to find a match. Each name may include the wildcards '*' and '?', and may consist of two or more alternatives separated by the character '|', which acts as an OR operator. (If OR operators are used, they must not be separated by spaces from the names.) πΈ
Each window name can begin with '!', which prevents the command if any of the window name, icon name, class or resource match. However β careful now β '!' must not be applied to individual names in a group separated by OR operators. It may only be applied to the beginning of the group, and then it operates on the whole group. π¨
Examples:
Next ("Netscape|konqueror|Mozilla*") WarpToWindow 99 90
This goes to the next web browser window, no matter which of the three named web browsers is being used. π
Next ("Mozilla*", "Bookmark*") WarpToWindow 99 90
This goes to Mozilla's bookmark manager window, ignoring other Mozilla windows and other browsers' bookmark windows. π
All ("XTerm|rxvt", !console) Iconify
This iconifies all the xterm and rxvt windows on the current page, except that the one named "console" (with the -name option to xterm) is excluded. π
Next (!"FvwmPager|FvwmForm*|FvwmButtons") Raise
Next (!FvwmPager, !FvwmForm*, !FvwmButtons) Raise
These two commands are equivalent; either one raises the next window which is not one of the named fvwm modules. π
Any condition can be negated by using an exclamation mark ('!') directly in front of its name. β¨
AcceptsFocus,AnyScreen,CirculateHit,CirculateHitIcon,CirculateHitShaded,Closable,CurrentDesk,CurrentGlobalPage,CurrentGlobalPageAnyDesk,CurrentPage,CurrentPageAnyDesk,CurrentScreen,Desk,FixedPosition,FixedSize,Focused,HasBorders,HasHandles,HasPointer,HasTitle,TitleAtTop,TitleAtBottom,TitleAtLeft,TitleAtRight,Iconic,Iconifiable,Layer [n],Maximizable,Maximized,Overlapped,PlacedByButton n,PlacedByButton3,PlacedByFvwm,Raised,Shaded,State n,Sticky,StickyAcrossDesks,StickyAcrossPages,StickyIcon,StickyAcrossDesksIcon,StickyAcrossPagesIcon,Transient,Visible.
Ok bestie, lemme walk you through what each of these little vibe-checks actually means π
The AcceptsFocus condition excludes all windows that do not want the input focus (the application has set the "Input hints" for the window to False) and do not use the Lenience option of the Style command. Also, all windows using the NeverFocus style are ignored. Note: !Lenience is equivalent to the deprecated option NoLenience.
When you use the AnyScreen condition together with any of the Current... conditions, windows that do not intersect the screen containing the mouse pointer are considered for a match too. Like, for real:
# Focus next window on current page,
# regardless of screen
Next (CurrentPage, AnyScreen) Focus
The CirculateHit and CirculateHitIcon options override the CirculateSkip and CirculateSkipIcon Style attributes for normal or iconic windows. The CirculateHitShaded option overrides the CirculateSkipShaded Style. All three options are turned on by default for the Current command. They can be turned off by specifying !CirculateHit etc. explicitly. Note: do not confuse these conditions with the style options of the same name. Specifically,
Style foo CirculateSkip
Next (foo, CirculateHit) ...
is not the same as
Style foo CirculateHit ...
Next (foo)
The prior selects windows with the name foo only in the Next command. In the second example, these windows are always matched in all conditional commands. π
The Closable condition matches only windows that are allowed to be closed.
The CurrentDesk condition matches only windows that are on the current desk.
The CurrentGlobalPage condition matches only windows that are on the current page of the current desk, regardless of which screen the window is on. This condition implicitly activates the CurrentDesk condition.
The CurrentGlobalPageAnyDesk condition matches only windows that are on the current page of any desk, regardless of RandR screen .
The CurrentPage condition matches only windows that are on the current page of the current desk. This condition implicitly activates the CurrentDesk condition.
The CurrentPageAnyDesk and CurrentScreen conditions matches only windows that are on the current page of any desk.
The Screen [name] condition matches only windows which are on the specified screen.
The Desk [n] condition matches only windows which are on the specified desk.
The FixedPosition condition excludes all windows that do not have a fixed position, either set through WM hints or the Style option FixedPosition. Example, bc examples slay:
DestroyFunc ToggleFixedGeometry
AddToFunc ToggleFixedGeometry
+ I Pick (FixedPosition) \
WindowStyle VariablePosition, VariableSize
+ I TestRc (NoMatch) WindowStyle FixedPosition, FixedSize
The FixedSize condition excludes all windows that do not have a fixed size, either set through WM hints or the Style option FixedSize.
The Focused matches on the window that currently has the keyboard focus. This is not useful for the Current command but can be used with the other conditional commands.
The HasBorders condition excludes all windows that do not have borders.
The HasHandles condition excludes all windows that do not have resize handles.
The HasPointer condition excludes all windows that do not contain the pointer.
The HasTitle condition excludes all windows that do not have a titlebar.
The TitleAtTop, TitleAtBottom, TitleAtLeft, TitleAtRight conditions test for the titlebar at that window location.
The Iconic condition matches only iconic windows.
The Iconifiable condition matches only windows that are allowed to be iconified.
The Layer [n] condition matches only windows on the specified layer. The optional argument of the Layer condition defaults to the layer of the focused window. The negation !Layer switches off the Layer condition.
The Maximizable condition matches only windows that are allowed to be maximized.
The Maximized condition matches only maximized windows.
The Overlapped condition matches only windows that are overlapped by other windows on the same layer (or unmanaged windows if the option RaiseOverUnmanaged of the BugOpts command is used). Note that this condition can be slow if you have many windows or if RaiseOverUnmanaged is used and the connection to the X server is slow. π
The PlacedByButton n condition is fulfilled if the last interactive motion of the window (with the Move command or as ManualPlacement) was ended by pressing mouse button n. Example:
Mouse 1 T A Function MoveWindow
DestroyFunc MoveWindow
AddToFunc MoveWindow
+ C Move
+ C ThisWindow (PlacedByButton 5) WindowShade off
+ C TestRc (Match) Maximize on 0 100
+ C ThisWindow (PlacedByButton 4) WindowShade on
The PlacedByButton3 condition has the same meaning as PlacedByButton 3. It remains only for backward compatibility.
The PlacedByFvwm condition excludes all windows that have been placed manually or by using the user or program position hint.
The Raised conditions matches only windows that are fully visible on the current viewport and not overlapped by any other window.
The Shaded conditions matches only shaded windows (see WindowShade command).
The State n or !State n conditions match only windows with the specified integer state set (or unset). See the State command for details. The argument may range from 0 to 31.
The Sticky, StickyAcrossDesks and StickyAcrossPages match only windows that are currently sticky, sticky across all desks or sticky across all pages. Please refer to the Style options with the same name and the commands Stick, StickAcrossDesks and StickAcrossPages for details.
The StickyIcon, StickyAcrossDesksIcon and StickyAcrossPagesIcon match only windows that become sticky, sticky across all desks or sticky across all pages when they are in iconified state.
The Transient condition matches only windows that have the "transient" property set by the application. This it usually the case for application popup menus and dialogs. The FvwmIdent module can be used to find out whether a specific window is transient. π
The Visible condition matches only windows that are at least partially visible on the current viewport and not completely overlapped by other windows.
β¨ Module Commands β¨
Fvwm maintains a database of module configuration lines in a form
*<ModuleName>: <Config-Resource>
where <ModuleName> is either a real module name or an alias.
This database is initially filled from config file (or from output of -cmd config command), and can be later modified either by user (via FvwmCommand) or by modules.
When modules are run, they read appropriate portion of database. (The concept of this database is similar to one used in X resource database). πΎ
Commands for manipulating module configuration database are described below.
* module_config_line
Defines a module configuration. module_config_line consists of a module name (or a module alias) and a module resource line. The new syntax allows a delimiter, a colon and optional spaces, between the module name and the rest of the line, this is recommended to avoid conflicts.
*FvwmPager: WindowBorderWidth 1
*FvwmButtons-TopRight: Geometry 100x100-0+0
*FvwmButtons-Bottom: Geometry +0-0
DestroyModuleConfig module_config
Deletes module configuration entries, so that new configuration lines may be entered instead. This also sometimes the only way to turn back some module settings, previously defined. This changes the way a module runs during a fvwm session without restarting. Wildcards can be used for portions of the name as well. ποΈ
The new non-conflicting syntax allows a delimiter, a colon and optional spaces between the module name and the rest of the line. In this case a module name (or alias) canβt have wildcards.
DestroyModuleConfig FvwmButtons*
DestroyModuleConfig FvwmForm: Fore
DestroyModuleConfig FvwmIconMan: Tips*
KillModule modulename [modulealias]
Causes the module which was invoked with name modulename to be killed. The name may include wildcards. If modulealias is given, only modules started with the given alias are killed.
# kill all pagers
KillModule FvwmPager
Module FvwmEvent SoundEvent
KillModule FvwmEvent SoundEvent
Module modulename [moduleparams]
Specifies a module with its optional parameters which should be spawned. Currently several modules, including FvwmButtons, FvwmEvent, FvwmForm, FvwmPager, FvwmScript support aliases. Aliases are useful if more than one instance of the module should be spawned. Aliases may be configured separately using * syntax. To start a module FvwmForm using an alias MyForm, the following syntax may be used:
Module FvwmForm MyForm
So yeah β here's the module roster, bestie. At the current time the available modules (included with fvwm) are:
- FvwmAnimate (produces animation effects when a window is iconified or de-iconified)
- FvwmAuto (an auto raise module)
- FvwmBacker (to change the background when you change desktops)
- FvwmBanner (to display a spiffy XBM, XPM, PNG or SVG)
- FvwmButtons (brings up a customizable tool bar)
- FvwmPrompt (to execute fvwm commands directly)
- FvwmEvent (trigger various actions by events)
- FvwmForm (to bring up dialogs)
- FvwmIconMan (a flexible icon manager)
- FvwmIdent (to get window info)
- FvwmPager (a mini version of the desktop)
- FvwmPerl (a Perl manipulator and preprocessor)
- FvwmProxy (to locate and control obscured windows by using small proxy windows)
- FvwmRearrange (to rearrange windows)
- FvwmScript (another powerful dialog toolkit)
These modules have their own man pages. And honestly there may be other modules out there as well, the ecosystem is thriving. π¦
Modules can be short lived transient programs or, like FvwmButtons , can remain for the duration of the X session. Modules are terminated by the window manager prior to restarts and quits, if possible. See the introductory section on modules. The keyword Module may be omitted if modulename is distinct from all fvwm commands.
ModuleListenOnlymodulename [moduleparams] β works exactly like the Module command, except fvwm never sends any messages to the module. Why would you want that? Because it's lowkey perfect for writing a module as a shell script that gets triggered by external events without the burden of answering packets sent by fvwm. For example, a module written as a shell script may change labels of the FvwmButtons module to implement a simple clock. β°πModulePathpath β specifies a colon separated list of directories in which to search for modules. To find a module, fvwm searches each directory in turn and uses the first file found. Directory names on the list do not need trailing slashes. π
The ModulePath may contain environment variables such as $HOME (or ${HOME}). Further, a + in the path is expanded to the previous value of the path, allowing easy appending or prepending to the path.
For example:
ModulePath ${HOME}/lib/fvwm/modules:+
The directory containing the standard modules is available via the environment variable $FVWM_MODULEDIR.
ModuleSynchronous[Expect string] [Timeout secs] modulename β very similar to Module, but with commitment issues in the other direction: fvwm stops processing any commands and user input until the module sends a string beginning with"NOP FINISHED STARTUP"back to fvwm. If the optional Timeout is given fvwm gives up if the module sent no input back to fvwm for secs seconds. If the Expect option is given, fvwm waits for the given string instead. ModuleSynchronous should only be used during fvwm startup to enforce the order in which modules are started. This command is intended for use with the (currently hypothetical) module that should be in place before other modules are started.
Warning: It is quite easy to hang fvwm with this command, even if a timeout is given. Be extra careful choosing the string to wait for. Although all modules in the fvwm distribution send back the "NOP FINISHED STARTUP" string once they have properly started up, this may not be the case for third party modules. Moreover, you can try to escape from a locked ModuleSynchronous command by using the key sequence
(see the EscapeFunc).
ModuleTimeouttimeout β specifies how many seconds fvwm waits for a module to respond. If the module does not respond within the time limit then fvwm kills it. π timeout must be greater than zero, or it is reset to the default value of 30 seconds.SendToModulemodulename string β sends an arbitrary string (no quotes required) to all modules, whose alias or name matching modulename, which may contain wildcards. This only makes sense if the module is set up to understand and deal with these strings though. Can be used for module to module communication, or implementation of more complex commands in modules. β¨
π Session Management Commands π
Quitβ exits fvwm, generally causing X to exit too. It's giving closing time, babes. πͺRestart[window_manager [params]] β causes fvwm to restart itself if window_manager is left blank, or to switch to an alternate window manager (or other fvwm version) if window_manager is specified. If the window manager is not in your default search path, then you should use the full path name for window_manager. π
This command should not have a trailing ampersand. The command can have optional parameters with simple shell-like syntax. You can use ~ (is expanded to the user's home directory) and environmental variables $VAR or ${VAR}. Here are several examples:
Key F1 R N Restart
Key F1 R N Restart fvwm1 -f .fvwmrc
Key F1 R N Restart xterm -n '"X console"' -T \"X\ console\" -e fvwm
Note, currently with multi headed displays, restart of fvwms on different screens works independently. π
Restart --pass-argswindow_manager β the same as Restart without parameters but the name for the current window manager is replaced with the specified window_manager and original arguments are preserved. π«ΆRestart --dont-preserve-state[other-params] β the same as
Restart [other-params]
but it does not save any window states over the restart.
Without this option, Restart preserves most per-window state by writing it to a file named .fs-restart-$HOSTDISPLAY in the user's home directory.
SaveSessionβ causes a session manager (if any) to save the session. This command does not work forxsm, it seems thatxsmdoes not implement this functionality. Use Unix signals to managexsmremotely. π‘SaveQuitSessionβ causes a session manager (if any) to save and then shutdown the session. This command does not work forxsm, it seems thatxsmdoes not implement this functionality. Use Unix signals to managexsmremotely. β¨
π¨ Colorsets π¨
Colorsets are a powerful method to control colors. Colorsets create appearance resources that are shared by fvwm and its modules. When a colorset is modified all parts of fvwm react to that change. A colorset includes a foreground color, background color, shadow and highlight color (often based on the background color), background face (this includes images and all kinds of gradients). There is a way to render background face and specify other color operations. π
Colorsetnum [options] β creates or modifies colorset num. Colorsets are identified by this number. The number can start at zero and can be a very large number. π’
Warning: The highest colorset number used determines memory consumption. Thus, if you define 'Colorset 100000', the memory for 100001 colorsets is used. Keep your colorset numbers as small as possible. Like, actually small. π
By convention, colorsets are numbered like this:
# 0 = Default colors
# 1 = Inactive windows
# 2 = Active windows
# 3 = Inactive menu entry and menu background
# 4 = Active menu entry
# 5 = greyed out menu entry (only bg used)
# 6 = module foreground and background
# 7 = hilight colors
If you need to have more colors and do not want to reinvent the wheel, you may use the convention used in fvwm-themes, it defines the meaning of the first 40 colorsets for nearly all purposes:
http://fvwm-themes.sourceforge.net/doc/colorsets
Each colorset has four colors, an optional pixmap and an optional shape mask. The four colors are used by modules as the foreground, background, highlight and shadow colors. When a colorset is created it defaults to a foreground of black and background of gray. The background and foreground are marked as "average" and "contrast" (see later) so that just specifying a pixmap or gradient gives sensible results. π
options is a comma separated list containing some of the keywords: fg, Fore, Foreground, bg, Back, Background, hi, Hilite, Hilight, sh, Shade, Shadow, fgsh, Pixmap, TiledPixmap, AspectPixmap, Transparent, RootTransparent, Shape, TiledShape, AspectShape, NoShape, ?Gradient, Tint, fgTint, bgTint, Alpha, fgAlpha, Dither, NoDither, IconTint, IconAlpha, Plain.
fg,ForeandForegroundβ take a color name as an argument and set the foreground color. The special nameContrastmay be used to select a color that contrasts well with the background color. To reset the foreground color to the default value you can simply omit the color name. ποΈbg,BackandBackgroundβ take a color name as an argument and set the background color. It also sets the highlight and shadow colors to values that give a 3d effect unless these have been explicitly set with the options below. The special nameAveragemay be used to select a color that is the average color of the pixmap. If the pixmap is tinted with the Tint option, the tint is not taken in account in the computation of the average color. You should use the bgTint option to get the"real"average color. The background color is reset to the default value if the color name is omitted. πhi,HiliteandHilightβ take a color name as an argument and set the highlight color. If the highlight color is not explicitly set, the default is to calculate it from the background color. To switch back to the default behavior the color name can be omitted. β¨sh,ShadeandShadowβ take a color name as an argument and set the shadow color. If the shadow color is not explicitly set, the default is to calculate it from the background color. To switch back to the default behavior the color name can be omitted. πfgshβ takes a color name as an argument and sets the color used by the shadowing font effect. See the Font Shadow Effects section of the fvwm man page. By default this color is computed from the foreground and background colors. To switch back to the default the color name can be omitted. π
Pixmap, TiledPixmap and AspectPixmap all take a file name as their argument, go hunting through the ImagePath for it, and use it as the background pixmap. Any transparent bits get filled in with the background color. And if you don't give a file name at all? It just removes whatever image was chilling in that colorset before. β¨
TiledPixmapβ makes repeated copies of the image, no scaling, just vibes repeated forever π¦Pixmapβ stretches the image to fit whatever object the colorset is applied to (it will commit to the bit, aspect ratio be damned)AspectPixmapβ also stretches to fit, but keeps the image aspect ratio, because it has taste π
Transparent creates a transparent background pixmap. That pixmap gets used as a window background so you can achieve root transparency. For this you should use the ParentalRelativity option to the Style command. A subsequent root background change may be detected or may not, and honestly bestie, it depends entirely on the program used to set the background.
If you use fvwm-root, xsetbg (xli), FvwmBacker with solid or colorset colors, or a recent version of Esetroot (>= 9.2), a background change is detected. If background changes are not detected (like, say, if you use xv or xsetroot), you can force detection by using the -d option of fvwm-root:
xv -root -quit mybg.png; fvwm-root -d
β οΈ Okay so listen. Due to the way X implements transparency, no guarantees can be made that the desired effect can actually be achieved. The application may even crash. If you experience any problems with this option, do not use it. Periodt. π
Using outline move and resize (see the OpaqueMoveSize command and the ResizeOpaque Style option) as well as setting the WindowShadeShrinks style may help. The transparency achieved with Transparent depends on whether the colorset is applied to the foreground or the background of a window. In the second case the transparency is relative to the parent window of the window on which the colorset is defined. For example:
Colorset 12 VGradient 200 grey30 grey60
Colorset 17 Transparent
*FvwmIconMan: Colorset 12
*FvwmIconMan: PlainColorset 17
gives an IconMan with a vertical grey gradient background, and the buttons use the background (by transparency). To obtain a (root) transparent IconMan:
Colorset 12 Transparent
Colorset 17 Transparent
Colorset 18 Transparent
Colorset 19 Transparent
*FvwmIconMan: Colorset 12
*FvwmIconMan: PlainColorset 17
*FvwmIconMan: FocusColorset 18
*FvwmIconMan: IconColorset 19
The Colorset IconMan option defines the IconMan window background, but the PlainColorset and the FocusColorset are drawn on the foreground. So, the transparency of the IconMan buttons is achieved by drawing nothing. π«Ά
Now if this IconMan is swallowed in an FvwmButtons as:
FvwmButtons:(Colorset 10, Swallow "FvwmIconMan" 'FvwmIconMan')
then FvwmIconMan becomes a child of FvwmButtons and it is transparent relative to FvwmButtons. So in this case FvwmIconMan uses Colorset 10 as background. If you want root transparency use the RootTransparent option.
FvwmButtons, FvwmIconMan and FvwmIdent are relatively simple β there's one main colorset option which defines the background of the window, and the other colorsets (if any) are drawn on the foreground. The case of FvwmProxy is simpler: the two colorsets refer to the window backgrounds. FvwmPager is more complicated, as almost everything in the pager is windows with some parental relations (the mini windows are the child, the desktops are the parents, and all this is complicated by the hilighted page). So, the colorsets apply to the background of these windows. You should experiment. π§ͺ
For FvwmForm and FvwmScript the situation is similar. There is a main window (a child of the root window) which corresponds to the main colorset, and most of the widgets are windows which are children of the main window. Tint may work or not with the Transparent option. When the colorset is drawn on the foreground, Tint should work. In some cases, tinting may be very slow. Tinting may work with fvwm menu (without animation). Tinting may work better if your X server has backing store enabled (try xdpyinfo to see if this is the case). There is a chance that the backing store support of your X server does not work well with the terrible hack used to Tint the ParentRelative Pixmap. So, to get tinted root transparency it is more safe to use the RootTransparent option.
RootTransparent [ buffer ] creates a root transparent background. To make this option work, you must use an Esetroot compatible program, fvwm-root with the --retain-pixmap option, or FvwmBacker with the RetainPixmap option (and colorset or solid backgrounds). The buffer keyword is useful only when the Tint option is used too. This speeds up creation of windows which use the colorset (useful for fvwm menus) at the cost of memory usage. It also speeds up opaque move and resize, which can be unacceptably slow without buffer. However, this option may add a lot of memory to your X server (depending on the size of the image used to set the background). In summary: using outline move and resize for modules which use such a colorset may be a good idea. π
Shape, TiledShape and AspectShape take a file name as an argument, search the ImagePath, and use it as the shape bitmap. TiledShape produces repeated copies of the bitmap with no scaling, Shape causes the bitmap to be stretched to fit whatever object the colorset is applied to, and AspectShape stretches to fit but retains the bitmap aspect ratio. If the file is a pixmap in xpm format, the shape mask (all opaque pixels) of the pixmap is used. For png and svg images, the shape mask is equivalent to all not completely transparent pixels (alpha > 0).
β οΈ Warning β Due to the way X11 implements shapes you cannot take back making windows shaped. You may have to restart fvwm or the shaped application. No takebacks, bestie. π
?Gradient ... creates a pixmap and stretches it to fit the window. ?Gradient may be one of HGradient, VGradient, DGradient, BGradient, SGradient, CGradient, RGradient or YGradient. The gradient types are as follows:
Hβ horizontalVβ verticalDβ diagonal from top left to bottom rightBβ a backwards diagonal from bottom left to top rightSβ concentric squaresCβ concentric circlesRβ a radar like patternYβ a Yin Yang style (but without the dots)
Please refer to the Color Gradients section for the syntax of gradients.
Tint takes 2 arguments β a color and a percentage between 0 and 100. It causes the image defined using ?Pixmap or ?Gradient to be tinted with the specified color using the percentage. If the image is transparent, Tint tints only the image part. Unfortunately, a colorset background specified using the Transparent option can give strange results. See the Transparent option for details. With no arguments this option removes the tint.
fgTint takes 2 arguments β a color and a percentage between 0 and 100. It causes the color defined using fg to be tinted with the specified color using the percentage. With no arguments this option removes the tint.
bgTint takes 2 arguments β a color and a percentage between 0 and 100. It causes the color defined using bg to be tinted with the specified color using the percentage. If the sh and hi colors are not specified, they are recomputed from the tinted bg color. With no arguments this option removes the tint.
Alpha takes a percentage between 0 and 100 as an argument. It causes fvwm to merge the image defined using ?Pixmap or ?Gradient with the bg color using the percentage. If the percentage is 0 the image is hidden, and if it is 100 the image is displayed as usual (no merge). The default is 100, and it is restored if no argument is given.
fgAlpha takes a percentage between 0 and 100 as an argument. It causes fvwm to merge the text and the colorset background using the percentage. If the percentage is 0 the text is hidden, and if it is 100 the text is displayed as usual (no merge). This option has an effect only with fonts loaded by Xft β see the Font Names and Font Loading section. The default is 100, and it is restored if no argument is given.
Dither causes fvwm to dither the image defined using ?Pixmap or ?Gradient. This is useful only with displays with depth less than or equal to 16 (i.e., on displays which can only display less than 65537 colors at once). The dithering effect lets you simulate having more colors available than you actually have. β¨
NoDither causes fvwm to not dither the images. Dither is the default if the depth is less than or equal to 8 (a screen with 256 colors or less). In depth 15 (32768 colors) and 16 (65536 colors), the default is NoDither β however, this effect can be useful with images which contain a lot of close colors. For example a fine gradient looks more smooth.
IconTint takes 2 arguments β a color and a percentage between 0 and 100. It causes fvwm or a module to tint the "icons" which are rendered into the colorset background with the specified color using a percentage. Here "icons" means: fvwm Icons, fvwm menu icons, MiniIcons which represent applications in various modules, images loaded by modules (e.g., images specified by the Icon FvwmButtons button option) ...etc. With no arguments this option removes the icon tint.
IconAlpha takes a percentage between 0 and 100 as an argument. It causes fvwm to merge the "icons" which are rendered into the colorset background using this percentage. The default is 100, and it is restored if no argument is given.
π‘ Note: It is equivalent to useTint a_color rateandAlpha aifa= 100 and thebgcolor isa_color. This equivalence does not hold forIconAlphaandIconTint, as the background can be an image or a gradient (and not a uniform color background). However, in some cases you can achieve (almost) the same effect by usingIconTintin the place ofIconAlpha. This is preferable as, in general,IconAlphagenerates more redrawing thanIconTint. π₯
NoShape removes the shape mask from the colorset, while Plain removes the background pixmap or gradient.
πΈ Examples πΈ
Colorset 3 fg tan, bg navy
If necessary this creates colorsets 0, 1, 2 and 3, and then changes colorset 3 to have a foreground of tan, a background of navy. Slay. π
Colorset 3 bg "navy blue"
Colorset(continued) β okay so this next one:
Colorset 3 bg navy
changes the background color of colorset 3 to navy blue. The foreground and pixmap are unchanged. π
Colorset 3 AspectPixmap large_murky_dungeon.xpm
causes depression. (yes bestie, that's the actual vibe, the dungeon is depressing π)
Colorset 3 bg Average
Sets the background color and the relief colors to match the background pixmap. This is the default setting, but it must be used if a background color was specified and is now not required. periodt.
Colorset 3 YGradient 200 3 blue 1000 navy 1 blue 1000 navy
Adds a Yin Yang gradient background pixmap to colorset 3. If the background is set to average it is recomputed along with the foreground if that is set to contrast. β¨
#!/bin/sh
FvwmCommand "Colorset 7 fg navy, bg gray"
while true
do
FvwmCommand "Colorset 7 fg gray"
sleep 1
FvwmCommand "Colorset 7 fg navy"
sleep 1
done
Makes colorset 7 blink. iconic honestly.
The color names used in colorsets are saved as fvwm variables which can be substituted in any fvwm command. For example:
AddToFunc InitFunction
+ I Exec exec xterm -fg $[fg.cs0] -bg $[bg.cs0]
Where $[fg.cs0] is the foreground color of colorset zero. Please refer to the Command Expansion section for more information. π«Ά
π
CleanupColorsets
Resets a definition of all colorsets. that's it, that's the whole thing, she's a simple girlie π§Ήβ¨
π Color Gradients π
A color gradient is a background that changes its color gradually from one hue to a different one. Color gradients can be used by various commands and modules of fvwm. There are eight types of gradients: HGradient is a horizontal gradient, VGradient is vertical, DGradient is diagonal from top left to bottom right, BGradient is backwards diagonal from bottom left to top right, SGradient is concentric squares, CGradient is concentric circles, RGradient is a radar like pattern and YGradient is a Yin Yang style (but without the dots). π
The color gradient syntax has two forms:
?Gradient colors start-color end-color
This form specifies a linear gradient. The arguments denote the total number of colors to allocate (between 2 and 1000), the initial color and the final color.
Example:
TitleStyle VGradient 20 rgb:b8/ce/bc rgb:5b/85/d0
?Gradient colors segments color length color [length color] ...
The second form specifies a nonlinear gradient. The arguments are: the total number of colors to allocate (between 2 and 1000), then the number of segments. For each segment, specify the starting color, a relative length, then the ending color. Each subsequent segment begins with the second color of the last segment. The lengths may be any non-negative integers. The length of one segment divided by the sum of all segments lengths is the fraction of the colors that are used for the segment.
Examples:
Colorset 0 DGradient 128 2 lightgrey 50 blue 50 white
# 20% gradient from red to blue,
# 30% from blue to black,
# 50% from black to grey
Colorset 0 DGradient 100 3 Red 20 Blue 30 Black 50 Grey
# 50% from blue to green, then
# 50% from yellow to red
Colorset 0 HGradient 128 3 Blue 1000 Green 1 Yellow 1000 Red
β οΈ Note: Some gradient styles may be slow and consume huge amounts of memory, so if you encounter performance problems with them you may be better off by not using them. π
To improve performance you can try one or all of the following:
- Turn hilighting of the active menu item other than foreground color off:
MenuStyle <style> Hilight3DOff, !HilightBack
- Make sure sub menus do not overlap the parent menu. This can prevent menus being redrawn every time a sub menu pops up or down.
MenuStyle <style> PopupOffset 1 100
- Run your X server with backing storage. If your X Server is started with the
-bsoption, turn it off. If not try the-wmand+bsoptions:
startx -- -wm +bs
You may have to adapt this example to your system (e.g. if you use xinit to start X).
and that's the whole page bestie!! ππ¦π this is the Fvwm 3 commands manual page, dated 2026-06-28 β go forth and configure your window manager like the main character you are. no cap, i'm obsessed. π β¨π
π¦ where this page comes from
- arch rolling: fvwm3 1.1.5-1 Β· GPL-2.0-or-later
- fedora 43: fvwm3 1.1.5-1.fc43 Β· GPL-2.0-or-later AND NTP AND MIT and BSD-2-Clause AND BSD-3-Clause
- fedora 44: fvwm3 1.1.5-1.fc44 Β· GPL-2.0-or-later AND NTP AND MIT and BSD-2-Clause AND BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms