AutoHotkey: Scratchpad

Another day, another hack. This AutoHotkey snippet preserves the last window you minimized with Win + Down and allows you to quickly unminimize it with Win + Shift + Up:

global lastWindow
    WinGetTitle, lastWindow, A
    WinMinimize, %lastWindow%
    WinActivate, %lastWindow%

Update 06/11/2019: the script was slightly tweaked to handle apps with more than one window better.