Crackful thinking: multiple monitors and auto focus

I don’t very often use multiple monitors, but when I do it always takes a while for my head to come to terms with how focus works. I’ll do something in a window on one monitor and then look at the other monitor and start typing before realising that the window in the first monitor still has focus.

It would be a cool hack if my head could be tracked to figure out which monitor I’m looking at and focus the last active window displayed on it.

I have a webcam integrated into the display of my laptop and the Monitors tool knows where my screens physically are, so some of the parts would be.

I don’t know what you’d do in the case that a window is displayed on both screens at once and it would be annoying in the case that you want to type into a window on monitor 2 whilst looking at monitor 1.