Skip to content

Instantly share code, notes, and snippets.

@null-dev
Last active July 7, 2018 02:52
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 null-dev/8d7e7c6e4d6c0bedac598d8b541a0c88 to your computer and use it in GitHub Desktop.
Save null-dev/8d7e7c6e4d6c0bedac598d8b541a0c88 to your computer and use it in GitHub Desktop.
Applescript to open a new iTerm2 window
if application "iTerm" is running then
tell application "System Events"
tell UI element "iTerm" of list 1 of application process "Dock"
perform action "AXShowMenu"
click menu item "New Window (Default Profile)" of menu 1
end tell
end tell
else
tell application id (id of application "iTerm")
reopen
activate
end tell
end if
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment