dylanaraps / pywal

🎨 Generate and change color-schemes on the fly.
MIT License
8.22k stars 311 forks source link

wal doesn't regenerate colors if input file already has a cached scheme with the same name #692

Open SPFabGerman opened 1 year ago

SPFabGerman commented 1 year ago

If I run wal with wal -i path/to/symlink the colors aren't regenerated, if a cached color scheme for that symlink already exists in ~/.cache/wal/schemes, even if the symlink changes destinations. I haven't tried it out, but I think the same thing probably also holds true, if a normal image would be switched out but would keep it's name. So the issue isn't necessarily symbolic links, but rather that wal doesn't detect, if the underlying image has changed.

I think there are two possible solutions for that problem:

  1. add an argument to wal, which forces wal to ignore the cache and always regenerate the color scheme
  2. add a checksum of the image file to the cached json scheme, which if different also forces the regeneration of the color scheme
explosion-mental commented 6 months ago

I think this idea is great and was really helpful while testing different schemes on my project, so I owe you a thanks ^-^

implementation