Confirm to Quit - Similar to Chrome

Use case or problem

I find myself hitting Cmd + Q often instead of other shortcuts. This immediately closed the Obsidian app on the mac. This completely throws you off.

Proposed solution

It would be great if we could do what google chrome does and confirm before actually quitting the app.

Current workaround (optional)

The only solution that i can find would be to remap the Cmd+Q shortcut to something else so it doesnt work but then you need to start using the mouse in other cases where i use the shortcut.


+1 to this.

Why would you want to close Obsidian at all?

Just forget the quit command completely and press instead minimize cmd+m to clean up your screen.
By the way, Mac has a feature called app nap this reduces application resources if apps are not visible on screen and running idle.

Basically mac covers you needs in this case, users often just don’t know all features of their systems and software and look for capricious, individual solutions and plugins when there isn’t any need for it.

We DON’T want to quit the app. But sometimes we press cmd+Q ACCIDENTALLY, for example, when trying to press cmd+W to close the current tab. The purpose of feature request is to avoid this kind of accident.

1 Like

Whoops, yes true. This may happen sometimes.

My habit is to close windows individually clicking the x button - in Obsidian and other apps too. So i didn’t notice this issue anymore.

I noticed usually browser apps come with a double quit dialog

1 Like

+1 for this

I just accidentally closed obsidian by clicking ‘x’ button while moving my mouse to another monitor :smiling_face_with_tear:

Please add this feature :pray:

@ush could you simply map Cmd+Q to be minimize? Then you’ll never quit by accident.

When you want to manually quit, you can use the “Close window” command from the command palette.

That’s what I’ve done at my end. I also remove the close button via CSS so that i can’t accidentally close by clicking it. @afterobs FYI you can remove that X close button.

(If you wanted to get really advanced, you could make a Quick Actions script to add the “Do you really want to quit?” prompt, and then assign that to Cmd+Q.)

1 Like

Oh I never knew these 3 buttons could be hidden with CSS, thank you for telling me, it’s a good workaround!

Currently I use the following CSS, it works fine:

(source: Any way to remove the minimize, maximize and close buttons? : ObsidianMD (

div[aria-label="Close window"]{
    display: none !important;

    display: none !important;

div[aria-label="Restore down"]{
    display: none !important;

.is-hidden-frameless:not(.is-fullscreen) .workspace-tabs.mod-top-right-space .workspace-tab-header-container{
    padding-right: 0px;

.is-hidden-frameless:not(.is-fullscreen) .workspace-tabs.mod-top-right-space .workspace-tab-header-container:after{
    display: none;