Closed daqnal closed 8 months ago
wpaperd now implements a queue and will try to draw images that have not drawn before when using Random sorting. I have added drawn_images_queue_size
parameter to control how big this queue is, so you could have a big queue and avoid repeating images.
I am considering changing the parameter name to queue_size
. What do you think? Does this cover your need?
Thank you!
Is the parameter really needed? Why not set it to amount of wallpapers in the folder?
Yea, the parameter is needed because of how the queue work. The queue is a fixed size vector and needs to be reallocated when the size change. If the queue was the same size as the amount of wallpapers in the folder, I would need to reallocate it often depending on the user habits.
Personally, I think that setting that amount to a reasonable amount (like ~200) would have almost the same effect, due to randomness. It is also possible to set a higher number than the amount of wallpapers, achieving the effect mentioned.
Just a quick suggestion: Design some way for the random wallpaper sort to not repeat wallpapers until it has shown every one in the folder set by the user. One solution would be to initialize a randomized list of every wallpaper's index, then move through that list every next time wpaperd is run. Nice project 👍