Skip to content

Instantly share code, notes, and snippets.

@yumu19
Created January 29, 2015 13:11
Show Gist options
  • Save yumu19/2885a94204c832b5352b to your computer and use it in GitHub Desktop.
Save yumu19/2885a94204c832b5352b to your computer and use it in GitHub Desktop.
Shell Script to Change Wall Paper of Mac
#!/bin/bash
i=0
j=1
while true
do
command="/usr/bin/osascript -e 'tell application \"Finder\" to set desktop picture to POSIX file \"/Users/yumu/Desktop/img/img${i}.png\"'"
if [ -e /Users/yumu/Desktop/hoge/img${j}.png ]; then
echo ${command}
eval ${command}
i=`expr ${i} + 1`
fi
j=`expr ${i} + 1`
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment