Closed jude7733 closed 1 month ago
Hi, thank you for the suggestion. Currently, I don't know if I'll have time to work on that soon, but if someone wants to implement this, I suppose we could maintain a file used_wallpapers
of already used wallpaper somewhere next to all the cache for example, and when we do get_random_file()
function from common.py
module, and inside it, we get image_paths
variable, we should contrast it to that list from used_wallpapers
, and then return random from the list of what remains. If nothing remains, reset used_wallpapers
and return a random choice from image_paths
.
Fixed by #83
Issue
Currently, Waypaper selects random wallpapers from the configured directories. However, it does not keep track of previously used wallpapers. This can lead to the same wallpapers being used repeatedly before all available wallpapers have been cycled through. This issue proposes adding a feature to Waypaper to avoid using already selected random wallpapers until no more unique wallpapers are left in the configured directories. This will ensure that all available wallpapers are used before repeating any.
Proposed Solution
Actual Behavior
I used to do this with a bash script before using waypaper