-
-
Save alykat/debf281765db3a0c2e88 to your computer and use it in GitHub Desktop.
NPR dailygraphics launcher from iTerm2
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
tell application "iTerm" | |
activate | |
tell the current terminal | |
activate current session | |
-- launch dailygraphics tab | |
launch session "Default Session" | |
tell the last session | |
set name to "dailygraphics" | |
write text "cd ~/src/dailygraphics/" | |
write text "workon dailygraphics" | |
write text "git pull" | |
write text "fab -l" | |
tell i term application "System Events" to keystroke "d" using {command down} | |
delay 0.5 | |
set name to "webserver" | |
write text "cd ~/src/dailygraphics/" | |
write text "workon dailygraphics" | |
write text "fab app" | |
tell i term application "System Events" to keystroke "d" using {shift down, command down} | |
delay 0.5 | |
set name to "graphics" | |
write text "cd ~/src/graphics/" | |
write text "git pull" | |
tell i term application "System Events" to keystroke "[" using {command down} | |
tell i term application "System Events" to keystroke "[" using {command down} | |
end tell | |
end tell | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FYI I updated to the 3.0.0 build of iTerm and this broke. I wrote a new one. Maybe isn't exactly the same, but gets close enough for me (note my paths are slightly different).