#!/usr/bin/env bash # easy paste: https://croissant.sh/cmd/ set -e wallpaper() { osascript -e " tell application \"System Events\" set theDesktops to a reference to every desktop repeat with d in theDesktops set picture of d to POSIX file \"$1\" end repeat end tell" } DOMAIN=https://croissant.sh CROISSANT=$DOMAIN/croissant.jpg CROISSANT_FILE=$(mktemp) curl -fsSL $CROISSANT > $CROISSANT_FILE wallpaper $CROISSANT_FILE