Jump to content

Automation Task "Change Wallpaper" not always working


Recommended Posts

When I use "Change Wallpaper" with the same path as in a previous call, the desktop picture does not change. It seems that it does not detect that the file has changed. Maybe this can be fixed, so no workaround is needed. Currently, I use "Change Wallpaper at Random" before "Change Wallpaper"

 

I'm running Automation Tasks 2023.2 in macOS 13.4 and Alfred 5.1.1

Link to comment
26 minutes ago, Tekl said:

When I use "Change Wallpaper" with the same path as in a previous call, the desktop picture does not change.

 

What do you mean? If you’re calling it with the same path, why should the image change? What is happening between calls?

Link to comment

Between the calls, I'm loading a random image from Unsplash. It replaces the old image, so I have not to deal with different filenames and don't need to do housekeeping (deleting the old picture).

Link to comment

Ah, I see. Not something the Automation Task could handle, the code is basically Application("System Events").currentDesktop.picture = /PATH/TO/NEW/IMAGE. In other words, macOS is (understandably) seeing the same path and not refreshing the image. There’s no command to force the background to reload (technically restarting the Dock should do it, but that’s quite disruptive).

 

Changing it to something else and back is indeed how I’d recommend going about it. To avoid the “flicker” between image changes, you could copy the downloaded image to /tmp/newwallpaper.jpg (or something), switch to it then to your real path. Files in /tmp are deleted on reboots.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...