Misterio77 / flavours

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

Create caches of generated colorschemes for faster switching #17

Closed gingkapls closed 3 years ago

gingkapls commented 3 years ago

Right now flavours recreates the colour schemes from files afresh every time the generate command is called.

If we could store the generated colour scheme in a folder (perhaps in the same folder as other colour schemes or in $HOME/.cache/) and then when that same file is used to generate a colour scheme, using the pre-generated one instead of generating a new one would cut some of the workload and thus resulting time I guess.

Misterio77 commented 3 years ago

Hey.

That's something i actually considered when implementing the generate subcommand. But i think it leaves up a too many details which would make it counterintuitive to use. It's actually pretty simple to do in bash, and i think it fits better as something we leave up to the user to do on their workflow. Here's a simple wayto do it in bash:

wallpaper=$1

flavours info generated-$wallpaper || flavours generate dark $wallpaper -s generated-$wallpaper
flavours apply generated-$wallpaper

Also, the generate is surprsingly fast (about 0.15 seconds at most), so i think the difference wouldn't be really noticiable

Misterio77 commented 3 years ago

I'm closing this for now, but feel free to reopen if you ever come with a new ideia on this matter