Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

Conversation

@kerty0
Copy link
Contributor

@kerty0 kerty0 commented Oct 24, 2024

I primary use pixel art wallpapers, so the default filter for all restored images was annoying.
I modified cache so it stores filter and path to image separated by '\n' (I couldn't think of anything better). It can work with old version of cache if it doesn't contain '\n' using default filter.
I also fixed a crash that occurred when using a solid color on my system (EndevourOS + Hyprland): the drawable surface required RGBA image but was only provided with RGB.
I'm still learning Rust and English is not my native language, so sorry if anything is wrong.

@LGFae
Copy link
Owner

LGFae commented Oct 24, 2024

It can work with old version of cache if it doesn't contain '\n'

We don't need this. Instead, increase the cargo version from masterV2 to masterV3. The cache will won't consider files with older versions.

@kerty0
Copy link
Contributor Author

kerty0 commented Oct 25, 2024

Now get_previous_image_path returns error to the old version of cache and users will be forced to set the wallpaper again to update cache.

Copy link
Owner

@LGFae LGFae left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice. Just two small things and we can merge this.

filepath.push(output_name);
if !filepath.is_file() {
return Ok("".to_string());
return Ok(("Lanczos3".to_string(), "".to_string()));
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really get what this gives us. Is it just to improve the error messages?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, and it makes it easy to force swww-daemon ignore missing cache files.

@kerty0
Copy link
Contributor Author

kerty0 commented Oct 27, 2024

How swww restore don't stop half done if one of the outputs don't have cache file and print name of the output for all errors

@LGFae
Copy link
Owner

LGFae commented Oct 27, 2024

Thanks!

@LGFae LGFae merged commit 36808df into LGFae:main Oct 27, 2024
10 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants