Skip to content

Add configuration items to implement templates that execute light and dark separately. #142

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

Open
acdcbyl opened this issue Dec 20, 2024 · 4 comments

Comments

@acdcbyl
Copy link

acdcbyl commented Dec 20, 2024

When I use matugen to generate colours, I sometimes need to use separate templates for light and dark, and I'd like to be able to add an option to the config file (e.g. mode-run) to run the templates separately. I'm not sure if this feature is necessary, but it does improve the level of customisation. All in all, thanks to the developers!☺️

@InioX
Copy link
Owner

InioX commented Mar 29, 2025

Do you mean using one template if the mode is dark, and another one if the mode is light?

@acdcbyl
Copy link
Author

acdcbyl commented Mar 29, 2025

Do you mean using one template if the mode is dark, and another one if the mode is light?

That's right.

@Packjackisback
Copy link

Has this been implemented?

InioX added a commit that referenced this issue Mar 31, 2025
@InioX
Copy link
Owner

InioX commented Mar 31, 2025

Should work now? Look at the config.toml for example usage.

# Relative paths will be resolved from the path `config.toml` is in.
input_path = "./colors.whatever-extension"
output_path = "./a/colors-generated.whatever-extension"
# This will use a different input path depending on what mode you use.
# input_path_modes = { dark = "./colors.whatever-extension", light = "./colors.whatever-extension" }

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

No branches or pull requests

3 participants