「FVWM」 – 控制Window的样式

  CREATED BY JENKINSBOT

出于可读性考虑,本节中的命令不按字母顺序排序。 Style命令的描述可以在本节末尾找到。

FocusStyle stylename options

与Style命令完全相同,但只接受以“FP”开头的焦点策略相关的样式。可以删除前缀,但需要花费一点时间。FocusStyle旨在使配置文件更具可读性。比如:

FocusStyle * EnterToFocus, !LeaveToUnfocus
Style * FPEnterToFocus, !FPLeaveToUnfocus

上述两行配置是等价的。

DestroyStyle style

删除名为style的样式。更改立即生效。 请注意,style不是通配符搜索字符串,而是区分大小写的字符串,应与原始Style命令指定的style完全匹配。

删除带星号(”*”)的样式名是可执行的,但不是推荐的做法。 例如:

DestroyStyle Application*

这将删除名为“Application*”的样式的所有设置,而不是所有以“Application”开头的样式。

WindowStyle options

在所选窗口上设置属性(样式)。选项与Style命令完全相同。

DestroyWindowStyle

删除所选窗口上由WindowStyle命令设置的样式。更改立即生效。

UpdateStyles

所有窗口的样式和外观的所有待定的更新都会立即应用。 例如,如果在FVWM函数内触发的Style、WindowStyle、TitleStyle命令。

Style stylename options …

Style,该命令用于将窗口的属性设置为默认值以外的值,或者设置窗口管理器的默认样式。

stylename,可以是窗口的名称、类、可见名、资源字符串。它可能包含通配符’*’和’?’,它们以通常的Unix文件名方式匹配(通配符的形式)。单个Style命令中的多个样式选项从左到右读取,就好像它们是在单独的命令中一个接一个地发出的一样。 给定样式始终覆盖之前指定的所有冲突样式,即最后指定的样式优先级更高。

注意:没有名称的窗口(WM_NAME)的名称为“Untitled”;没有类的窗口(WM_CLASS,res_class)被赋予“NoClass”类;没有资源字符串的窗口(WM_CLASS,res_name)被赋予资源名“NoResource”。

如果窗口设置了资源名“fvwmstyle”,则在选择样式时,除了任何窗口名称外,还会使用该资源的值。

options,以逗号分隔的样式列表,其中包含一个或多个以下样式关键字。每组样式名称用斜杠(’/’)分隔,通常组内样式之间是互斥的。这些组中的最后一种样式是默认样式:

BorderWidth, HandleWidth, !Icon / Icon, MiniIcon, IconBox, IconGrid, IconFill, IconSize, !Title / Title, TitleAtBottom / TitleAtLeft / TitleAtRight / TitleAtTop, LeftTitleRotatedCW / LeftTitleRotatedCCW, RightTitleRotatedCCW / RightTitleRotatedCW, TopTitleRotated / TopTitleNotRotated, BottomTitleRotated / BottomTitleNotRotated, !UseTitleDecorRotation / UseTitleDecorRotation, StippledTitle / !StippledTitle, StippledIconTitle / !StippledIconTitle, IndexedWindowName / ExactWindowName, IndexedIconName / ExactIconName, TitleFormat / IconTitleFormat / !Borders / Borders, !Handles / Handles, WindowListSkip / WindowListHit, CirculateSkip / CirculateHit, CirculateSkipShaded / CirculateHitShaded, CirculateSkipIcon / CirculateHitIcon, Layer, StaysOnTop / StaysOnBottom / StaysPut, Sticky / Slippery, StickyAcrossPages / !StickyAcrossPages, StickyAcrossDesks / !StickyAcrossDesks, !StickyStippledTitle / StickyStippledTitle, !StickyStippledIconTitle / StickyStippledIconTitle, StartIconic / StartNormal, Color, ForeColor, BackColor, Colorset, HilightFore, HilightBack, HilightColorset, BorderColorset, HilightBorderColorset, IconTitleColorset, HilightIconTitleColorset, IconBackgroundColorset, IconTitleRelief, IconBackgroundRelief, IconBackgroundPadding, Font, IconFont, StartsOnDesk / StartsOnPage / StartsAnyWhere, StartsOnScreen, StartShaded / !StartShaded, ManualPlacementHonorsStartsOnPage / ManualPlacementIgnoresStartsOnPage, CaptureHonorsStartsOnPage / CaptureIgnoresStartsOnPage, RecaptureHonorsStartsOnPage / RecaptureIgnoresStartsOnPage, StartsOnPageIncludesTransients / StartsOnPageIgnoresTransients, IconTitle / !IconTitle, MwmButtons / FvwmButtons, MwmBorder / FvwmBorder, MwmDecor / !MwmDecor, MwmFunctions / !MwmFunctions, HintOverride / !HintOverride, !Button / Button, ResizeHintOverride / !ResizeHintOverride, OLDecor / !OLDecor, GNOMEUseHints / GNOMEIgnoreHints, StickyIcon / SlipperyIcon, StickyAcrossPagesIcon / !StickyAcrossPagesIcon, StickyAcrossDesksIcon / !StickyAcrossDesksIcon, ManualPlacement / CascadePlacement / MinOverlapPlacement / MinOverlapPercentPlacement / TileManualPlacement / TileCascadePlacement / PositionPlacement, MinOverlapPlacementPenalties, MinOverlapPercentPlacementPenalties, DecorateTransient / NakedTransient, DontRaiseTransient / RaiseTransient, DontLowerTransient / LowerTransient, DontStackTransientParent / StackTransientParent, SkipMapping / ShowMapping, ScatterWindowGroups / KeepWindowGroupsOnDesk, UseDecor, UseStyle, !UsePPosition / NoPPosition / UsePPosition, !UseUSPosition, NoUSPosition / UseUSPosition, !UseTransientPPosition, NoTransientPPosition / UseTransientPPosition, !UseTransientUSPosition / NoTransientUSPosition / UseTransientUSPosition, !UseIconPosition / NoIconPosition / UseIconPosition, Lenience / !Lenience, ClickToFocus / SloppyFocus / MouseFocus|FocusFollowsMouse / NeverFocus, ClickToFocusPassesClickOff / ClickToFocusPassesClick, ClickToFocusRaisesOff / ClickToFocusRaises, MouseFocusClickRaises / MouseFocusClickRaisesOff, GrabFocus / GrabFocusOff, GrabFocusTransientOff / GrabFocusTransient, FPFocusClickButtons, FPFocusClickModifiers, !FPSortWindowlistByFocus / FPSortWindowlistByFocus, FPClickRaisesFocused / !FPClickRaisesFocused, FPClickDecorRaisesFocused / !FPClickDecorRaisesFocused, FPClickIconRaisesFocused / !FPClickIconRaisesFocused, !FPClickRaisesUnfocused / FPClickRaisesUnfocused, FPClickDecorRaisesUnfocused / !FPClickDecorRaisesUnfocused, FPClickIconRaisesUnfocused / !FPClickIconRaisesUnfocused, FPClickToFocus / !FPClickToFocus, FPClickDecorToFocus / !FPClickDecorToFocus, FPClickIconToFocus / !FPClickIconToFocus, !FPEnterToFocus / FPEnterToFocus, !FPLeaveToUnfocus / FPLeaveToUnfocus, !FPFocusByProgram / FPFocusByProgram, !FPFocusByFunction / FPFocusByFunction, FPFocusByFunctionWarpPointer / !FPFocusByFunctionWarpPointer, FPLenient / !FPLenient, !FPPassFocusClick / FPPassFocusClick, !FPPassRaiseClick / FPPassRaiseClick, FPIgnoreFocusClickMotion / !FPIgnoreFocusClickMotion, FPIgnoreRaiseClickMotion / !FPIgnoreRaiseClickMotion, !FPAllowFocusClickFunction / FPAllowFocusClickFunction, !FPAllowRaiseClickFunction / FPAllowRaiseClickFunction, FPGrabFocus / !FPGrabFocus, !FPGrabFocusTransient / FPGrabFocusTransient, FPOverrideGrabFocus / !FPOverrideGrabFocus, FPReleaseFocus / !FPReleaseFocus, !FPReleaseFocusTransient / FPReleaseFocusTransient, FPOverrideReleaseFocus / !FPOverrideReleaseFocus, StartsLowered / StartsRaised, IgnoreRestack / AllowRestack, FixedPosition / VariablePosition, FixedUSPosition / VariableUSPosition, FixedPPosition / VariablePPosition, FixedSize / VariableSize, FixedUSSize / VariableUSSize, FixedPSize / VariablePSize, !Closable / Closable, !Iconifiable / Iconifiable, !Maximizable / Maximizable, !AllowMaximizeFixedSize / AllowMaximizeFixedSize, IconOverride / NoIconOverride / NoActiveIconOverride, DepressableBorder / FirmBorder, MinWindowSize, MaxWindowSize, IconifyWindowGroups / IconifyWindowGroupsOff, ResizeOpaque / ResizeOutline, BackingStore / BackingStoreOff / BackingStoreWindowDefault, Opacity / ParentalRelativity, SaveUnder / SaveUnderOff, WindowShadeShrinks / WindowShadeScrolls, WindowShadeSteps, WindowShadeAlwaysLazy / WindowShadeBusy / WindowShadeLazy, EWMHDonateIcon / EWMHDontDonateIcon, EWMHDonateMiniIcon / EWMHDontDonateMiniIcon, EWMHMiniIconOverride / EWMHNoMiniIconOverride, EWMHUseStackingOrderHints / EWMHIgnoreStackingOrderHints, EWMHIgnoreStateHints / EWMHUseStateHints, EWMHIgnoreStrutHints / EWMHUseStrutHints, EWMHIgnoreWindowType / !EWMHIgnoreWindowType, EWMHMaximizeIgnoreWorkingArea / EWMHMaximizeUseWorkingArea / EWMHMaximizeUseDynamicWorkingArea, EWMHPlacementIgnoreWorkingArea / EWMHPlacementUseWorkingArea / EWMHPlacementUseDynamicWorkingArea, MoveByProgramMethod, Unmanaged, State, SnapGrid, SnapAttraction, EdgeMoveDelay, EdgeResizeDelay, EdgeMoveResistance, InitialMapCommand

在上面的列表中,一些选项被列为style-option/opposite-style-option的形式。如果要更改fvwm默认行为,拥有opposite-style-option的条目描述了fvwm默认行为,可以使用它。

Transient windows

DecorateTransient,导致瞬态窗口(通常是未装饰的)被赋予通常的fvwm装饰(标题栏、按钮等)。请注意,某些弹出窗口(例如,xterm菜单)不由窗口管理器管理,仍然不会收到装饰。

NakedTransient(默认值),导致瞬态窗口无法获得标准装饰。您只能将键盘或鼠标按钮绑定到未装饰窗口的侧面和客户端部分(在绑定中的“S”和“W”上下文,请参阅Mouse和Key命令)。

RaiseTransient,具有该样式的窗口在升起时,会升起所有它所拥有的瞬态窗口。DontRaiseTransient样式禁用此行为。然后将所有窗口视为没有瞬态。

LowerTransient,具有该样式的窗口在降低时,会降低所有它所拥有的瞬态窗口。DontLowerTransient样式禁用此行为。然后将所有窗口视为没有瞬态。

StackTransientParent,增强了RaiseTransientLowerTransient样式。如果正在升起的窗口是瞬态,并且其主窗口具有RaiseTransient样式,则使用StackTransientParent样式引发窗口会将升起操作传递到主窗口;这种效应会使发生在瞬态窗口的升起像升起主窗口一样 — 整个群体都被升起了。当主窗口具有LowerTransient样式时,类似的行为适用于降低整组瞬态窗口。DontStackTransientParent关闭此行为。如果不使用RaiseTransientLowerTransient,则StackTransientParent/DontStackTransientParent是无效的。

如下配置可以合理地模拟Motif提升/降低瞬态窗口:

Style * RaiseTransient
Style * LowerTransient
Style * StackTransientParent

这也是常用的配置组合。

参考文献

FVWM/Controlling Window Styles