mirror of
https://github.com/vincentbernat/i3wm-configuration.git
synced 2025-06-23 18:28:34 +02:00
wallpaper: small optimization
This commit is contained in:
parent
fadf06d1b9
commit
f5e47c6727
1 changed files with 6 additions and 1 deletions
|
@ -111,7 +111,12 @@ def get_best_parts(groups, images):
|
|||
best_association = None
|
||||
best_score = 0
|
||||
for group in groups:
|
||||
for association in (zip(group, p) for p in itertools.permutations(images)):
|
||||
associations = [tuple(zip(group, p)) for p in itertools.permutations(images)]
|
||||
seen = []
|
||||
for association in associations:
|
||||
if association in seen:
|
||||
continue
|
||||
seen.append(association)
|
||||
score = 0
|
||||
association = [WallpaperPart(rectangle=assoc[0], image=assoc[1]) for assoc in association]
|
||||
for assoc in association:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue