-
-
Notifications
You must be signed in to change notification settings - Fork 185
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
stylix: replacing the builtin color scheme generation engine with matugen #892
base: master
Are you sure you want to change the base?
Conversation
primaryScale parameters have been implemented |
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.
This is definitely an improvement over the current generator, at least when I tried it on my own wallpaper :)
As this is still a WIP I've just left a couple of comments.
@@ -78,24 +159,77 @@ in | |||
# and not anything indirect such as filling a template, otherwise | |||
# the output of the palette generator will not be protected from | |||
# garbage collection. |
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.
To keep the garbage collection stuff working, stylix.generated.json
should just be the raw-palette.json
derivation without any further processing. The importing, processing, etc should be under stylix.generated.palette
, and there's no need to write the processed theme back to a file.
stylix/palette.nix
Outdated
options.stylix = { | ||
scheme = lib.mkOption { |
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.
Consider grouping all the new options into a subcategory, to make it clear that they're only for generated themes.
Perhaps also move the polarity
option into that category (unless you're planning to remove it).
polarity = lib.mkOption { | ||
type = lib.types.enum [ | ||
"either" |
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.
Consider using one of lib.types.coercedTo
, lib.mkChangedOptionModule
, lib.mkRemovedOptionModule
, etc to handle changes to the polarity option.
Okay, I'll work on cleaning this up, do I remove the code for the old palette-generator or do I make an option to have it be selectable for legacy purposes? |
I fixed all of the issues that you brought up. |
Do you want me to create a gallery of different color scheme options? |
although for some reason, i can't get the removed option warning to show up |
that was an easy fix... |
very cool! will this be able to extend to generating a base24 or vim highlight group scheme? |
This PR is meant to further the discussion in (#694).
I believe matugen could be a good candidate for replacing the builtin color scheme generation engine stylix currently uses and this PR serves as a demo for it.
The code is not final:
darker
andeven-darker
polarities #694However this is what it looks like:
