Notes app is one of those odd ones that if you close all the windows it quits the app vs staying open with no windows.
I did a workaround where I rerouted the close command to instead hide. This works great if you only ever use the main app window (3 pane layout) but not so great if you like to open notes in dedicated windows. You still want the close command to work there.
Is there any way to make this work more like a normal app with KBM? The close window command is the same for close sub-windows as the main window (which then actually just quites the app).
For what it's worth Contacts also does this. Any solution would be applicable to a decent number of the built in Apple softare
Sorry, I don't have a direct solution for Apple Notes.
But why use inferior Apple Notes?
Have you tried Evernote?
Not perfect, but much, much better than any other serious note app. In fact, I classify it as a Personal Information Manager (PIM).
If you decide to go with Evernote, there is an AppleScript that will transfer your Apple Notes to Evernote.
And I have lots of AppleScripts that highly automate and customize Evernote.
This is an instance of Apple not following its own guidelines. Usually, closing an app window will only quit the app when the app can only have one window. System Preferences is an example of this implementation applied using Apple logic. Obviously, Notes doesn't adhere to this logic.
The macro shown below will achieve your goal of closing sub-windows with the caveat that the main app window would have to be the last one you attempt to close in order to prevent Notes from quitting. In KM, this should probably be in a Macro Group dedicated to Notes so it doesn't cause unexpected behavior in other apps.
The "trick" here is that the File > New Folder command is only enabled when the main Notes window is at the front, so Command-W will work as usual when a note is open in its own window, but Command-W will do nothing when the main Notes window is frontmost.
Long time Evernote users (10+ years) and I have to 100% disagree with you here . Apple Notes is a serious contender here with the recent changes (over past 2-3 years) to the app. I plan to do a full write up at some point (on the Sweet Setup).
It does a lot of the most important things Evernote does and has deeper integration in the OS (both MacOS and iOS) that give it an unfair advantage IMO.
Also it's fast, like super fast. Search is great and also does full OCR in PDF/images.
This is absolutely brilliant - works as described!
This logic could be applied to a lot of other use cases. Thanks for sharing!
Added macro here (essentially the same but has the hide command).
Only close sub windows.kmmacros (3.1 KB)
Well, we will probably have to agree to disagree on that. I too have been actively using Evernote for 10+ years. It seems to me that Evernote has many more useful features than Apple Notes. One of the most important is extensive AppleScript support.
But I look forward to your review comparing the two. Please make a new topic here when your review is available.
I'll stop here so I don't further make an off-topic post.