This is the script I use to have my desktop background rotate through images submitted to /r/EarthPorn.
If you want to use it, you need a working Swift environment first.
Change the OutputDir path in
Build the script with
swift build -c release
Use launchd to run the service.
dk.stjernegard.bgfetch.plist.exampleto your liking. Remember to change the Program path.
mv dk.stjernegard.bgfetch.plist.example ~/Library/LaunchAgents/dk.stjernegard.bgfetch.plist
launchctl load dk.stjernegard.bgfetch.plist
- Use the
OutputDirfolder as source for your desktop background and let it autorotate as much as you want.