Skip to content

rules: Add Enabled property

Ismael Asensio requested to merge work/iasensio/rules-enabled into master

Commits

  • rules: Add Enabled property

    Adds the property "Enabled" to the window rules config.

    The property defaults to true so there is no change to the current status quo, but when set to false, the rule will not match in any situation, so it will not be applied.

    • User wants to temporarily disable a kwin rule
    • Rules with temporary policies (apply now, force temporarily) are deleted after applied, which is confusing for some users because it disappears from their settings. We can now disable them instead
    • Enable or disable system-set rules on certain conditions (ex. Plasma Mobile for their docked mode)
  • kcms/rules: Add ability to disable rules from the KCM

    FEATURE: 439476
    FIXED-IN: 6.3

Test plan

  • Set a window rule you can easily track in the KCM (I've found "Titlebar color scheme" very handful for testing purposes) and Apply
  • The rule will get applied
  • De-select the corresponding checkbox and Apply
  • The rule is no longer applied

Screenshot

Screenshot_20241123_120023.png

CI

  • Added a new test case in TestXdgShellWindowRules

Pinging @devinlin as the requester of the 3rd use case mentioned.

In future MRs I'll be implementing the other two which are feature requests in bugzilla.

Edited by Ismael Asensio

Merge request reports

Loading