diff --git a/default/elephant/omarchy_background_selector.lua b/default/elephant/omarchy_background_selector.lua index 7954266fef..22877db01b 100644 --- a/default/elephant/omarchy_background_selector.lua +++ b/default/elephant/omarchy_background_selector.lua @@ -40,13 +40,14 @@ function GetEntries() if theme_name then table.insert(dirs, home .. "/.config/omarchy/backgrounds/" .. theme_name) end + table.insert(dirs, home .. "/Wallpapers") -- Track added files to avoid duplicates local seen = {} for _, wallpaper_dir in ipairs(dirs) do local handle = io.popen( - "find " .. ShellEscape(wallpaper_dir) + "find -L " .. ShellEscape(wallpaper_dir) .. " -maxdepth 1 -type f \\( -name '*.jpg' -o -name '*.jpeg' -o -name '*.png' -o -name '*.gif' -o -name '*.bmp' -o -name '*.webp' \\) 2>/dev/null | sort" ) if handle then diff --git a/migrations/1776587855.sh b/migrations/1776587855.sh new file mode 100644 index 0000000000..d34e6a07b5 --- /dev/null +++ b/migrations/1776587855.sh @@ -0,0 +1,9 @@ +echo "Create ~/Wallpapers directory for global wallpaper collection" + +if [[ -d "$HOME/Wallpapers" ]]; then + : +elif [[ -e "$HOME/Wallpapers" ]]; then + echo "Skipping ~/Wallpapers creation: $HOME/Wallpapers exists but is not a directory" +else + mkdir -p "$HOME/Wallpapers" +fi