10

I am a software programmer and I almost never reset or shut down my Apple computer.

Over time, I open a lot of windows, and I don't close them, because I am focused on doing other things.

I was wondering if there is an application that will automatically close unused applications for me, but will keep the active applications running?

I'm not afraid to lose data – mostly all important applications ask whether I want to save before they are closed.

I need this because I end up with a severely cluttered desktop and with lots of windows and applications open, that also slow down my computer in addition to being an annoyance.

Hennes
  • 64,768
  • 7
  • 111
  • 168
Andrey T
  • 101
  • 1
  • 3
  • What version of OS X are you using? – slhck Nov 06 '12 at 10:24
  • I am using OS X 10.8.2. – Andrey T Nov 06 '12 at 10:26
  • OS X actually does this for some apps without documents open – it's called *Automatic Termination*. How do you define "unused" and "active"? – slhck Nov 06 '12 at 10:32
  • Unused: applications that weren't in-focus for extended period of time and didn't receive mouse or keyboard input. Active: applications that were in focus and/or received mouse or keyboard input. – Andrey T Nov 06 '12 at 10:35
  • Also, I am speaking only about applications that create window, not background running applications. – Andrey T Nov 06 '12 at 10:36
  • Also, I want this tool to close applications by mimicking clicking of "x" red button in top left corner. This way applications, like Skype will remain running, because pressing "x" on it does not close Skype, but pressing "x" button in Safari and Chrome will close the browsers, which is a good thing. – Andrey T Nov 06 '12 at 10:37
  • I'm gonna say that there's probably no one solution for this. Also, remember that closing a window is not the same as quitting an application (although some applications might quit when the last window is closed). These apps will stay in your Dock. OS X is not a mobile operating system, so it will keep the apps open, but it'll swap out memory of inactive apps for those that need it – so there shouldn't be a performance issue, actually. The better solution would be to train yourself to close windows when not in use, or make use of the multiple desktops OS X offers. – slhck Nov 06 '12 at 11:06
  • Relevant: https://apple.stackexchange.com/questions/252483/what-happened-to-automatic-termination. move to askdifferent? – WHO'sNoToOldRx4Covid-CENSORED May 22 '20 at 19:31

3 Answers3

1

Quitter for Mac

You could try Quitter for Mac.

Quitter is a Mac app that automatically hides or quits apps after periods of inactivity, inspired by my Automatic Social Discipline method. It’s great for minimizing distraction from social apps like Twitter and Slack, news readers, or even your email app.

Unfortunately, you'll need to add rules for each individual app, but that's probably not that big a deal for one-time setup.

If you don't want the program to be entirely quit, like in the case of Skype, you can tell Quitter to just hide that specific app instead of closing it.

Hocus Focus

Alternatively, you could try Hocus Focus.

Hocus Focus automatically hides application windows that have been inactive for a certain period of time, leaving only the applications you’re using visible. It’s a great way to keep your screens clutter free and your mind focused on the task at hand.

Nathan Arthur
  • 155
  • 10
0

Not really a "User" answer, but as you described yourself as a programmer:

It seems like it should be straight forward to write a very simple AppleScript (or more generally OSAScript, which supports a variety of languages such as Python and JavaScript) that polls the active application and does a Tell Application X to Quit for any it hasn't seen in a while.

This has the benefit of being roughly equivalent to an interactive Cmd-Q so the application will attempt to exit cleanly in its normal manner.

Lake
  • 421
  • 3
  • 16
0

To disable Automatic Termination in Mac OS X launch Terminal and enter the following defaults write command:

defaults write -g NSDisableAutomaticTermination -bool yes

Relaunch apps that use auto-termination for changes to take effect.

kenorb
  • 24,736
  • 27
  • 129
  • 199
pierre
  • 11