After trying multiple background apps for the Mac I finally decided to build my own. I wrote this on the way to work in the train so still has some work ToDo. This is a Python script which connects to the Unsplash.com API, grabs a random HD picture from unsplash and chnages your background.
Before you can use this amazing script you will need to Register with Unsplash and then create an application. Once you've created an application copy the application ID and insert it into the pyton script under the Application ID section.
Make a directory on your Mac and clone this project into this folder. To run the script:
python background.py
Once you get the hang of the script you can easily add this to your crontab to run once or several times a day.
The script is calling the Unsplash API for a random picture and copies the picture to /tmp on your Mac. It then uses applescript osascript to set the background and kill the Dock in order for the changes to take place.
I will keep adding functionality to this script and may even create a Mac toolbar app.
- Create options in the script to pull certain category of pictures (Nature, city scapes, etc)
- Add meta data to the picture (Photographer, location, maybe camera type?)
- Automate the script to run n times per day, week, etc
- integrate into a Mac menu bar app