Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: try to convert legacy parameters to rules #1327

Open
wants to merge 11 commits into
base: next
Choose a base branch
from

Conversation

Monsterovich
Copy link
Contributor

No description provided.

@yshui
Copy link
Owner

yshui commented Aug 27, 2024

hmm, this is an interesting idea. but i think it doesn't actually simplify the code. or perhaps you have some other goals in mind?

@Monsterovich
Copy link
Contributor Author

@yshui

hmm, this is an interesting idea. but i think it doesn't actually simplify the code. or perhaps you have some other goals in mind?

The goal is not to rewrite the whole config, at least for *-exclude parameters, if you need to add some rule in “rules”.

The program does it itself, by the way conky does the same thing with old configs and they still work.

@Monsterovich
Copy link
Contributor Author

Okay, I've added a conversion for "wintypes". It works.

The remaining options are:

[ 27.08.2024 04:50:52.099 log_warn_both_style_of_rules WARN ] Option "inactive-opacity-override" is set along with "rules". "rules" will take precedence, and "inactive-opacity-override" will have no effect.
[ 27.08.2024 04:50:52.099 log_warn_both_style_of_rules WARN ] Option "mark-wmwin-focused" is set along with "rules". "rules" will take precedence, and "mark-wmwin-focused" will have no effect.
[ 27.08.2024 04:50:52.099 log_warn_both_style_of_rules WARN ] Option "mark-ovredir-focused" is set along with "rules". "rules" will take precedence, and "mark-ovredir-focused" will have no effect.
[ 27.08.2024 04:50:52.099 log_warn_both_style_of_rules WARN ] Option "focus-exclude" is set along with "rules". "rules" will take precedence, and "focus-exclude" will have no effect.

...there's probably no way to convert them properly, so I'll leave them as they are.

@yshui
Copy link
Owner

yshui commented Aug 27, 2024

It is one of the expressed goals to not allow mixing of new and old rule options. I think it would be better if you turn your effort into a tool that will automatically update user's config file. e.g. when the user runs picom --migrate-rules, all the old *-exclude options get rewritten as rules.

@Monsterovich
Copy link
Contributor Author

Monsterovich commented Aug 27, 2024

@yshui

It is one of the expressed goals to not allow mixing of new and old rule options.

You'll have to, because compatibility is more important, especially when you can make it 1:1 or very close to it.

I think it would be better if you turn your effort into a tool that will automatically update user's config file. e.g. when the user runs picom --migrate-rules, all the old *-exclude options get rewritten as rules.

The problem is that you've changed the approach of how configs worked, which has been around for probably 10 years before you? Especially since the global selector is rarely necessary in reality, 95% of people will probably use “*-exclude” just like before. The issue with the requirement for "rules" option is that there is no exclude parameter for animations. And if you use rules, it breaks the whole config.

If you want decent user-experience and less whining in issues that rules breaks the config, do like in conky, which is this PR.

@Monsterovich Monsterovich force-pushed the feat-convert-legacy-parameters-to-rules branch from e9e1cdc to e83bf64 Compare October 19, 2024 17:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants