HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
alin23
Lunar
Swift2018–2025
alin23 / Lunar

Lunar

Intelligent adaptive brightness for your external monitors

6Distinct people
20Mentions
0Explicit recommenders
5.7KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Intelligent adaptive brightness for your external monitors

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year20 dated mentions

Observed mentions: 2018-07-18 21:04:02 UTC to 2025-08-23 13:24:21 UTC.

02468102018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20212022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 9 mentions; 0 submissions, 9 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC110
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC514
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC909
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC202
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

What Hacker News says

20 sources
As the dev of a macOS app that breaks all the time because of external hardware, the tone of the article hits close to home. (I’m talking about https://lunar.fyi/ whose brightness control commands can be blocked by USB-C hubs, “smart” monitors, too long cables etc.) I had to disable public GitHub issues on the app repo [1] because people seemed to fuel each other with spiteful comments and “why can’t you just!!” sentences. The contact form still attracts many such “entitled” people and it hurts to wake up to such messages, but at least I can choose to ignore those if I can’t bring anything to the discussion. There’s no peer pressure. These people are expecting too much from a handful of developers who are sharing a lot of free work and time that could have been spent better than hunting new IDs in URLs and updating regular expressions. [
Read the rest
In YouTube's Anti-Adblock and uBlock Origin
Most of the delay is I/O bound. Handshaking happens over the Display Data Channel (DDC) which is a protocol over I²C (a two-wire comunication bus). HDMI/DP/DVI have 2 dedicated wires inside the cable for this, USB-C has to switch over to use differential signaling on pins A8 and B8, and then switch back after communication is done. The bandwidth of that bus is small indeed, but most of the latency comes from artificial delays and error recovery in code: monitor is sending a message to host then sleeping 30ms to make sure the reply is ready, host doing the same thing, and this happens multiple times to negotiate pixel clock, signal timing, colors, resolution, additional features like suspend/reset/HDR/overscan etc.) You can see how in the MCCS specification [1] both host and display entrypoints for communication start with a delay: https:/
Read the rest
/shots.panaitiu.com/e8D7tQ You can also see how that looks in Lunar's DDC code [2] [3]. For now, it's incredible that we actually have such a standard as DDC and most monitors work with most devices. A coordinated effort between monitor vendors and laptop/PC/GPU manufacturers into creating another faster standard with modern technology seems out of the question. But maybe with the advent of Thunderbolt this may change in the future. [1] https://files.lunar.fyi/mccs.pdf [2] https://github.com/alin23/Lunar/blob/master/Lunar/DDC/DDC.c#... : Delay on requesting data from monitor [3] https://github.com/alin23/Lunar/blob/master/Lunar/DDC/DDC.c#... : Delay on communication error before retry
In Ask HN: Can you recommend an “instant-switch” Monitor? Does one exist?
> My best selling app Lunar (https://lunar.fyi/) is done in AppKit with Storyboards and it’s a pain to maintain (source here: https://github.com/alin23/Lunar) I just wanted to say that you can and most likely should use UIKit without touching interface builder. It's been over 5 years since I've used interface builder and I have no regrets. Just build your UI programatically relying mostly on UIStackViews, constraints and multiple levels of views embedded in views. Write your own helpers on top of UIKit to help you compose views in a more compact way. I basically have a dozen functions I re-use over and over and over to build complex UI from these simple primitives.
In SwiftUI Is Convenient, but Slow
Author here! My best selling app Lunar (https://lunar.fyi/) is done in AppKit with Storyboards and it’s a pain to maintain (source here: https://github.com/alin23/Lunar). So much that I finally created a SwiftUI menubar menu for it where I can add the more dynamic bits easily, and just leave the AppKit UI for static preferences stuff. Both AppKit and SwiftUI are good though, Lunar was the first time I was able to create a native UI from scratch and also release it without remorse. But I felt that the dynamic parts were much harder to reason about in AppKit, mostly because of the Delegate paradigm. I also have a preference for a not-so-native look which is much simpler to style using SwiftUI modifiers like clipShape, shadow etc.
In SwiftUI Is Convenient, but Slow
I usually open source free apps, that I don't think I'll ever be able to sell because "who else could have the same problem as me?" If it turns out that people have a need and want to pay for Pro features, I try my best to keep the source available for the free part of the app, and only encrypt the code that constitutes the paid features. That happened with Lunar, and it seems to start happening with Clop as well. I have no idea if it did impact my profits at all, but it did help other people to start competing with me. The only competitors to Lunar (MonitorControl and DisplayBuddy) started by using Lunar's code [1] for controlling monitors on Apple Silicon [2], as Lunar was the first app to get that feature. Competition is still good though, as long as it's not break-neck competition. I learned how to make Lunar simpler in terms of menub
Read the rest
ar UI from MonitorControl, and got some ideas on how to implement Custom Presets from testing DisplayBuddy. [1] https://github.com/alin23/Lunar/blob/master/Lunar/DDC/DDC.c#... [2] https://alinpanaitiu.com/blog/journey-to-ddc-on-m1-macs/
In Ask HN: Alternative ways to make money with coding and system skills?
Thanks for the kind words! I’d say I had a year of full time work (on and off in 3 years of time) until I had Lunar 3 which was the most stable until Apple Silicon arrived: https://github.com/alin23/lunar/tree/lunar3 I had accumulated about $5k in donations over those years which allowed me to quit my job, do 6 months of full time work in 3 months of time, and launch Lunar 4 with support for Apple Silicon: https://alinpanaitiu.com/blog/journey-to-ddc-on-m1-macs/ After that, the hard work started because now I had paying users asking for a stable app that was very Hardware dependent on a completely new macOS architecture. 9 more months of full time work followed. Right now it’s finally quiet. I do about a bug fix and small feature release per month and I have plenty of time to work on my other apps.
In Ask HN: Alternative ways to make money with coding and system skills?
Do also check out my Lunar app (https://lunar.fyi/) if you want more automated intelligent adaptive brightness for external monitors, along with some innovative features like Sub-zero Brightness (for those late nights with tired eyes), XDR Brightness (for working in the sun on your XDR MacBook Pro) and Blackout (for turning off individual displays). DisplayBuddy uses Lunar’s open source implementation [0] for controlling monitors using DDC on M1 [1] so they both do the same thing at the lower level. There’s also a comparison table with DisplayBuddy here: https://lunar.fyi/#comparison [0] https://github.com/alin23/Lunar/blob/master/Lunar/DDC/DDC.c#... [1] https://alinpanaitiu.com/blog/journey-to-ddc-on-m1-macs/
In Life's too short to be pressing the buttons on your monitor
Yes, it's not open-source by that definition. It was fully open-source until v3: https://github.com/alin23/Lunar/tree/lunar3 I've kept that around, it's still compilable, but probably not that useful. When making Lunar paid in v4, I didn't want to remove the possibility of sharing knowledge, so I kept the non-paid parts open-source. This allowed other apps like MonitorControl [1] and DisplayBuddy [2] to port some Lunar features (like DDC on M1) to their own code. So I'd say it's still useful enough. [1] https://github.com/MonitorControl/MonitorControl [2] https://displaybuddy.app
In Show HN: Lunar XDR Brightness control
It’s not screen dimming. It is an app to fully control the monitor without using its physical buttons. Lunar can change the hardware brightness, the same one that you can change using the monitor OSD. That in itself required a lot of reverse engineering and research about the DDC protocol. Adaptive brightness, ambient light sensor integration and other automatic features also needed months of non-stop work. Plus, the app is open source, trying to give something back to the community which gave me the inspiration to create this: https://github.com/alin23/Lunar Even with $23 per license, after taxes I barely make half of what I made at my previous job where I worked less hours. I don’t understand how you can dismiss this so simply. the people pirating your software probably wouldn't have paid for it anyhow I heard this argument so many
Read the rest
times.. it's like saying to someone who just got their bike stolen while they were trying to sell it | the thief would have probably never bought it If you don't need the Pro features, don't pay for them and don't use them. Simple as that. Why does it feel okay to steal them in the software world, but it's clearly a crime in the real world?
In Russia to legalize software piracy
I've done that with Lunar (https://lunar.fyi) Lunar 3 was free and open source, then a very high effort upgrade had to happen because the M1 CPU needed different low level logic for controlling monitors, so I made Lunar 4 paid. I still keep Lunar 3 as a free download right on the front page, and its source code is untouched in the lunar3 branch (https://github.com/alin23/Lunar/tree/lunar3) Most people were happy to pay and support me for the new app, but inevitably there were some very rude messages because some users felt entitled to getting the upgrades free forever. I think it's a perfectly reasonable thing to do, it's your work and your time and you should ask to be compensated for it if you need the money.
In Ask HN: Is it malicious to start charging $ for your previously free project?
I just ordered the M1 Max with 64GB RAM because I'm constantly getting the "Your system has run out of application memory." popup while working on Lunar[1] in Xcode. Every time this happens, Xcode uses about 4GB of RAM (probably because of the monolithic UI storyboard of Lunar) but it should still leave enough memory for my other non-memory hungry apps. But then I open Activity Monitor and I see WindowServer using ~80GB of memory [2] The only remedy is either `killall WindowServer` or a full reboot. I've been using an M1 MacBook Pro and Monterey since the first developer beta but this only became an issue in the last 2 months or so. [1] https://github.com/alin23/Lunar [2] https://cln.sh/CfEL6u
In Memory leaks are crippling my M1 MacBook Pro
> When you map “white” down to gray, you have to drive the LED backlight brighter for the same perceived screen brightness So that's why Lunar[1] reads a much higher brightness and makes all external monitors as bright as ten thousand suns when HDR content is played. I wonder if there's any way to detect this and read or compute the SDR brightness instead. [1] https://github.com/alin23/Lunar/issues/86
In Apple’s “Extended Dynamic Range” Brings HDR to Non-HDR Displays

Showing the 15 most recent of 20 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.