anufrievroman / waypaper

GUI wallpaper manager for Wayland and Xorg Linux systems
https://anufrievroman.gitbook.io/waypaper
GNU General Public License v3.0
277 stars 11 forks source link

fix: Consistantly set wallpaper using hyprpaper backend #52

Closed nikolaizombie1 closed 1 month ago

nikolaizombie1 commented 1 month ago

As mentioned in issue #7 , the wallpapers would sometimes not be preloaded before being set by hyprpaper. This PR fixes that by serializing the shell commends using the check_output function and it also retries up to 10 times to set the wallpaper in the off chance that it somehow fails to set the wallpaper (although since it is serialized it should never happen).

anufrievroman commented 1 month ago

In this implementation, we seem to rewrite result variable three times, but only the last one counts. So that if any of the first to is not "ok" , the while loop still validates it seems?

anufrievroman commented 1 month ago

Well done, I like this approach for All option!