disable lid sleep in mojave I used to use InsomniaX but it doesn't work for me right now.

I want to stop my MacBook from sleeping when I close the lid.
Use the latest version of KeepingYouAwake. It works pretty well in macOS Mojave. It's a GUI based wrapper around Apple's caffeniate command line utility. All current versions of macOS ship with caffeniate tool built-in. So, it should be safe to use.

Courtesy: https://github.com/newmarcel/KeepingYouAwake/#how-does-it-work

For installation:


You can download latest version from here, or
Install it using Homebrew by running: brew cask install keepingyouawake


Reference: https://github.com/newmarcel/KeepingYouAwake/#installation