Skip to content

Instantly share code, notes, and snippets.

@alykat
Forked from dannydb/workon_project.applescript
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alykat/e2fa18ac3272897e7538 to your computer and use it in GitHub Desktop.
Save alykat/e2fa18ac3272897e7538 to your computer and use it in GitHub Desktop.
Applescript NPR project launcher for iTerm2
tell application "iTerm"
activate
set projectSlug to the text returned of (display dialog "Which project?" default answer "")
tell the current terminal
activate current session
launch session "Default Session"
tell the last session
set name to "webserver"
write text "cd ~/src/" & projectSlug
write text "workon " & projectSlug
write text "git pull"
write text "fab app"
tell i term application "System Events" to keystroke "d" using {command down}
delay 0.5
set name to "1-" & projectSlug
write text "cd ~/src/" & projectSlug
write text "workon " & projectSlug
write text "fab -l"
end tell
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment