pywal icon indicating copy to clipboard operation
pywal copied to clipboard

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

Open SPFabGerman opened this issue 2 years ago • 1 comments

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

SPFabGerman avatar Nov 29 '22 19:11 SPFabGerman

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

implementation

explosion-mental avatar Dec 21 '23 17:12 explosion-mental