Created
November 14, 2013 22:14
-
-
Save ianbattersby/7475232 to your computer and use it in GitHub Desktop.
Alfred: Bind hotkey to iterm2 new window
This file contains 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
on alfred_script(q) | |
if isAppRunning("iTerm") then | |
tell application "iTerm" | |
set myterm to (make new terminal) | |
tell myterm | |
set mysession to (make new session at the end of sessions) | |
tell mysession | |
exec command "/bin/zsh -l" | |
end tell | |
end tell | |
activate | |
end tell | |
else | |
activate application "iTerm" | |
end if | |
end alfred_script | |
on isAppRunning(appName) | |
tell application "System Events" to (name of processes) contains appName | |
end isAppRunning |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment