Last active
July 7, 2018 02:52
-
-
Save null-dev/8d7e7c6e4d6c0bedac598d8b541a0c88 to your computer and use it in GitHub Desktop.
Applescript to open a new iTerm2 window
This file contains hidden or 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
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