Skip to content

Instantly share code, notes, and snippets.

@mocon
Created February 20, 2019 20:39
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 mocon/18cfc15b63f0c333cd30f53b7137013f to your computer and use it in GitHub Desktop.
Save mocon/18cfc15b63f0c333cd30f53b7137013f to your computer and use it in GitHub Desktop.
iTerm2 example script (save in `~/Library/Application Support/iTerm2/Scripts/test.scpt`, trigger with `Scripts --> test.scpt` in iTerm2)
tell application "iTerm"
tell current session of current window
split vertically with default profile
split vertically with default profile
end tell
tell first session of current tab of current window
write text "cd ~/somewhere"
write text "run some command"
end tell
tell second session of current tab of current window
write text "cd ~/somewhere"
write text "run some command"
end tell
tell third session of current tab of current window
write text "cd ~/somewhere"
write text "run some command"
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment