Whenever an fvwm command line is executed, fvwm performs parameter expansion. A parameter is a ‘$’ followed
by a word enclosed in brackets ($[…]) or a single special character. If fvwm encounters an unquoted
parameter on the command line it expands it to a string indicated by the parameter name. Unknown parameters
are left untouched. Parameter expansion is performed before quoting. To get a literal ‘$’ use “$$”.
If a command is prefixed with a ‘-‘ parameter expansion isn’t performed. This applies to the command
immediately following the ‘-‘, in which the expansion normally would have taken place. When uesed together
with other prefix commands it must be added before the other prefix.
opens an xmessage dialog with “$[w.name]” unexpanded.
The longer variables may contain additional variables inside the name, which are expanded before the outer
In earlier versions of fvwm, some single letter variables were supported. It is deprecated now, since they
cause a number of problems. You should use the longer substitutes instead.
# and the window’s class (unexpanded here, no window).
Echo $[desk.n] $[page.nx] $[w.class]
Note: If the command is called outside a window context, it prints “$[w.class]” instead of the class name.
It is usually not enough to have the pointer over a window to have a context window. To force using the
window with the focus, the Current command can be used:
configuration trees. If used outside of any read file, the returned value is ‘.’.
$0 to $9
AddToFunc command). “$0” is replaced with the first parameter, “$1” with the second parameter and so on.
If the corresponding parameter is undefined, the “$…” is deleted from the command line.
parameter is undefined, the “$[n]” is deleted from the command line. The parameter is expanded unquoted.
parameter m. If all the corresponding parameters are undefined, the “$[…]” is deleted from the command
line. If only some of the parameters are defined, all defined parameters are expanded, and the remaining
silently ignored. All parameters are expanded unquoted.
corresponding parameters are undefined, the “$[…]” is deleted from the command line. All parameters
are expanded unquoted.
$[vp.x] $[vp.y] $[vp.width] $[vp.height]
$[wa.x] $[wa.y] $[wa.width] $[wa.height]
$[dwa.x] $[dwa.y] $[dwa.width] $[dwa.height]
DesktopName command. If no name is defined, then the default name is returned.
or y direction.
no window is associated with the command.
$[w.name] $[w.iconname] $[w.class] $[w.resource] $[w.visiblename] $[w.iconfile] $[w.miniiconfile]
mini icon defined with the Icon or MiniIcon style (including the full path if the file was found on
disk), and (if fvwm is compiled with SVG support) the icon or mini icon svg rendering options (including
the leading colon), or unexpanded “$[w.<attribute>]” string if no window is associated with the command.
that the value is surrounded by single quote characters and any contained single quote is prefixed with a
backslash. This guarantees that commands like:
shown in the titlebar. Typically this will be the same as $[w.name] once expanded, although in the case
of using IndexedWindowName then this is more useful a distinction, and allows for referencing the
specific window by its visible name for inclusion in things like Style commands.
$[w.x] $[w.y] $[w.width] $[w.height]
associated with the command or the window is iconified, the string is left as is.
$[cw.x] $[cw.y] $[cw.width] $[cw.height]
border and title of the window is not taken into account.
$[i.x], $[it.x], $[ip.x] $[i.y], $[it.y], $[ip.y] $[i.width], $[it.width], $[ip.width] $[i.height],
the icon picture ($[ip….]).
variables are not expanded.
the window is iconified or no window is selected, these variables are not expanded.
not on the screen, the window is shaded or iconified or no window is selected, these variables are not
$[fg.cs<n>] $[bg.cs<n>] $[hilight.cs<n>] $[shadow.cs<n>]
shadow (shadow) color that is defined in colorset <n> (replace <n> with zero or a positive integer). For
example “$[fg.cs3]” is expanded to the name of the foreground color of colorset 3 (in rgb:rrrr/gggg/bbbb
form). Please refer to the Colorsets section for details about colorsets.
command was already executed.
not be used in a conditional command. Please refer to the section Conditional Commands in the command
useful for example with:
is returned as is. See the LocalePath command.
unexpanded string is returned.
this name and replaces its value if one is found (e.g. “$[PAGER]” could be replaced by “more”).
Otherwise the string is left as is.
Some examples can be found in the description of the AddToFunc command.