Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I like having the minimal number of applications open in OS X, because then the tab switcher will not be clogged with "unused" apps. Hence, it'd be nice if I could configure Chrome to close after the last tab has been closed.

It is sub-optimal to remember to use Quit q "if I'm on the last tab", because there might be another window in the background (which I'd accidentally close), and it's just another thing to remember (closing the current window is an easier decision -- do I need the web page I'm looking at up?).

How can I ensure Chrome is terminated after its last tab and window has been closed?

share|improve this question
I think this is a situation in which you'll need to modify you workflow a bit. Merging all windows comes to mind. – ephsmith Jul 11 '12 at 18:40

I'll go ahead and make the case for modifying your workflow to fix your problem. This will solve your problem as long as you aren't philosophically opposed to the change.

If you keep all your windows merged (i.e. all your Chrome windows are simply tabs), you will know when you are closing the last window. This also gives you some other navigation shortcuts as well.

Convenient Keyboard Shortcuts

  • Close Tab: w
  • Next Tab: }
  • Previous Tab: {

These commands plus your q to close can make life pretty simple if your working with merged windows. You'll know if you're on the last tab in this case and be able to just close the application instead of closing the tab.

This answer isn't meant to dodge your real question, it is just an approach that fits with Chrome's apparent interface design on Mac OS.

Toward Changing Chrome's behavior

One potential approach to getting exactly what you want is to create an Automator action that would accomplish what you want. I'll leave this approach to those more experienced with Automator and Along that line of thinking, a service that uses AppleScript may be an option. Chrome supports AppleScript and this vague Google article has me thinking one could

  1. Check the length of the BrowserList cited in the article
  2. Close the Application if the list of windows is 1, otherwise close the window.

The resulting service could then be assigned to a keyboard shortcut. See Step 5 in this article for how to do that.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.