#!/bin/bash
# Setting wallpaper_dir

WALLPAPER_DIR="${XDG_PICTURES_DIR:-}"

# 2. If empty, use xdg-user-dir (most reliable)
if [ -z "$WALLPAPER_DIR" ]; then
    if command -v xdg-user-dir >/dev/null 2>&1; then
        WALLPAPER_DIR="$(xdg-user-dir PICTURES 2>/dev/null)"
    fi
fi

# 3. Final fallback (hardcoded default)
if [ -z "$WALLPAPER_DIR" ] || [ ! -d "$WALLPAPER_DIR" ]; then
    WALLPAPER_DIR="$HOME/Pictures"
fi

# 4. Your wallpaper subfolder
WALLPAPER_DIR="$WALLPAPER_DIR/Wallpapers"

echo $WALLPAPER_DIR