mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-07-02 14:24:21 +02:00
wallpaper: don't favor large images anymore
I have sorted my wallpapers and don't have low-res ones anymore.
This commit is contained in:
parent
685860762d
commit
0a7c7e3eb2
1 changed files with 2 additions and 5 deletions
|
@ -57,14 +57,11 @@ for root, _, files in os.walk(os.path.join(options.directory)):
|
|||
'.jpeg',
|
||||
'.png'):
|
||||
images.append(os.path.join(root, i))
|
||||
images = random.sample(images,
|
||||
len(screens) + \
|
||||
random.randint(0, 3)) # Randomly favor larger images
|
||||
images = random.sample(images, len(screens))
|
||||
images = [Image.open(os.path.join(options.directory,
|
||||
image)) for image in images]
|
||||
images.sort(key=lambda image: -image.size[0]*image.size[1])
|
||||
print "wallpaper: %s" % " + ".join(["`%s`" % x.filename[(len(options.directory) + 1):]
|
||||
for x in images[:len(screens)]])
|
||||
for x in images])
|
||||
|
||||
for index in range(len(screens)):
|
||||
x, y, offsetx, offsety = screens[index]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue