A lot of repairs and small changes
This commit is contained in:
Executable
+21
@@ -0,0 +1,21 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user