Skip to content

Instantly share code, notes, and snippets.

@dannydb
Created March 6, 2015 20:13
Show Gist options
  • Save dannydb/74399d474ed14da3637b to your computer and use it in GitHub Desktop.
Save dannydb/74399d474ed14da3637b to your computer and use it in GitHub Desktop.
Dailygraphics iTerm
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 "1-dailygraphics"
write text "cd ~/Projects/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}
write text "cd ~/Projects/dailygraphics/"
write text "workon dailygraphics"
write text "fab app"
tell i term application "System Events" to keystroke "d" using {shift down, command down}
write text "cd ~/Projects/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
-- shift focus to dailygraphics tab
repeat with mysession in sessions
tell mysession
set the_name to get name
if the_name contains "1-dailygraphics" then
select mysession
return
end if
end tell
end repeat
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment