Skip to content

Instantly share code, notes, and snippets.

@mdaley
Created November 27, 2014 23:20
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 mdaley/f6b7daa5c2ced8847531 to your computer and use it in GitHub Desktop.
Save mdaley/f6b7daa5c2ced8847531 to your computer and use it in GitHub Desktop.
new term
-- apple script to create a terminal when run for the first time and create an additional
-- terminal on every subsequent call. Bind to ctrl-alt-t using apptivate and then you have
-- the same terminal creation as in ubuntu; which is what I'm used to.
on run {input, parameters}
if application "iTerm" is not running then
tell application "iTerm"
reopen
activate
end tell
else
tell application "iTerm"
activate
set myterm to (make new terminal)
tell myterm
launch session "Default"
end tell
end tell
end if
end run
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment