Misterio77 / flavours

🎨💧 An easy to use base16 scheme manager that integrates with any workflow.
MIT License
501 stars 29 forks source link

Select subtemplate based on scheme #65

Closed dive-deeper closed 1 year ago

dive-deeper commented 1 year ago

Hi,

Summary

Sometimes, for whatever reason, you might want to use a different subtemplate for some program based on the scheme that you're using.

Use case

Example:

I have a custom template for sway which I like for most schemes. However, for some schemes I would like a different template (otherwise it looks bad or is hardly readable). I could change my custom template when I'm using these schemes, or I could write a new custom template and reference it in my config file, however those are "a lot" of manual steps that I don't want to do every time I change scheme, which is more or less often.

Solution

If a subtemplate named exactly like the scheme being used is found for a certain component (e.g base16/templates/sway/templates/darkmoss.mustache), use it instead of the one given in the config.

Discussion

This would be my preferred behaviour and it shouldn't interfere with other workflows, however, I understand it might have some undesired effects on some edge cases. It could also be optionally activated to mitigate this.

Would you be interested in such a functionality? I have a MR ready if so. If you have some feedback I could try to implement it. I'm a rust noob but am learning ;)

Misterio77 commented 1 year ago

Fixed by #66