Created
August 2, 2021 12:58
-
-
Save ryan-mooore/45c1878da24171ae96e399266cccd08c to your computer and use it in GitHub Desktop.
One-liner to download and use a random Google Earth View (earthview.withgoogle.com) satellite image as your macOS wallpaper. Must have jq installed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rint=$(($RANDOM % 2608)) && curl -s "https://www.gstatic.com/prettyearth/assets/full/"$(curl -s https://earthview.withgoogle.com/_api/photos.json | jq --arg i $rint '.[$i | tonumber].slug' | sed 's/[^0-9]*//g')".jpg" -o earthview.jpg --output-dir $TMPDIR && osascript -e "tell application \"Finder\" to set desktop picture to POSIX file \""$TMPDIR"earthview.jpg\"" && killall Dock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment