Quit app when closing last window

Hi I think I have asked this before with no answer. But I see the option to make the red button "Quit App Under Cursor." But that quits the app even if I have 10 windows open. Is there some way (any way at all!) to have the red button close windows as usual if another window is open. But to quit the app when hitting the red button on the last window of an app.

So essentially, instead of an option to make the red button "Quit app under cursor" it would "Quit the app under cursor (only on the last window)."

Alternatively, can better touch tool auto-quit apps that are sitting in my dock without any windows open? Or any other app for that matter.

I have tried Quitter (only works for 10 apps) and I have tried RedQuits which mostly works but sometimes quits apps with multiple windows open. I was hoping BTT had some way to do this!

Thank you for any help!

Imprint | Privacy Policy