diff --git a/bin/build-wallpaper b/bin/build-wallpaper index ec0f75f..5b0afc8 100755 --- a/bin/build-wallpaper +++ b/bin/build-wallpaper @@ -55,8 +55,10 @@ for base, _, files in os.walk(os.path.join(options.directory)): '.jpeg', '.png'): images.append(os.path.join(base, i)) -images = random.sample(images, len(screens)) +images = random.sample(images, len(screens) + 3) images = [Image.open(image) for image in images] +images.sort(key=lambda im: -im.size[0]*im.size[1]) +images = images[:len(screens)] # If more than one screen and one image has the right aspect ratio, # use it.