In macOS, it's possible to minimize windows to the dock with Command+m. However, there's no shortcut to "unminimize" windows which is annoying when you're trying to use the mouse as little as possible.
To fix this, on my first pass, I created a macro that simply goes to a location and clicks, but it isn't very useful because the size of the icons varies depending on how many windows you have in the dock (e.g. more = smaller app icons, with reduced width between them).
Ideally, I'd be able to indicate which window I want to unminimize in a numbered fashion, where e.g. 1 means the window immediately beside the trash, 2, means the window 2 over from the trash, etc. Alternatively, because the order of the windows in the dock is based on the order in which they were minimized, forming a sort of stack, an alternative would be to have 1 mean the most recently minimized window, 2 would mean the second most recently minimized window, and so on. Anyone know how this might be accomplished with Keyboard Maestro?
Note, I'm open to other ways of doing this, but here are some that I've considered and why they don't quite do it for me:
Using hide instead of minimize (as argued for here). This isn't a great solution if you want to hide some windows from one particular program, but not others. For example, when you have hundreds of browser tabs open for several different projects and just want to keep the windows and tabs open for the project you're currently working on. Also, when you minimize windows, you can cycle through just the non-minimized windows with Command+`, but this isn't possible with hide.
As described here, control clicking the app's dock icon and selecting the minimized window (indicated with a diamond). The issue with this is that the app's dock icon can move around based on the number of windows you have minimized (assuming you haven't enabled the Minimize windows into application icon option). Also, the windows that show up in that menu are sorted alphabetically by the title of the tab you happened to be on when that window was minimized, so it's highly variable.
Using App Exposé (as described here). This approach isn't horrible but it requires at least a three-finger down swipe on the trackpad before you can use the arrow keys to select the window you want to unminimize. A pro regarding this approach is that the minimized windows are displayed in the order they were minimized. A con is that it's application specific, so if you want to unminimize applications from the dock from different programs, you have to first activate the programs you want, then swipe down, and then move to the window you want to unminimize, which is fairly tedious. Also, I haven't found a Keyboard Maestro action to simulate a three-finger downswipe to launch App Exposé.
Use a shortcut for the Mission Control Application windows feature, as described in the second link above. This option is pretty close to perfect except that as with #3, it's application-specific and requires you to key over to the specific window you want to unminimize.