I designed this cupholder for my desk/gaming chair after spilling water way too many times (on Xbox so not at a desk). You can live without fear of spills too with this model.
NOTE: This attaches to an arm tube that has a 1.5'' diameter. I included the original Fusion 360 files in case anyone would like to remix for different mounting points.
I printed the main clamp with PETG (PLA would probably be fine) @ 20% infill and 4 walls for added support. Assemble with 2 M4x20 screws and 2 M4 nuts.