Single App Mode: How to automatically hide all but the active application in OS X.

automatically hide all but the active application in OS X
To get back to my ‘how to disable’ defaults-write series, here’s a good one that I use myself whilst performing demos in my training courses.
‘Single App Mode’ is the ability to force the Finder to only display the active application and automatically hide all the others. This is perfect for demos and within my training courses I often use this feature to focus the students attention to just the application I am demonstrating without the other apps I have open being displayed.
To add this feature to your Mac, all you need to do is tell the Dock to enable ‘Single App Mode’. Using the Terminal Application from /Applications/Utilities, enter the following command:

defaults write com.apple.dock single-app -bool true;killall Dock

The Dock should quit and reopen in Single App Mode. You may initially see nothing different, however, if you click on any app in your Dock to open it, you will notice that all the other open apps are automatically hidden as the new app opens.
If you look back at your Dock again, you will notice that all the hidden apps still have their indicator lights on, but are effectively hidden from view.
If you want to revert back to the default setting and enable ‘Multiple App Mode’ again, just enter the following command:

defaults write com.apple.dock single-app -bool false;killall Dock

Disclaimer:
While the author has taken care to provide our readers with accurate information, please use your discretion before acting upon information based on the blog post. Amsys will not compensate you in any way whatsoever if you ever happen to suffer a loss/inconvenience/damage because of/while making use of information in this blog.
This feature has been tested using OS X v10.8.4 which was the latest OS X release at the time of writing.