If I set the wallpaper twice, the second time it will remove the wallpaper and set it to the default desktop wallpaper. The issue is, I can't rely on get
to tell me that the wallpaper is correctly set. When the wallpaper is changed back to default, get
still returns the wallpaper I set initially. In fact, on MacOS settings, it still shows the correct wallpaper. My program is setting the wallpaper every 24 hours, but it has to be able to reliably recover from a crash, waking from sleep, and timezone shifts. So what I want to do is be able to check if the wallpaper that is currently set is the correct one, and if not, change it. However, because I can't rely on get
to do that, I'm not sure what to do.
Am I doing something wrong here? I've tried this on multiple computers and am running into this issue consistently. Maybe there's a good way to work around this limitation?
This is what it looks like if you're running it from the CLI:
// Set the wallpaper
$ /macos-wallpaper set ~/Pictures/wallpaper.jpg --screen all --scale auto
// Wallpaper gets set to this image
// Get the wallpaper
$ /macos-wallpaper get
// Correct image is returned
/wallpaper.jpg
// Run a second set
$ /macos-wallpaper set ~/Pictures/wallpaper.jpg --screen all --scale auto
// Wallpaper now becomes default desktop
// Get the wallpaper again
$ /macos-wallpaper get
// The image I set earlier is returned, even though the desktop is showing the default wallpaper
/wallpaper.jpg
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too