Turn individual Mac displays on and off, like blanking your MacBook's built-in screen while you work on an external monitor.
- Per-display on/off switches for the built-in display and every connected external monitor.
- Really off, not just dimmed. A disabled display is removed from the desktop, so windows, the Dock and the menu bar move to your other screens.
- Built-in display safety net. If the built-in display is off when your last external monitor is unplugged, GoDark turns it back on so you're never left without a screen.
- Nothing is permanent. Changes last only for the current session, so logging out or restarting turns every display back on. Quitting GoDark also turns the built-in display back on.
- Remembers display names, even while a display is off and macOS no longer reports it.
- macOS 26.6 or later
- Xcode 26 or later (to build)
- Launch GoDark.
- Turn off the switch next to a display to disable it, and turn it on to bring the display back.
- You can close the window and GoDark keeps running so the safety net stays active. Click its Dock icon to open the window again.
GoDark won't let you turn off your last active display.
Grab the latest GoDark-<version>.dmg from the Releases page, open it and drag GoDark to Applications. Releases are not notarised, so macOS blocks the first launch. See First launch on another Mac.
git clone https://github.com/dnafication/GoDark.git
cd GoDark
open GoDark.xcodeprojThen press ⌘R in Xcode, or build from the command line:
xcodebuild -project GoDark.xcodeproj -scheme GoDark buildSigning uses the team set in the project, so choose your own under Signing & Capabilities. See the developer guide for building, running and relaunching from the terminal.
Contributions are welcome. Please read CONTRIBUTING.md first, especially the notes on the built-in display safety net. Report security problems as described in SECURITY.md.
GoDark is released under the MIT licence.
See Distributing GoDark below for creating a .app or .dmg.
macOS doesn't offer a public API for turning a display off, so GoDark uses two private CoreGraphics functions:
| Function | Purpose |
|---|---|
CGSConfigureDisplayEnabled |
Enables or disables a display |
CGSGetDisplayList |
Lists every display, including disabled ones |
To WindowServer, disabling a display looks the same as unplugging it. Because GoDark uses private API, it can't be distributed on the Mac App Store, and a future macOS update could break it.
My built-in screen stayed off. Log out or restart, and every display comes back on. You can also quit GoDark, which turns the built-in display back on.
Logs. To see what GoDark did, run:
/usr/bin/log show --last 10m --info --predicate 'subsystem == "com.dnafication.GoDark"'The icon is generated by scripts/make_icon.py, which needs Pillow:
pip3 install pillow
python3 scripts/make_icon.pyThe script writes every required size into GoDark/Assets.xcassets/AppIcon.appiconset and a preview to docs/icon.png.
Maintainers: pushing a tag like v1.0.0 runs the Release workflow, which builds an ad-hoc signed universal DMG and attaches it to a GitHub release. The options below are for signing and notarising it yourself.
- In Xcode choose Product ▸ Archive.
- When the Organizer window opens, select the archive and click Distribute App.
- Pick one of these methods:
- Direct Distribution. Xcode signs the app with your Developer ID certificate and sends it to Apple to be notarized. The result opens on any Mac without warnings. This needs a paid Apple Developer Program membership.
- Custom ▸ Copy App. Exports the app signed with your development certificate. That's fine for your own Macs, but other Macs show a Gatekeeper warning the first time (see First launch on another Mac).
- Choose a folder, and Xcode exports
GoDark.appthere.
xcodebuild -project GoDark.xcodeproj -scheme GoDark -configuration Release \
-derivedDataPath build clean buildThe app is written to build/Build/Products/Release/GoDark.app.
With GoDark.app in hand, create a disk image with a shortcut to /Applications so people can drag to install:
mkdir -p dmg
cp -R path/to/GoDark.app dmg/
ln -s /Applications dmg/Applications
hdiutil create -volname "GoDark" -srcfolder dmg -ov -format UDZO GoDark.dmg
rm -rf dmgFor a nicer-looking DMG (background image, icon positions), use the free create-dmg tool:
brew install create-dmg
create-dmg --volname "GoDark" --window-size 540 360 --icon-size 128 \
--icon "GoDark.app" 140 170 --app-drop-link 400 170 \
GoDark.dmg path/to/GoDark.appIf you exported with Direct Distribution, the app inside is already notarized. To also notarize the DMG itself:
# One-time setup: save your credentials in the keychain
xcrun notarytool store-credentials GoDark --apple-id [email protected] \
--team-id <TEAM_ID> --password <app-specific-password>
codesign --sign "Developer ID Application" --timestamp GoDark.dmg
xcrun notarytool submit GoDark.dmg --keychain-profile GoDark --wait
xcrun stapler staple GoDark.dmgIf the app isn't notarized, macOS blocks it the first time you open it. To allow it:
- Open GoDark once, then dismiss the warning.
- Open System Settings ▸ Privacy & Security, scroll down and click Open Anyway next to the GoDark message.
Or remove the quarantine flag from Terminal:
xattr -dr com.apple.quarantine /Applications/GoDark.app