BlackScreen is a native macOS screen saver that does the minimum possible work: it immediately transitions to the saver, paints an opaque black view, and stretches the animation interval to one day so the framework does not keep waking up to animate frames.
The result is a small Apple Silicon .saver bundle written in Swift with no configuration UI, no assets, and no rendering loop beyond the initial black fill.
- macOS 13 or newer
- Xcode Command Line Tools or Xcode with Swift 6.x
- Apple Silicon (
arm64) by default
make buildThat produces Build/BlackScreen.saver.
make testRun a single test with Swift Testing filtering:
swift test --filter BlackScreenCoreTests/randomizedRenderingStaysBlackThe test suite covers bundle metadata, animation interval normalization, and randomized render checks that instantiate the real ScreenSaverView subclass across many frame sizes to verify it stays black.
make installThis copies the built bundle into ~/Library/Screen Savers/BlackScreen.saver. You can then select it in Screen Saver settings.
file Build/BlackScreen.saver/Contents/MacOS/BlackScreen
otool -L Build/BlackScreen.saver/Contents/MacOS/BlackScreenSources/BlackScreenCore/contains the Swift metadata andScreenSaverViewsubclass.Tests/BlackScreenCoreTests/contains automated and randomized validation.Resources/Info.plistdefines the bundle metadata copied into the.saver.Scripts/build-saver.shpackages the.saverbundle and copies any needed Swift runtime libraries.