gitwtfhub

wtf is lunar?

alin23/lunar — explained in plain English

Analysis updated 2026-06-26

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

TL;DR

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

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

Why would anyone build with this?

REASON 1

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

REASON 2

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

REASON 3

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

REASON 4

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

What's in the stack?

Swift

How it stacks up

alin23/lunarivanvorobei/swiftuistonerl/thaw
Stars5,5715,6055,613
LanguageSwiftSwiftSwift
Setup difficultyeasyeasyeasy
Complexity2/51/51/5
Audiencegeneraldevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

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.

Wtf does this do

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.

Yoink these 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?

Frequently asked questions

wtf is lunar?

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.

What language is lunar written in?

Mainly Swift. The stack also includes Swift.

What license does lunar use?

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.

How hard is lunar to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is lunar for?

Mainly general.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.