@mkushka/dell-brightness-sync
v1.0.3
Published
A zero-dependency CLI tool to automatically sync an external Dell monitor's brightness with the Mac's built-in display using m1ddc on Apple Silicon.
Maintainers
Readme
Dell Monitor Brightness Sync
TL;DR Automatic Setup
Just want it to work instantly? Run this script in your terminal to automatically install prerequisites, the package globally, and set it up to run in the background forever using PM2:
bash <(curl -sL https://raw.githubusercontent.com/kushkamisha/dell-brightness-sync/main/install.sh)Overview
A lightweight, zero-dependency Node.js CLI tool that automatically synchronizes the brightness of your external Dell monitor with your MacBook's built-in display. Built specifically for Apple Silicon Macs.
It runs quietly in the background, checking your built-in screen's brightness. When you adjust your MacBook's brightness using the keyboard, the external monitor will smoothly transition to match it!
Prerequisites
This tool relies on macOS's native corebrightnessdiag for sensing the built-in display and m1ddc for controlling the Dell display via hardware DDC/CI commands.
- Apple Silicon Mac (M1/M2/M3/M4)
- Homebrew installed
- m1ddc installed via Homebrew:
brew install m1ddc
Manual Installation
You can run this directly without installing it globally, or install it on your system for continuous background use.
Option 1: Run via npx (No install required)
npx @mkushka/dell-brightness-syncOption 2: Install Globally
npm install -g @mkushka/dell-brightness-syncThen run simply:
dell-brightness-syncManual Background Daemon Setup (PM2)
If you didn't use the TL;DR script, we recommend using PM2 to keep it running silently at all times:
# Start the background sync daemon
npx pm2 start dell-brightness-sync --name "dell-brightness-sync"
# Stop the daemon
npx pm2 stop dell-brightness-sync
# Make it auto-start whenever your Mac reboots
npx pm2 startup && npx pm2 saveHow It Works
- Identifies your external Dell monitor via
m1ddcdisplay lists. - Polls your internal Mac screen's real brightness directly from Apple's
/usr/libexec/corebrightnessdiagsensor every 1 second. - Automatically triggers a smooth, non-jarring easing transition to fade your external Dell screen brightness to perfectly match the internal screen.
Testing
Due to the script's heavy dependency on direct local macOS hardware communication and connected physical displays, automated CI tests are not practical. The recommended testing methodology is manual execution. A smoke test is provided to verify code syntax:
npm testLicense
MIT
