Obsidian Minimize on close plugin

I have created a plugin that reproduces the desired behavior on macOS. The plugin can be configured to produce the mac behavior also on Windows and Linux. In addition, you can configure hotkeys for the two available commands, (1) to minimize to icon and (2) to exit the app. Precise explanation is provided on the GitHub page: GitHub - alberti42/obsidian-minimize-on-close: Minimizes Obsidian window to icon when closing the last open pane

I have also submitted a request to make it into the community plugins. Here you can monitor the state of the request: Add plugin: Minimize on Close by alberti42 · Pull Request #4240 · obsidianmd/obsidian-releases · GitHub

1 Like

Hey @andrea82, thanks so much for putting in the effort to make this plugin. I tried it out, but unfortunately it doesn’t add the behavior that people are talking about in this thread. When you press Cmd-w on macOS with no other windows open, the last window should close but the app should keep running in the background. What your plugin does is minimize that last window instead of completely closing it. This is the same as pressing the Cmd-m (for ‘minimize’) shortcut. Minimizing is something else than closing.

The plugin @joriswvanrijn made comes a bit closer but unfortunately also has two quirks: when either of the sidebars are selected Cmd-w also closes the active plugin instead of the whole window. To achieve that you need to have the focus on the document window. Also, when clicking on the minimized Obs icon again it takes quite a while before the Vault is loaded again (it takes about as long as a restart).

Thanks for testing the plugin. I am not sure though I understood your point.

With my plugin, you can press Cmd-w to close all open tabs. When the last one is closed, then Obsidian minimizes, but it still runs in the background. It is true that without the plugin, after having close all tabs by pressing Cmd-w, one can press Cmd-m to minimize the window.

My goal was to make a simple plugin that minimizes effort of the user and distractions, and just rely on established muscle memory of Mac users, who expect a certain behavior.

Perhaps on a related note, I recently wanted to modify the behavior of when we click on the red button in the upper left corner. This should minimize Obsidian instead of closing it. Of course one can press on the yellow button instead of the red, but for some reaons, in Apple apps, the red button has become effectively identical to the yellow button. I opened a new thread to discuss this.