Created
March 14, 2014 00:11
-
-
Save eliperelman/9539770 to your computer and use it in GitHub Desktop.
OS X: Bash function to change the desktop wallpaper across all monitors and spaces. Tested on Mavericks.
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
# 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