window-rules: support matchOnce attribute

...allowing a rule to be applied to only the first window matching a
particular criteria. For example, the following can be used to apply a
window rule to lxqt-panel but not its configuration window with the same
app_id:

    <windowRules>
      <windowRule identifier="lxqt-panel" matchOnce="true">
        <skipTaskbar>yes</skipTaskbar>
        <action name="MoveTo" x="0" y="0" />
        <action name="ToggleAlwaysOnTop"/>
      </windowRule>
    </windowRules>
This commit is contained in:
Johan Malm 2023-06-07 21:44:38 +01:00 committed by Johan Malm
parent f6c3a3d7c3
commit 41de529fff
5 changed files with 73 additions and 15 deletions

View file

@ -415,9 +415,9 @@ defined as shown below.
</windowRules>
```
*Actions*
*Criteria*
*<windowRules><windowRule identifier="" title="">*
*<windowRules><windowRule identifier="" title="" matchOnce="">*
Define a window rule for any window which matches the criteria defined
by the attributes *identifier* or *title*. If both are defined, AND
logic is used, so both have to match.
@ -429,6 +429,9 @@ defined as shown below.
*title* is the title of the window.
*matchOnce* can be true|false. If true, the rule will only apply to the
first instance of the window with the specified identifier or title.
*Properties*
Property values can be *yes*, *no* or *default*.