I have a similar set up. I got some Thunderbolt dock for the mac and a USB input switcher that I connect all my peripherals to and can press a button to switch between the Macbook dock and my Windows PC. The only unoptimized part is I just use the DisplayPort input on my monitor for the PC and the HDMI input to the Macbook dock. So to swap all I have to do is press the button on the USB switcher and then change my monitor's input setting. Not quite one click switching, which could be done, but it's two clicks and cheaper than most KVM switches I've seen.