diff options
-rwxr-xr-x | .config/sway/bin/wallpaper.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/.config/sway/bin/wallpaper.py b/.config/sway/bin/wallpaper.py index d8ac680..aef190f 100755 --- a/.config/sway/bin/wallpaper.py +++ b/.config/sway/bin/wallpaper.py @@ -142,6 +142,9 @@ while True: selected_file_path = random.choice(found_file_paths) identify_process = subprocess.run(['identify', '-format', '%[fx:mean]', selected_file_path], capture_output=True, text=True) + if not identify_process.stdout: + break + brightness = float(identify_process.stdout) if brightness < float(args.brightness_threshold): # non-bright image break |