diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2017-06-28 20:28:16 +1000 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2017-06-28 20:28:16 +1000 |
| commit | 153a7f92d2db58cff969ae9a75bcdb3e601bc2bb (patch) | |
| tree | 35c0443b3036a4b55cb09b2f9a389d4ebac4ce3f | |
| parent | c067948d5960da22c93465eccfcab2df6a955be0 (diff) | |
General: Fix wallpaper bug
| -rwxr-xr-x | pywal/gen_colors.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pywal/gen_colors.py b/pywal/gen_colors.py index 4b606dc..e1e3478 100755 --- a/pywal/gen_colors.py +++ b/pywal/gen_colors.py @@ -23,11 +23,11 @@ def random_img(img_dir): # Add all images to a list excluding the current wallpaper. file_types = (".png", ".jpg", ".jpeg", ".jpe", ".gif") images = [img for img in os.scandir(img_dir) - if img.name.endswith(file_types) and img.name != wallpaper] + if img.name.endswith(file_types) and img.name != current_wall] # If no images are found, use the current wallpaper. if not images: - return pathlib.Path(wallpaper) + return pathlib.Path(wallpaper[0]) return pathlib.Path(img_dir / random.choice(images).name) |
