diff options
| author | Davi Ribeiro <104164579+Markus328@users.noreply.github.com> | 2025-10-16 14:59:13 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-17 04:59:13 +1100 |
| commit | 4593b823d730f46168d2eccd061467adb1754a57 (patch) | |
| tree | 3da4a1a1e30a385efeca76d3bb0e02d7ab7aecd3 | |
| parent | feat: add wallpaper post-hook for dynamic theming (#61) (diff) | |
| download | caelestia-cli-4593b823d730f46168d2eccd061467adb1754a57.tar.gz caelestia-cli-4593b823d730f46168d2eccd061467adb1754a57.tar.bz2 caelestia-cli-4593b823d730f46168d2eccd061467adb1754a57.zip | |
wallpaper: fix random for multi-monitor setup (#63)
| -rw-r--r-- | src/caelestia/utils/wallpaper.py | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/caelestia/utils/wallpaper.py b/src/caelestia/utils/wallpaper.py index ff0d209..327da5c 100644 --- a/src/caelestia/utils/wallpaper.py +++ b/src/caelestia/utils/wallpaper.py @@ -51,12 +51,7 @@ def get_wallpapers(args: Namespace) -> list[Path]: return walls monitors = message("monitors") - filter_size = monitors[0]["width"], monitors[0]["height"] - for monitor in monitors[1:]: - if filter_size[0] > monitor["width"]: - filter_size[0] = monitor["width"] - if filter_size[1] > monitor["height"]: - filter_size[1] = monitor["height"] + filter_size = min(m["width"] for m in monitors), min(m["height"] for m in monitors) return [f for f in walls if check_wall(f, filter_size, args.threshold)] |