ikskuh / kristall

Graphical small-internet client for windows, linux, MacOS X and BSDs. Supports gemini, http, https, gopher, finger.
https://kristall.random-projects.net/
GNU General Public License v3.0
743 stars 42 forks source link

pywal integration #249

Open array-in-a-matrix opened 2 years ago

array-in-a-matrix commented 2 years ago

Is it possible to be able to get color palettes from pywal and use it to theme sites? I feel like this can be done easily but idk

ikskuh commented 2 years ago

Can you explain how that should work? pywall uses source images for the palette, which we don't have. Also someone has to port over the python code to C++

array-in-a-matrix commented 2 years ago

pywal generates color palettes and places them in $XDG_CACHE_HOME/wal. The palettes are expressed in a bunch of formats like json, css, pure text, etc. The different file formats are viewed here. We can just import one of these and make kristall use it.

array-in-a-matrix commented 2 years ago

I created a basic preset and managed to theme kristall using pywal, however once the theme is updated by pywal kristall won't update it automatically and need to manually readd the .kthm from $XDG_CACHE_HOME/wal/templates and load the preset.

ikskuh commented 2 years ago

You can generate the themes directly into the Kristall theme folder. Instead of the wal folder

array-in-a-matrix commented 2 years ago

Where can I find this folder exactly?

ikskuh commented 2 years ago

It's typically located at ~/.config/kristall/styles/ for Unixoids, different for windows and macos

array-in-a-matrix commented 2 years ago

I system linked the palette from cache to the config location and it works but to update the theme we have to just reapply the theme. Idk how we can make this work better. Could kristall look for the palette and system link it if it exists?