From 9145fa183d0c4e190bd4da8c43424799f5252493 Mon Sep 17 00:00:00 2001 From: Roland Thomas Date: Mon, 4 Sep 2023 12:48:34 -0400 Subject: [PATCH] get_wallpaper error handling --- .config/qtile/config.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.config/qtile/config.py b/.config/qtile/config.py index a43e691..d8d266b 100644 --- a/.config/qtile/config.py +++ b/.config/qtile/config.py @@ -89,9 +89,6 @@ def get_wallpaper(screen_number): Returns: str: The wallpaper path for the specified screen size. - - Raises: - IndexError: If the specified screen number is out of bounds. """ try: screens_ = run( @@ -108,6 +105,8 @@ def get_wallpaper(screen_number): size = screens_.stdout.split()[screen_number] except IndexError: size = screens_.stdout.split()[0] + except AttributeError: + size = screens_ match size: case "3440x1440":