Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/osascript
- -- by decky (cosstropolis.com)
- on run argv
- set picOnline to (item 1 of argv)
- set picOffline to (item 2 of argv)
- set picOfflineCopy to "NEW" & picOffline
- set picFolder to "~/Documents/dev/changedesktop/"
- set output to (do shell script ("curl -I " & picOnline))
- if "200 OK" is in output then
- do shell script ("curl " & picOnline & "> " & picFolder & picOffline)
- else
- return
- end if
- do shell script("python -c \"import os; os.chdir(os.path.expanduser('" & picFolder & "')); import deckyGIF; deckyGIF.randomize('" & picOffline & "', '" & picOfflineCopy & "', 13, 36)\"")
- tell application "Finder"
- set desktop picture to file {"Macintosh HD:Users:david:documents:dev:changedesktop:tran.gif"}
- set desktop picture to file {"Macintosh HD:Users:david:documents:dev:changedesktop:" & picOfflineCopy}
- end tell
- end run
Add Comment
Please, Sign In to add comment