Skip to content

fix: force macOS wallpaper refreshes with versioned copies#35

Open
TyceHerrman wants to merge 1 commit into
Colonial-Dev:masterfrom
TyceHerrman:fix/30-macos-wallpaper-cache
Open

fix: force macOS wallpaper refreshes with versioned copies#35
TyceHerrman wants to merge 1 commit into
Colonial-Dev:masterfrom
TyceHerrman:fix/30-macos-wallpaper-cache

Conversation

@TyceHerrman

Copy link
Copy Markdown

Summary

Work around macOS wallpaper caching by giving each successful update a unique file path instead of repeatedly pointing System Events at satpaper_latest.png.

Changes

  • copy the generated wallpaper to a uniquely named hidden sibling before applying it
  • pass the wallpaper path to osascript as an argument instead of interpolating it into AppleScript
  • update every desktop and report non-zero osascript status with stderr context
  • retain the new copy only after a successful switch, then remove the superseded copy
  • perform bounded startup cleanup of stale Satpaper-generated copies after the first successful switch
  • refuse to remove files that do not match Satpaper's reserved filename format
  • handle filename collisions with exclusive file creation
  • add tests for generated names, cleanup limits, and stale-copy removal safety

Testing

  • cargo test --release -- --skip generate_wallpaper — 4 passed
  • cargo clippy --all-targets --all-features -- -D warnings
  • git diff --check
  • manual end-to-end wallpaper refresh on macOS Sequoia (not run because it would change the active desktop)

Closes #30

@TyceHerrman
TyceHerrman marked this pull request as ready for review July 17, 2026 01:12
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.

Setting the background only works the first time on macOS (Sequoia)

1 participant