I use my Nexdock pretty often these days. I always disable suspend and screen blanking and only use the display of the Nexdock. That’s a lot of mouse clicks every time.
Does anybody know the command to use on the CLI to achieve the same thing?
Then I can just script it.
Not my area but you may find some help from Suspend - Debian Wiki (PureOS is Debian based)
See also (regarding the suspend part of the request): Login via SSH && suspend - #10 by dos
Automatically enabling/disabling displays when connecting/disconnecting them was previously discussed. I’ve added a comment with my own experiences including using gnome-session-inhibit to disable suspend.
gnome-session-inhibit