Skip to content

Instantly share code, notes, and snippets.

@brettbuddin
Created December 11, 2015 13:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brettbuddin/b016036edbcc42850acf to your computer and use it in GitHub Desktop.
Save brettbuddin/b016036edbcc42850acf to your computer and use it in GitHub Desktop.
#!/bin/bash -eu
WALLCAT_PATH=${WALLCAT_PATH:-$HOME/Pictures/Wallcat}
CURRENT_IMAGE=$(osascript -e 'tell app "finder" to get posix path of (get desktop picture as alias)')
CURRENT_IMAGE_FILENAME=$(basename $CURRENT_IMAGE)
mkdir -p $WALLCAT_PATH
cp $CURRENT_IMAGE $WALLCAT_PATH/$CURRENT_IMAGE_FILENAME
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment