From 67e6743445dcd372b52697a53164b68cb1ba6887 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Tue, 28 Aug 2018 09:51:58 +0200 Subject: [PATCH] wallpaper: don't take too many images Otherwise, smaller ones will never get chosen. Dual screens one are already favored. --- bin/build-wallpaper | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/build-wallpaper b/bin/build-wallpaper index a80de42..7c5afe1 100755 --- a/bin/build-wallpaper +++ b/bin/build-wallpaper @@ -60,7 +60,7 @@ 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) + 3) +images = random.sample(images, len(screens)) images = [Image.open(image) for image in images] images.sort(key=lambda im: -im.size[0]*im.size[1]) images = images[:len(screens)]