「FVWM」 – 杂项命令

# WindowList [(conditions)] [position] [options] [double-click-action]

创建窗口列表菜单,并弹出,其中显示当前桌面上每个窗口的Title和Geometry。

其中,“Geometry”格式为:“desk(layer):x-geometry sticky”,其中desk和layer是相应的数字,sticky是空的或大写字母“S”。图标化窗口的“Geometry”显示在括号中。从窗口列表弹出菜单中选择一个项会导致函数“WindowListFunc”的执行,并以该窗口的窗口ID作为$0传入函数。默认的“WindowListFunc”如下所示:

AddToFunc WindowListFunc
+ I Iconify off
+ I FlipFocus
+ I Raise
+ I WarpToWindow 5p 5p

如果这些默认值不适合您,您可以销毁内置的“WindowListFunc”并创建自己的默认值。

窗口列表菜单使用“WindowList”菜单样式(如果已定义),请参阅MenuStyle命令。示例:

MenuStyle WindowList SelectOnRelease Meta_L

否则使用默认菜单样式。要切换回默认菜单样式,使用命令:

DestroyMenuStyle WindowList

来移除默认的样式。

(conditions)

该参数可用于从窗口列表中排除某些窗口。有关详细信息,请参阅Current命令。

只有符合给定条件的窗口才会显示在窗口列表中。下面的options反之亦然:可以选择窗口列表中不包含的窗口。conditions总是覆盖options。

position

该参数与Menu中的相同。

options

传递给WindowList的选项,使用用逗号分隔,可以是:

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

选项Normal表示不是标志性的、不是粘性的、不是在顶部。

使用SortByResource选项,窗口将根据资源类按字母顺序排序,然后按资源名称排序,然后按窗口名称排序(如果指定了UseIconName,则还会按图标名称排序)。选项ReverseOrder也以预期的方式工作。

使用SortByClass选项,窗口的排序方式与SortByResource类似,但不考虑资源名称,只会考虑资源类。

选项SelectOnRelease与在MenuStyle中的SelectOnRelease选项完全相同,但会覆盖菜单样式中给出的选项。 默认情况下,此选项设置为左Alt键(Meta_L)。要将其关闭,请使用不带键名的SelectOnRelease。

如果通过Function funcname传入函数,则会在所选窗口的窗口上下文中调用它:

AddToFunc IFunc I Iconify toggle
WindowList Function IFunc, NoSticky, CurrentDesk, NoIcons

如果使用Layer m [n]选项,则仅显示“m”和“n”之间的层中的窗口。“n”的默认为“m”。使用ReverseOrder选项,列表中窗口的顺序相反。

使用CurrentAtEnd选项,当前的焦点窗口(如果有)显示在列表的底部。 这主要用于模拟另一个GUI中的Alt-Tab行为。

选项IconifiedAtEnd使图标化窗口移动到列表的末尾。这也来自另一个GUI。

选项NoGeometry导致fvwm不显示Geometry以及指示不同桌面的分隔符。NoGeometryWithInfo删除Geometry,但保留桌面信息并指示标志性窗口。NoDeskNum导致fvwm不使用NoGeometryWithInfo选项在Geometry中或窗口标题之前显示桌面编号。 NoNumInDeskTitle仅在使用DesktopName命令定义桌面名称时才有用,它导致fvwm不显示桌面名称之前的桌面编号。默认情况下,如果使用Desk条件,则WindowList菜单具有指示当前桌面或所选桌面的标题。 NoCurrentDeskTitle选项删除此标题。 TitleForAllDesks使fvwm在同一桌面上的每组窗口之前添加具有桌面名称和/或编号的菜单标题。使用NoLayer时,窗口的图层不会被显示。选项ShowPage、ShowPageX、ShowPageY启用显示窗口页面的四舍五入显示大小。使用ShowScreen,将显示窗口的Xinerama屏幕编号。

选项MaxLabelWidth将要打印的字符数作为其参数。只能看到窗口名称的许多字符。

如果要将WindowList用作图标管理器,可以调用以下内容:

WindowList OnlyIcons, Sticky, OnTop, Geometry

注意 – Only选项基本上消除了所有其他的选项,但是OnlyListSkip选项只会导致WindowList仅考虑具有WindowListSkip样式的窗口。

double-click-action

如果用户在打开窗口列表时,双击(或者如果菜单绑定到键,则快速按键两次),则会调用double-click-action命令。 如果双击动作由多个单词组成,则必须引用双击动作。

如果已将窗口列表绑定到键(或按钮):

AddToFunc SwitchToWindow
+ I WindowListFunc

Key Tab A M WindowList "Prev SwitchToWindow"

则双击操作对于定义默认窗口非常有用。

按下Alt-Tab一次,它会弹出窗口列表。如果你点击它两次,焦点就会在当前和最后一个聚焦窗口之间翻转。使用正确的SelectOnRelease菜单样式(参见上面的示例),一旦释放Alt键,就会选择一个窗口。

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 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.

废弃的命令

HilightColor textcolor backgroundcolor

This command is obsoleted by the Style options HilightFore and HilightBack. Please use

Style * HilightFore textcolor, HilightBack backgroundcolor

instead.

ColorLimit limit

This command is obsolete. See the –color-limit option to fvwm.

HilightColorset [num]

This command is obsoleted by the Style option HilightColorset. Please use

Style * HilightColorset num

instead.

IconFont [fontname]

This command is obsoleted by the Style option IconFont. Please use

Style * IconFont fontname

instead.

IconPath path

This command is obsolete. Please use ImagePath instead.

WindowFont [fontname]

This command is obsoleted by the Style option Font. Please use

Style * Font fontname

instead.

参考文献

FVMW Documentation/Miscellaneous Commands