Skip to content

feat(wallpaper): discover runtime resource packs via Wallpapers path#13

Merged
Charliechen114514 merged 1 commit into
mainfrom
feat/wallpaper-resource-pack-discovery
Jun 30, 2026
Merged

feat(wallpaper): discover runtime resource packs via Wallpapers path#13
Charliechen114514 merged 1 commit into
mainfrom
feat/wallpaper-resource-pack-discovery

Conversation

@Charliechen114514

Copy link
Copy Markdown
Member

Add support for discovering third-party wallpaper resource packs at runtime, with zero compile-time coupling to any specific pack (e.g. CF-Gallery): no submodule, no #ifdef, no CMake option. Whether a pack is "enabled" is simply whether it is installed into the discovered location.

  • base/path: add a Wallpapers PathType resolving to <desktop_active_root>/Wallpapers/, auto-created by setup() like the other standard directories.
  • base/file_operations: add filter_target_recursive(), an additive companion to filter_target() that descends into subdirectories so packs installed under wallpapers// are found. Existing flat callers are unaffected.
  • desktop/wallpaper: rework make_layer() to pick the first source that actually yields images (config source_path -> Pictures, flat; then Wallpapers, recursive). This also fixes a latent issue where an empty Pictures directory left the desktop without a wallpaper even when a bundled pack was available. Users without a pack see no change.

CF-Gallery (CC BY-NC-ND 4.0) is consumed as such a pack: installing it into Wallpapers/cfgallery/ surfaces its images. The pack's own install rule lives in the CF-Gallery repo, not here. The wallpaper animation/rotation engine (gradient/movement switching) remains a follow-up.

Add support for discovering third-party wallpaper resource packs at
runtime, with zero compile-time coupling to any specific pack (e.g.
CF-Gallery): no submodule, no #ifdef, no CMake option. Whether a pack
is "enabled" is simply whether it is installed into the discovered
location.

- base/path: add a Wallpapers PathType resolving to
  <desktop_active_root>/Wallpapers/, auto-created by setup() like the
  other standard directories.
- base/file_operations: add filter_target_recursive(), an additive
  companion to filter_target() that descends into subdirectories so
  packs installed under wallpapers/<pack>/ are found. Existing flat
  callers are unaffected.
- desktop/wallpaper: rework make_layer() to pick the first source that
  actually yields images (config source_path -> Pictures, flat; then
  Wallpapers, recursive). This also fixes a latent issue where an empty
  Pictures directory left the desktop without a wallpaper even when a
  bundled pack was available. Users without a pack see no change.

CF-Gallery (CC BY-NC-ND 4.0) is consumed as such a pack: installing it
into Wallpapers/cfgallery/ surfaces its images. The pack's own install
rule lives in the CF-Gallery repo, not here. The wallpaper
animation/rotation engine (gradient/movement switching) remains a
follow-up.
@Charliechen114514 Charliechen114514 merged commit 23cfd6f into main Jun 30, 2026
6 checks passed
@Charliechen114514 Charliechen114514 deleted the feat/wallpaper-resource-pack-discovery branch June 30, 2026 07:36
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.

1 participant