Bash Script for download and set current Bing Daily Wallpaper automatically on all (or selected) monitors for macOS
Script downloads current Bing Daily Wallpaper to ~/Pictures/bing-wallpapers/
and sets it as wallpaper on all your monitors.
-
Copy
com.bing-wallpaper-daily-mac-multimonitor.plist
to~/Library/LaunchAgents/
-
Copy
bing-wallpaper.sh
to~/bing-wallpaper.sh
-
Run
launchctl load -w ~/Library/LaunchAgents/com.bing-wallpaper-daily-mac-multimonitor.plist
in terminal (it can ask for permitions for the first time)
Tip: use com.bing-wallpaper-daily-mac-multimonitor-uhd.plist
for UHD 4K images
Tip: provide parameter -m <monitor number>
to bing-wallpaper.sh
in appropriate .plist file to set wallpaper only on certain monitor
Script bing-wallpaper.sh
is run every 30 minutes and checks if there is a new image on Bing.com. New image is downloaded and set as desktop picture on your all monitors.
Optionally you can edit com.bing-wallpaper-daily-mac-multimonitor.plist
file to run script in different interval or schedule runs on specific time of day. (run launchctl unload -w ~/Library/LaunchAgents/com.bing-wallpaper-daily-mac-multimonitor.plist
edit plist file and again load it)
For More info about launchd see https://www.launchd.info/ Configuration section.
(How install use script without npm see Usage (without npm)
below)
-
First install Node.js https://nodejs.org/en/
-
For getting current Bing Daily Wallpaper to your desktop run in terminal:
npx bing-wallpaper-daily-mac-multimonitor
OR
npm -g install bing-wallpaper-daily-mac-multimonitor
then run in terminal
bing-wallpaper-daily-mac-multimonitor
- For automatic setup of wallpaper every day contine with instructions below
Run ./bing-wallpaper.sh
terminal for a single download of current Bing image.
Add -r UHD
parameter after bing-wallpaper-daily-mac-multimonitor
or ./bing-wallpaper.sh
command:
bing-wallpaper-daily-mac-multimonitor -r UHD
OR
./bing-wallpaper.sh -r UHD
You need to edit crontab in order to run script periodically.
In terminal
export EDITOR=nano && crontab -e
copy and paste crontab script:
MAILTO=""
# min hour mday month wday command
*/30 * * * * bing-wallpaper-daily-mac-multimonitor
Press control + x
then y
and enter
This will run script every 30 minutes (but download new image only when it change).