Skip to content

Add global ~/Wallpapers directory to background selector#5358

Open
nzarg wants to merge 2 commits intobasecamp:devfrom
nzarg:global-wallpapers-dir
Open

Add global ~/Wallpapers directory to background selector#5358
nzarg wants to merge 2 commits intobasecamp:devfrom
nzarg:global-wallpapers-dir

Conversation

@nzarg
Copy link
Copy Markdown

@nzarg nzarg commented Apr 19, 2026

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.

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.
Copilot AI review requested due to automatic review settings April 19, 2026 09:32
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ~/Wallpapers as an additional (last) search directory in the background selector.
  • Update the wallpaper discovery find invocation to follow symlinks (-L) to support linked/mounted wallpaper sources.
  • Add a migration to create ~/Wallpapers on 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.

Comment thread migrations/1776587855.sh Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 19, 2026 09:45
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread migrations/1776587855.sh

if [[ -d "$HOME/Wallpapers" ]]; then
:
elif [[ -e "$HOME/Wallpapers" ]]; then
Copy link

Copilot AI Apr 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[[ -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.

Suggested change
elif [[ -e "$HOME/Wallpapers" ]]; then
elif [[ -e "$HOME/Wallpapers" || -L "$HOME/Wallpapers" ]]; then

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants