Skip to content

Instantly share code, notes, and snippets.

@mitcdh
Created April 3, 2017 00:49
Show Gist options
  • Save mitcdh/f055b1ef824873a2633ed5c74e1d6eec to your computer and use it in GitHub Desktop.
Save mitcdh/f055b1ef824873a2633ed5c74e1d6eec to your computer and use it in GitHub Desktop.
New Terminal window (assuming new window is created on app start)
on iTermIsRunning()
tell application "System Events"
return (count of (application processes whose name is "iTerm2")) is not 0
end tell
end iTermIsRunning
if iTermIsRunning() then
tell application "iTerm"
activate
create window with default profile
end tell
else
tell application "iTerm"
activate
end tell
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment