diff options
| author | Dylan Araps <[email protected]> | 2017-12-28 21:22:25 +1100 |
|---|---|---|
| committer | Dylan Araps <[email protected]> | 2017-12-28 21:22:25 +1100 |
| commit | 8d391d0820e8e78cba504cfc447fbc2b1c48ecf4 (patch) | |
| tree | 6f737d5b1fc2acba802269e77683bf75ef1376dd | |
| parent | general: Fix pywal causing a pc beep (diff) | |
| download | pywal-8d391d0820e8e78cba504cfc447fbc2b1c48ecf4.tar.xz pywal-8d391d0820e8e78cba504cfc447fbc2b1c48ecf4.zip | |
image: use a different shuffle algo
| -rw-r--r-- | pywal/image.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pywal/image.py b/pywal/image.py index 8b25b1e..e4bccfa 100644 --- a/pywal/image.py +++ b/pywal/image.py @@ -25,7 +25,9 @@ def get_random_image(img_dir): print("image: No new images found (nothing to do), exiting...") sys.exit(1) - return os.path.join(img_dir, random.choice(images).name) + random.shuffle(images) + + return os.path.join(img_dir, images[0].name) def get(img, cache_dir=CACHE_DIR): |