sindresorhus / wallpaper

Manage the desktop wallpaper
MIT License
1.05k stars 92 forks source link

Default wallpaper is shown for ≈0.5 sec #52

Open daxro opened 5 years ago

daxro commented 5 years ago

Issuehunt badges

When calling wallpaper.set('img/artwork.png') in a node app running on Mojave, the default wallpaper (not set via this API) is shown for approximately 0.5 sec. Is this a known issue? If so: any ways to get around it? Thanks.

There is a $60.00 open bounty on this issue. Add more on Issuehunt.

sindresorhus commented 5 years ago

Yes, it's working around a macOS bug where if you set the wallpaper to the same path as the current wallpaper, even though the image has changed, it doesn't update. See: https://github.com/sindresorhus/macos-wallpaper/blob/cd8b1a7de4432789b58119b08a93cd2a432b77c6/Sources/wallpaper/Wallpaper.swift#L65-L83

PR welcome for a better workaround.

daxro commented 5 years ago

Got it! Thanks for the prompt response. Then I'll probably just use unique filenames and then make use of your trash-repo. Cheers.

IssueHuntBot commented 5 years ago

@issuehunt has funded $60.00 to this issue.