Skip to content

Instantly share code, notes, and snippets.

@LostKobrakai
Forked from willurd/ set-wallpaper.sh
Created November 20, 2013 21:06
Show Gist options
  • Save LostKobrakai/7571037 to your computer and use it in GitHub Desktop.
Save LostKobrakai/7571037 to your computer and use it in GitHub Desktop.
read -e IMAGE;
defaults write com.apple.desktop Background "{default = {ImageFilePath='$IMAGE'; };}"
killall Dock

Instructions

  1. Open Automator and create a new Service
  2. Set "Service receives selected" to "image files"
  3. Add a "Run Shell Script" action to the workflow, remove the default script contents, and paste the set-wallpaper.sh script into it
  4. Save as "Set as Wallpaper"

The service should then be available to you when right-clicking image files. Right-clicking an image file (png, jpg, etc) in the Finder and choosing "Set as Wallpaper" will set that image as the Desktop Background image for all open Spaces. No need to quit apps or delete Spaces!

You can use an app like Services Manager to organize your Finder context menus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment