Oh yeah I have one of those no name brand USB switching hubs, they are great. Comes with several "illegal" USB-A male to male cables, which I find funny. If your monitor supports it you can also switch inputs from software, and you have a complete KVM setup without the ridiculously expensive KVM box.

I have the same setup and use the following software to send the switch signal to the monitor.

https://github.com/haimgel/display-switch