-
Notifications
You must be signed in to change notification settings - Fork 156
Add support for override.* keys in to apply property overrides after matching criterias #587
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
base: master
Are you sure you want to change the base?
Conversation
ThinkChaos
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this, reviewing as a random mako user that's interested in such a feature, as per opening #559 a while back :)
I tried it out and unfortunately I don't think it can close #566 as is:
- applying an override doesn't cause criteria defined later in the config that now match to apply. See this comment for an example config and the following comments for details on expectations.
This seems like the biggest issue for me cause overriding the urgency doesen't cause the notification's color to match the override, but instead use the original urgency's color, thus not solving my personal use case. - that issue also mentions supporting criteria like
timeout>1000. I think that could be a separate issue cause it seems like a bunch of work, but as it is, #566 is not fully resolved.
| style->touch_binding.action = MAKO_BINDING_DISMISS; | ||
|
|
||
| // Everything in the default config is explicitly specified. | ||
| // Everything in the default config is explicitly specified ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: grammar/style
| // Everything in the default config is explicitly specified ... | |
| // Everything in the default config is explicitly specified... |
| #include <pango/pango.h> | ||
| #include "types.h" | ||
|
|
||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: style
| void init_default_style(struct mako_style *style); | ||
| void init_empty_style(struct mako_style *style); | ||
| void finish_style(struct mako_style *style); | ||
| bool apply_style(struct mako_notification *notif, const struct mako_style *style); | ||
| bool apply_superset_style( | ||
| struct mako_style *target, struct mako_config *config); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think if you create a new header for these, you should also move the implementation to style.c.
This pull request introduces a new “overrides” mechanism in Mako’s INI-style configuration. Users can now specify one or more override.* keys inside a criteria block to defer certain property assignments until after all matching criteria have been evaluated.
Closes #566
Ref #559
Ref #211
CC: @arebaka