I haven’t really done this until now, but I figured I’d share how I worked around my issues.
Since I use my new 2017 Macbook Pro as a desktop & laptop, I don’t want to constantly charge the battery while I have it docked. The problem is that by default MacOS sleeps when the laptop lid is closed. This is a problem when you don’t want it open & just want to use an external monitor connected via HDMI (through an HDMI -> USB-C adapter) or USB-C directly. After searching around for a bit, I found a free utility app that helps with this, named “InsomniaX“. It doesn’t come in a dmg file, just a heads-up. It’s packaged in a tar.gz tarball which can be decompressed using archive utility. That’ll drop it into the same directory as the tarball, and you’ll drop and drop it to your Applications folder.
It’s very spartan and almost invisible unless you’re looking for it. It sits in the tool bar on top, and looks like a crescent moon. The drop-down menu appears like this when clicked:
That pretty much sums it up. As you can see, I selected “Disable Lid Sleep”, and I am operating primarily on my external monitor as I would when plugged in. The difference when using the power adapter is there is a selection in the Energy Saver section of System Preferences that reads, “Prevent computer from sleeping automatically when the display is off”. If desired, InsomniaX also has selections in the Preferences area to disable lid sleep while on AC along with starting the application on login.
Anyway, it’s a neat little utility and does what it’s supposed to do. Always nice to share those things when you run across them. Have a great one!