KB/mouse -> switch -> desktop/monitor
Monitor <-> laptop (usb-c)
Desktop -> monitor (HDMI)
The downsides are that it only supports 45W charging, and you can't really use dual monitors.
Ideally I could use a KVM so everything is switched in one device. But USB switching is cheap and reliable (my switch cost $25 and has been rock solid), whereas the cheapest KVM I could find to do this cost $150, doesn't support 144hz, is stuck on hdmi 2.0, etc.