diff --git a/bin/wallpaper b/bin/wallpaper index ca5ff41..e42df54 100755 --- a/bin/wallpaper +++ b/bin/wallpaper @@ -218,8 +218,7 @@ def get_random_images(directory: str, number: int) -> list[Image]: except (OSError, ValueError): count = 0 counts.append(count) - counts = [(count - min(counts) + 1) ** 3 for count in counts] - weights = [100 / count for count in counts] + weights = [100 / ((count - min(counts) + 1) ** 3) for count in counts] images = [ PIL.Image.open(image) for image in random.choices(image_files, k=number, weights=weights)