explaingit

alin23/lunar

5,571SwiftAudience · generalComplexity · 2/5Setup · easy

TLDR

Lunar is a macOS app that controls external monitor brightness, contrast, and volume at the hardware level using the DDC/CI protocol, so the monitor itself dims rather than a software overlay. Supports automatic adjustments tied to ambient light, time of day, or per-app presets.

Mindmap

mindmap
  root((repo))
    What it does
      Monitor control
      Hardware brightness
    Protocol
      DDC CI standard
      Over video cable
    Auto modes
      Sync with built-in
      Sunrise sunset
      External sensor
      Per-app presets
    Features
      BlackOut mode
      Hidden resolutions
      Keyboard shortcuts
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Control external monitor brightness from the menu bar without using the physical buttons on the monitor

USE CASE 2

Automatically dim an external display at sunset and brighten it at sunrise based on your location

USE CASE 3

Turn a monitor off completely while keeping its USB-C hub and charging functions running through BlackOut mode

USE CASE 4

Set different brightness levels per application so a video editor gets a brighter screen than a code editor

Tech stack

Swift

Getting it running

Difficulty · easy Time to first run · 5min

Pro features are closed-source and cannot be built from this repo, install via disk image or Homebrew for full functionality.

The paid Pro features are closed-source and not included in this repo, the specific license for the open portions is not stated in the explanation.

In plain English

Lunar is a macOS application written in Swift for controlling external monitors. It lets you adjust brightness, contrast, volume, and input selection directly through the app rather than fumbling with physical buttons on your monitor. Both Intel and Apple Silicon Macs are supported. The key technical detail is that Lunar changes brightness at the hardware level using a protocol called DDC/CI, which is a standard way to send control commands to a monitor over the same cable carrying the video signal. This means the brightness change is real: the monitor's own hardware dims or brightens, rather than a software overlay darkening the pixels on-screen. The result is better for battery life and looks more natural, especially in dark environments. Lunar offers several ways to adjust brightness automatically. Sync mode ties your external monitor's brightness to the MacBook's built-in ambient light sensor. Location mode adjusts brightness based on sunrise and sunset times for wherever you are. A separate external hardware sensor is also supported for more precise ambient light readings. You can also set per-app presets so, for example, a video editing app automatically gets a different brightness than a code editor. Other features include a BlackOut mode that turns a monitor off completely while keeping USB-C charging, audio, and hub functions running through it. Screen orientation can be changed from the menu bar. Hidden display resolutions that macOS does not normally surface are accessible from a dropdown. Keyboard shortcuts can be assigned for brightness, volume, contrast, and input switching. Installation is through a downloaded disk image or via Homebrew. The source code for paid Pro features is not included in the repository, so the app cannot be built from this repo.

Copy-paste prompts

Prompt 1
How do I install Lunar and set it up to automatically sync my external monitor's brightness with my MacBook's built-in ambient light sensor?
Prompt 2
Explain how Lunar uses the DDC/CI protocol to change monitor brightness at the hardware level rather than applying a software overlay
Prompt 3
How do I configure per-app brightness presets in Lunar so my display dims automatically when I switch to a specific app?
Prompt 4
How do I use Lunar's BlackOut mode to turn off an external monitor while keeping USB-C charging and hub functions active?
Prompt 5
How do I assign a keyboard shortcut in Lunar to quickly switch a monitor's input source between my MacBook and another device?
Open on GitHub → Explain another repo

← alin23 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.