mirror of
https://github.com/MonitorControl/MonitorControl.git
synced 2026-10-23 08:07:35 -06:00
[PR #1892] Add brightness presets and a monitorcontrol:// URL scheme #1324
Labels
No labels
Status: Abandoned
arm64
beta
beta
bug
done
duplicate
enhancement
feedback needed from reporter
in progress
information
invalid
investigating
known Issue
monitor Issue
pull-request
translation
unable to reproduce
unreleased
x86
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github-starred/MonitorControl#1324
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/MonitorControl/MonitorControl/pull/1892
Author: @Erik5000
Created: 8/12/2026
Status: 🔄 Open
Base:
main← Head:feature/brightness-presets-and-url-scheme📝 Commits (3)
2c30f1cAdd a shared brightness action layerae9090aAdd the monitorcontrol:// URL schemedc7ee4cAdd four brightness preset shortcuts📊 Changes
28 files changed (+588 additions, -1 deletions)
View changed files
📝
MonitorControl.xcodeproj/project.pbxproj(+8 -0)📝
MonitorControl/Enums/PrefKey.swift(+15 -0)📝
MonitorControl/Extensions/KeyboardShortcuts+Extension.swift(+16 -0)📝
MonitorControl/Info.plist(+13 -0)📝
MonitorControl/Support/AppDelegate.swift(+4 -0)➕
MonitorControl/Support/BrightnessActions.swift(+140 -0)📝
MonitorControl/Support/KeyboardShortcutsManager.swift(+14 -1)➕
MonitorControl/Support/URLSchemeHandler.swift(+80 -0)📝
MonitorControl/UI/cs.lproj/Localizable.strings(+9 -0)📝
MonitorControl/UI/de.lproj/Localizable.strings(+9 -0)📝
MonitorControl/UI/en.lproj/Localizable.strings(+9 -0)📝
MonitorControl/UI/es.lproj/Localizable.strings(+9 -0)📝
MonitorControl/UI/fr.lproj/Localizable.strings(+9 -0)📝
MonitorControl/UI/hi.lproj/Localizable.strings(+9 -0)📝
MonitorControl/UI/hu.lproj/Localizable.strings(+9 -0)📝
MonitorControl/UI/it.lproj/Localizable.strings(+9 -0)📝
MonitorControl/UI/ja.lproj/Localizable.strings(+9 -0)📝
MonitorControl/UI/ko.lproj/Localizable.strings(+9 -0)📝
MonitorControl/UI/nl.lproj/Localizable.strings(+9 -0)📝
MonitorControl/UI/pl.lproj/Localizable.strings(+9 -0)...and 8 more files
📄 Description
What this adds
Two related things, in three commits that can be taken separately:
you record. A preset sets every display to that level.
monitorcontrol://URL scheme, so a script or a launcher can do thesame thing.
Both go through one small shared file,
BrightnessActions.swift, so the twoentry points cannot drift apart.
Why
The most common request I could find in this repo is a key that dims every
screen when you leave the desk, and a key that puts them back: #1851, #1674,
#727, #795, #1224. Related asks for outside control: #682, #1515, #1620, #1858.
I understand the answer has been that MonitorControl stays simple, and that
BetterDisplay covers this. I still think this specific shape is small enough to
fit: it adds no new window, no new tab, and nothing changes for a user who
never records a preset shortcut.
Please close this if you disagree. I will keep using my fork and I will not
argue the point.
Design notes
Display.setBrightnessalready existed and already picks DDC, the Appleprotocol, gamma, or the shade layer. Nothing in that path is touched.
stepBrightness: the OSD,the menu slider, and
brightnessSyncSourceValue. The last one matters,because
AppDelegate.job()compares against it and a stale value makes thesync push the difference to every other display.
caller therefore never has to read the brightness first. Many monitors accept
writes but return noise on reads.
keep the media keys, and a preset must still work for them.
text in
Localizable.stringsonly instead of 19Main.stringsfiles.disableExternalControlswitches the scheme offand a 1% floor stops a URL from making a screen fully black.
Testing
Built and run on macOS 26.5.2, Apple silicon, with 4 external displays
(3x LG UltraFine, 1x N27p) in clamshell mode. Two of those monitors accept DDC
writes but return noise on reads, which made them a useful test.
Checked: absolute set, relative change, all four displays reaching the target,
the OSD, the menu sliders, the brightness sync not fighting the change, the 1%
floor, the off switch, and malformed URLs (
value=abc,value=999, unknownaction) being ignored without a crash.
The diff carries no SwiftFormat churn and no
CFBundleVersionbumps.Disclosure
This was written with AI assistance (Claude). You said on 2026-05-09 that you
do not review AI generated PRs, and asked to be told. So: this is one. I am not
asking you to make an exception. If the
AI contribution / fork recommendationlabel is the right home for it, that is completely fine, and the fork is at
https://github.com/Erik5000/MonitorControl for anyone who wants the feature.
Every line was read, built, and tested on real hardware before opening this.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.