Is there any functionality in Chrome, iTerm2, or a keyboard shortcut app that will let me open a new window (Chrome or iTerm2) in a global environment?

It should open a new window regardless of whether previous windows exist or not.

  • Cmd-N opens a new Chrome window, are you looking for something else? – nohillside Jun 14 '12 at 20:35
  • Yes, Cmd-N only works when you have Chrome focused. I'm looking for a global keyboard shortcut that works even if you have a different application focused (say, Finder). – volni Jun 14 '12 at 22:37
  • Do you want it to open a window in Chrome or in iterm2? The answer will obviously be different depending on what you want it to do. – Daniel Jun 15 '12 at 3:53
  • One keyboard shortcut for Chrome, another one for iterm2. I'm guessing the process is the same. – volni Jun 15 '12 at 18:08

To make a single hotkey always create a new Chrome window, launch Automator. Tell it to create a new Service Have the service take no input. Assign a single action to the service: Run AppleScript (in the Utilities list of actions).

Here is the AppleScript:

on run {input, parameters}
    tell application "Google Chrome"
        delay 0.1
        make new window
    end tell
    return input
end run

Save the service with a name like "New Chrome Window". Then, in System Preferences assign an unused keyboard shortcut to the service. You can then create a new Chrome window no matter what application you are in.

To improve the service substantially, replace "Google Chrome" with "Safari". :-)

To create a new window in a different scriptable app, replace "Google Chrome" with the name of the app you want to create a new window.

enter image description here

  • Is there a way to tell Chrome to activate just the new window that was created and not the whole application? – volni Jun 16 '12 at 18:47
  • 1
    That would be the Holy Grail for many AppleScripters, and the answer appears to be sadly, no. I'd love to be wrong about that, but I've been hunting a long time and there is no obvious way to do it, and I've ruled out a lot of the non-obvious things to try also. – Daniel Jun 16 '12 at 19:20
  • This answer should include the iTerm2 snippet from Lauri's answer as well. – volni Jun 18 '12 at 4:42
  • I use multiple spaces and this causes it to switch to a space where chrome is already open and open a new window there. I fixed it by removing the two lines "activate; delay 0.1", which works for me since I always have chrome open anyways. – vish Jul 3 '13 at 22:41

Save these scripts somewhere in AppleScript Editor and assign shortcuts to them with an application like Alfred or FastScripts.

make new window or make new document often opens a new window:

tell application "Google Chrome"
    make new window
end tell


tell application "iTerm 2"
    tell (make new terminal)
        launch session "Default"
    end tell
end tell

There's a bug where shortcuts for Automator services don't always work until the services menu has been shown once from the menu bar. Automator services also have small delays and they don't work when the frontmost application doesn't have a menu bar or a services menu.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .