Minimize all windows on Mac OS
I have the issue that I tend to keep plenty of windows open on my Mac. This issue persists until my next reboot, but in some cases, I just get overwhelmed by all the mess. Unfortunately, there is no built-in feature for macOS to minimize all windows at once. But there is a simple way to do it with AppleScript.
The script
#You can use this AppleScript to minimize all windows. You might get asked for accessibility permissions the first time you run it.
As I am an Alfred user, I created a small workflow to execute this via Spotlight. You can download it here. Also check out my Alfred VS Code extension.
Other solutions
#I stumbled upon this superuser thread asking for the same thing. The answers point out the exposé and the Command+Option+H+M
key combo. The later one unfortunately doesn’t work for me, as it only hides the windows without them appearing in the dock as minimized windows.