lidless

Clamshell mode without closing the lid.

Turns the built-in MacBook display off whenever an external monitor is connected, and restores its previous brightness when you unplug.

What macOS gets wrong

Nothing turns the built-in screen off for you. macOS has no option to switch off the built-in display when an external monitor is connected. The only automatic way is to close the lid.

Turning it off by hand is a chore. It takes several presses of the brightness key, or a drag of the brightness slider all the way down: a routine nobody asked for, every time you dock.

It doesn't last. After the Mac wakes from sleep, macOS lights the built-in screen again, and you do it all over.

What lidless does

Dark when docked

Plug in an external monitor and the built-in panel's backlight goes off, with the lid still open.

Bright again when you unplug

Disconnect and the panel comes back at the brightness it had before, and goes dark again on wake while docked.

Never fights you

Brightness is only set when you dock or undock, so adjusting the built-in panel by hand is left alone. Stopping the service relights the panel.

Small on purpose

One thing to know

The panel goes dark but stays a display as far as macOS is concerned, so in extended-display mode the pointer and windows can still wander onto the black screen. Mirroring the built-in display to the external one avoids it.

Install

macOS 13 or later, on Apple Silicon or Intel. In Terminal:

curl -fsSL https://raw.githubusercontent.com/np25071984/lidless/main/install.sh | sh

Or with Homebrew:

brew trust --tap https://github.com/np25071984/lidless
brew tap np25071984/lidless https://github.com/np25071984/lidless
brew install lidless
brew services start lidless

It starts at every login from then on. Upgrading, uninstalling and building from source are in the README.