mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-08-07 11:44:48 +02:00
wallpaper: add support for WebP format
This commit is contained in:
parent
e4a5aa99e8
commit
14d64de364
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ screens.sort(key=lambda screen: -screen[0] * screen[1])
|
||||||
images = []
|
images = []
|
||||||
for base, _, files in os.walk(os.path.join(options.directory)):
|
for base, _, files in os.walk(os.path.join(options.directory)):
|
||||||
for i in files:
|
for i in files:
|
||||||
if os.path.splitext(i)[1].lower() in (".jpg", ".jpeg", ".png"):
|
if os.path.splitext(i)[1].lower() in (".jpg", ".jpeg", ".png", ".webp"):
|
||||||
images.append(os.path.join(base, i))
|
images.append(os.path.join(base, i))
|
||||||
images = random.sample(images, len(screens))
|
images = random.sample(images, len(screens))
|
||||||
images = [Image.open(image) for image in images]
|
images = [Image.open(image) for image in images]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue