Skip to content

Install default wallpapers into the configured folder - #140

Merged
bjarneo merged 1 commit into
omacom:mainfrom
ademiguelhub:install-default-wallpapers-in-configured-folder
Nov 1, 2026
Merged

bjarneo merged 1 commit into
omacom:mainfrom
ademiguelhub:install-default-wallpapers-in-configured-folder

Conversation

@ademiguelhub

Copy link
Copy Markdown
Contributor

installDefaultWallpapers runs on every launch and always writes to platform.WallpaperDir(), i.e. ~/Wallpapers/Aether. It ignores the wallpaperFolder setting that ChooseWallpaperFolder saves and ScanLocalWallpapers reads. A user who keeps their wallpapers elsewhere (for example ~/Pictures/Wallpapers) and deletes ~/Wallpapers gets it recreated on the next launch, and the bundled Aether wallpapers never show up in the folder they actually browse.

Change

  • installDefaultWallpapers resolves the folder with wallpaperFolderFromConfig(readConfigJSON("settings.json")), the same lookup ScanLocalWallpapers uses, and installs into <folder>/Aether.
  • With no folder configured, behaviour is unchanged: ~/Wallpapers/Aether is created as before.
  • A configured folder that doesn't exist is not created: the function returns an error, which startup already logs. This matches ScanLocalWallpapers, which reports a missing configured folder instead of creating it, and avoids leaving a stub directory where an unmounted drive belongs.

Tests

  • TestInstallDefaultWallpapersUsesConfiguredFolder: wallpapers land in the configured folder and ~/Wallpapers is not created.
  • TestInstallDefaultWallpapersSkipsMissingConfiguredFolder: a missing configured folder is neither created nor replaced by ~/Wallpapers.
  • The existing TestInstallDefaultWallpapers now sets XDG_CONFIG_HOME to a temp dir, so it can't pick up a real settings.json.

go test -race -tags webkit2_41 . passes, and both new tests fail without the change.

🤖 Generated with Claude Code

installDefaultWallpapers always wrote to ~/Wallpapers/Aether, so a user
who had chosen another wallpaper folder got ~/Wallpapers recreated on
every launch. It now installs into the configured folder, and skips a
configured folder that is missing instead of creating it.
@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] This PR appears safe to merge.

Summary

Bundled wallpapers now install into the saved wallpaper folder instead of always using ~/Wallpapers.

  • Bundled wallpapers now go into the folder you chose.

No actionable issues found. Tests were not run during this review.

Reviews (1) · Last reviewed commit: "Install default wallpapers into the conf..." · Reviewed by Greptile

@bjarneo
bjarneo merged commit d302f53 into omacom:main Nov 1, 2026
1 check passed
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