I used to have a similar setup at my old place (though without a dock for the laptop, and adding a TV as an occasional tertiary display). While I agree that some sort of smart KVM would be ideal, this is a case where it's best to keep it simple. There's no need to spend $$$ when all you need to do is be smart about what you connect, and press a few extra buttons to switch displays.
My approach was something as follows:
- 4 Port KVM Switch (USB-capable, $20 from newegg)
- 2x Monitors, 1x TV, 2x Desktops, 1x Laptop
- All computers connected via USB to KVM for switching keyboard/mouse. If I were to do it today, I might bypass the KVM and setup QuickSynergy on all machines instead, or in addition.
- Right monitor connected to KVM to switch (VGA) between Desktop 1 secondary display and laptop external output
- Desktop primary output connected via DVI, one to left monitor, one to right monitor
- Desktop 2 secondary display via VGA to left monitor and Tertiary DisplayPort to TV
Both desktops always output to both displays, but each used a different monitor as its primary. I could use the monitors source buttons to quickly switch either monitor between inputs, with the KVM on the second monitor enabling a 3-way switch between the 2 desktops and laptop.
At one point though I actually got annoyed with the KVM, and just used the laptop on its own, and kept 2 sets of keyboard/mice on the table (one for each desktop).
The one feature I wish I had today, was eye-tracking/mind-reading software that automatically switched my keyboard/mouse to the computer+display I'm looking at.