Last active
December 12, 2015 07:29
-
-
Save jclem/4737458 to your computer and use it in GitHub Desktop.
Shell script for starting the Gifify process from Alfred
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
name=gifify_`date +%s` | |
echo -ne $name | pbcopy | |
osascript <<EOF | |
tell application "System Events" | |
set visible of process "Terminal" to false | |
end tell | |
tell application "QuickTime Player" | |
activate | |
new screen recording | |
tell application "System Events" to key code 49 | |
end tell | |
repeat | |
tell application "System Events" | |
if "QuickTime Player" is not in (name of application processes) then exit repeat | |
end tell | |
end repeat | |
EOF | |
gifify -o $HOME/Desktop/$name -u $HOME/Desktop/$name.mov | |
echo 'Breaks without this.' | |
growlnotify -t gifify -m "Upload complete" | |
killall Terminal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Don't use this if you ever open Terminal.app for any other reason. This assumes that you have Alfred configured to use Terminal.app as its default application for running shell scripts, and kills the process at the end.
gif
in Alfred).You'll see a growl notification when its complete, and your clipboard will have a CloudApp URL in it.