Add support for override.* keys in to apply property overrides after matching criterias#587
Open
arebaka wants to merge 2 commits intoemersion:masterfrom
Open
Add support for override.* keys in to apply property overrides after matching criterias#587arebaka wants to merge 2 commits intoemersion:masterfrom
arebaka wants to merge 2 commits intoemersion:masterfrom
Conversation
ThinkChaos
reviewed
Jul 22, 2025
Contributor
ThinkChaos
left a comment
There was a problem hiding this comment.
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 ... |
Contributor
There was a problem hiding this comment.
nit: grammar/style
Suggested change
| // Everything in the default config is explicitly specified ... | |
| // Everything in the default config is explicitly specified... |
| #include <pango/pango.h> | ||
| #include "types.h" | ||
|
|
||
|
|
Contributor
There was a problem hiding this comment.
nit: style
Suggested change
Comment on lines
+7
to
+12
| 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); |
Contributor
There was a problem hiding this comment.
I think if you create a new header for these, you should also move the implementation to style.c.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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