Add global ~/Wallpapers directory to background selector#5358
Add global ~/Wallpapers directory to background selector#5358nzarg wants to merge 2 commits intobasecamp:devfrom
Conversation
Addresses the suggestion in basecamp#3164 in line with basecamp#5149. ~/Wallpapers is searched last so theme wallpapers take priority, and the existing seen-table deduplication prevents duplicates across dirs. If the directory doesn't exist find exits silently via 2>/dev/null. Also fixes find to use -L so symlinked directories are traversed correctly.
There was a problem hiding this comment.
Pull request overview
Adds a global wallpaper directory (~/Wallpapers) to the background selector so users can keep a persistent wallpaper collection independent of the active theme, with theme wallpapers taking priority.
Changes:
- Include
~/Wallpapersas an additional (last) search directory in the background selector. - Update the wallpaper discovery
findinvocation to follow symlinks (-L) to support linked/mounted wallpaper sources. - Add a migration to create
~/Wallpaperson first run.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| migrations/1776587855.sh | Creates ~/Wallpapers so the selector can rely on a consistent global location. |
| default/elephant/omarchy_background_selector.lua | Adds ~/Wallpapers to the search path and switches to find -L for symlink-friendly discovery. |
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| if [[ -d "$HOME/Wallpapers" ]]; then | ||
| : | ||
| elif [[ -e "$HOME/Wallpapers" ]]; then |
There was a problem hiding this comment.
[[ -e "$HOME/Wallpapers" ]] is false for a dangling symlink, so a user with ~/Wallpapers as a broken symlink (e.g., pointing at an offline mount) will fall into the mkdir -p branch and the migration will fail with "File exists". Consider treating any existing path (including symlinks) as "do not create" by checking -L/-h as well (or using a [[ -e ... || -L ... ]] guard) and keeping the current warning for non-directory, non-symlink cases.
| elif [[ -e "$HOME/Wallpapers" ]]; then | |
| elif [[ -e "$HOME/Wallpapers" || -L "$HOME/Wallpapers" ]]; then |
Addresses discussion #3164 and issue #5149. ~/Wallpapers is always included in the background selector regardless of the active theme, searched last so theme wallpapers take priority. find now uses -L to follow symlinks, so ~/Wallpapers can point to a mounted network share or similar. Migration 1776587855.sh creates the directory on first run.
If ~/Wallpapers is empty or doesn't exist, behaviour is unchanged.