Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
OS X: Bash function to change the desktop wallpaper across all monitors and spaces. Tested on Mavericks.
# Usage:
# wallpaper path/to/image.png
function wallpaper() {
image=`echo $(cd $(dirname $1); pwd)/$(basename $1)`
cd /System/Library/CoreServices
sudo rm -f DefaultDesktop.jpg
sudo ln -sf $image DefaultDesktop.jpg
sudo rm ~/Library/Application\ Support/Dock/desktoppicture.db
killall Dock
cd -
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.