Take a screenshot of the current macOS window with a single click or keyboard shortcut

A macOS shortcut that copies a screenshot of the current app's frontmost window to the clipboard.

To make the shortcut run from a keyboard shortcut, click the 'i' button at the top of the sidebar, then the 'Add Keyboard Shortcut' button, and then press your keyboard combination.

You have to wait some time for the keyboard shortcut to be activated systemwide (less than a minute), but if you restart the app you want the screenshot from, it will work immediately.

Get the shortcut here.