No Clamshell is a macOS status bar app to disable the clamshell mode. It does so by putting the machine to sleep when the builtin display is disconnected (covering closed lid situation)
No Clamshell supports launch at login. It can be enabled in the No Clamshell menu from the status bar