Universal window matching #662
Replies: 2 comments 1 reply
-
I think yes, the rule-set should just be an override of the global options. Although IIRC we do use the global options to avoid doing some processing when they are disabled. Maybe there could be some performance implications.
🤔 I would definitely love to have that. But I couldn't come up a good way to put it in to the command-line interface. Other things to consider:
Also, could we automatically convert user's config files to use |
Beta Was this translation helpful? Give feedback.
-
I think this is quite interesting. To make things simpler, I would suggest:
|
Beta Was this translation helpful? Give feedback.
-
I've got a prototype working for a more unified way to specify window-specific options. The current setup has multiple arrays of rules to disable a globally enabled option for specific windows, i.e.
shadow = true
and thenshadow-exclude
.A similar approach has already been implemented with the
wintypes
section.Overview over current rules and wintypes options
shadow-exclude
shadow
shadow = true
clip-shadow-above
clip-shadow-above
fade-exclude
fade
fading = true
blur-background-exclude
blur-background
blur-background = true
focus-exclude
focus
opacity-rule
opacity
invert-color-include
rounded-corners-exclude
corner-radius > 0
paint-exclude
unredir-if-possible-exclude
redir-ignore
full-shadow
The
wintype
options have higher precedence than the rules.New option
window-rules
My prototype implements a new configuration option
window-rules
, that takes a list of rule conditions and corresponding options. This could look like the following:These take precedence over the existing rules. The first matching rule for a specific option has highest precedence (similar to the existing rules).
However, this approach still leaves open a few questions:
wintypes
andwindow-rules
options offer identical features?I think yes, consistency would be nice.
This might be more difficult to implement as we currently depend on the global options for some steps. However, the boolean nature of the rule-options implies this is possible.
If we are to deprecate the current option-specific rules, we either loose the ability to specify rules via the options (i.e. require libconfig and config-file), or the option interface diverges from the config interface.
wintypes
is currently only available in the config-file.Beta Was this translation helpful? Give feedback.
All reactions