I have created a simple Hide All macro using the "Hide All Applications". When I execute it, I would expect to be left just viewing my Desktop. If I happen to have a Finder window open along with the other windows, the Finder is still left standing. I have nothing in my Excluded Preferences. Thanks for your suggestions!
Funny that I was wondering the same thing the other day.
I simply added an additional action, "Hide Front Application", since Finder was being left as the 'only' Front Application, and it works well.
Still doesn't explain why, but does what was required.
@Cassady I would think that your suggestion would work, but I get very odd behavior. When I use the hotkey once, all applications save the Finder get hidden. If I press the hotkey again, the Finder goes away, but the previous application that was open (before the first hotkey press) now appears. I'm even more baffled!
When Keyboard Maestro Hides All Applications it basically switches to the Finder and hides others.
The Finder is very odd with hiding - you don’t need Keyboard Maestro involved to determine this, just switch to the Finder and choose Finder ➤ Hide Finder. Nothing happens. With any other application, the application hides and the next application activates.
And indeed, if you go to the Finder and select Hide Others, then it dims the Hide Finder menu item.
So the whole thing is kind of weird.
Essentially if you think about it, you can't hide all applications because there has to be a front application that is not hidden. You can, apparently, Hide Others and then sort of hide the Finder, even though it doesn't want to. Which is interesting, but still weird.
I think this is because the Desktop is part of the Finder. You can hide the items on the Desktop, but the Desktop must always show.
Finder hides for me.
System info: AppleScript version: 2.7 System version: 10.13.6
Weird. Finder ➤ Hide Finder fails to do anything for me. Mojave 10.14.5.
Yesterday, it was working and hiding Finder.
Today, not so much.
Tomorrow – who knows?
It's obviously trying to teach me something about the unpredictability of life, the universe, and everything.
And macOS [running 10.13.6].
I figured I would just chime in, and confirm that it does work over here, except when it doesn't.
So YMMV (+ MMDV).
Here is an interesting experiment:
- Select Finder while there are other applications visible
- Finder | Hide Finder menu is available. Command-H indeed hides the Finder.
- Open Finder again
- Press Command-Option-H to hide all others. Nothing but the Finder on your Desktop.
- Finder | Hide Finder menu is dimmed. Command-H does nothing
No clean desktop for you!
While visually unappealing, this combination seems to get the job done. It's a little odd to see most of the windows just disappear and to have the Finder window do its Genie thing to the dock. I suppose I can just look away when pressing my keystroke
What if you try ⌘W to close the only Finder window, instead of minimizing it?
The weirdness is probably based on the Finder being a special app that must be available. For example, you can quit the Finder, but it instantly restarts.
tell application "Finder" to quit
This is all a remnant from System 6 (7?) days; Finder is a preferred app that is presumed to be the least necessary state so that a user can act — this precedes, of course, the Dock.
By adding Quit to the Finder’s app menu, or using AppleScript, you can indeed quit Finder and it will stay quit until there is no other running app that presents a Menubar; a5 which point it will auto spawn.
As discovered, you can hide everything, including Finder, as long as at least one app remains open, even if it has no open windows. If you want your macro to work, you will have to select one “faceless”/windowless app to remain unhidden.
Edit: IOW, you have to leave the user with a functional Apple Menu, at a minimum, or macOS will force one.
Thanks to everyone for your suggestions. I would prefer not to close or quit the Finder window, as I would like to use the last location again. Since I have tabbed viewing enabled, I typically have a number of tabs that I would like to keep open. My goal is just to visually clean house from time to time.
Except for the Genie effect on the Finder window, I have been pretty satisfied with the macro as posted.
Im pretty sure you can change the genie effect to scale in the dock system settings. And/or you can select 'reduce motion' in System Preferences -->Accessibility>>Display.