diff options
| -rwxr-xr-x | config/hypr/scripts/sddm_wallpaper.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/config/hypr/scripts/sddm_wallpaper.sh b/config/hypr/scripts/sddm_wallpaper.sh index b83f800a..17640f40 100755 --- a/config/hypr/scripts/sddm_wallpaper.sh +++ b/config/hypr/scripts/sddm_wallpaper.sh @@ -38,6 +38,17 @@ elif [[ "$1" == "--effects" ]]; then mode="effects" fi +# Abort if SDDM is not running (avoid errors on non-SDDM systems) +if command -v systemctl >/dev/null 2>&1; then + if ! systemctl is-active --quiet sddm; then + notify-send -i "$iDIR/error.png" "SDDM" "SDDM is not running. Skipping SDDM wallpaper update." + exit 0 + fi +elif ! pidof sddm >/dev/null 2>&1; then + notify-send -i "$iDIR/error.png" "SDDM" "SDDM is not running. Skipping SDDM wallpaper update." + exit 0 +fi + # Extract colors from rofi wallust config extract_color() { |
