diff options
author | Daniel Weipert <git@mail.dweipert.de> | 2024-07-19 12:08:55 +0200 |
---|---|---|
committer | Daniel Weipert <git@mail.dweipert.de> | 2024-07-19 12:08:55 +0200 |
commit | 485b513b2e82aa3dcf86e4b0ae8a1fa7bc4e004b (patch) | |
tree | daaff4406a07addd45334946e94d7a5e10c0ce15 /.config/sway/bin/wallpaper.py | |
parent | 0aa14ca7e1cd984eed359af6447a2df16e4dd8e1 (diff) |
[sway.wallpaper] catch identify process error
Diffstat (limited to '.config/sway/bin/wallpaper.py')
-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 |