mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-26 11:48:33 +02:00
wallpaper: don't take too many images
Otherwise, smaller ones will never get chosen. Dual screens one are already favored.
This commit is contained in:
parent
4c9ae36aeb
commit
67e6743445
1 changed files with 1 additions and 1 deletions
|
@ -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)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue