Tapping the link is just going to download the zipped file for my Keyboard Maestro macro, so let me explain what you are getting.
First, credit where credit is due, a big thanks to [Greg Pierce for getting me a working AppleScript for this](https://twitter.com/agiletortoise/status/207954077345267712) (I was using an Automator action before, which was pretty slow).
All you have to do to make this work is to grab the path to your image and plug it in to the AppleScript and you are done. From there you can adjust the time and days that your image changes.
I use this to change the image:
– In the morning when I get up.
– Late night
– When I launch iA Writer
The first four are pretty simple, I just trigger with the time and have a new macro for each desktop image and time that I want it to change the background. I set it so the late night image is very dark, and the morning is bright, therefore slowly moving from bright to dark throughout the day.
*(Bonus tip: save the images as something like `morning.jpg` all in the same directory so that you only need to type the path once. Another bonus to this is that if you ever want to change the image you only need to replace the image with a new one of the same name — no touching the macro.)*
For the iA Writer background change I have the macro set to activate when I launch iA Writer and another set to switch back to a predetermined background when I quit iA Writer.
One final note: you will notice that I assigned a hotkey to this macro as well, that’s because this script changes the background of your *current* main display. Therefore if you hook a laptop to a monitor, the image will not change on your laptop — the hotkey is so that I can manually change the image if I please.