From 86f8ab68aa24ac4a72a08fe50721029f212c6683 Mon Sep 17 00:00:00 2001 From: waydabber <37590873+waydabber@users.noreply.github.com> Date: Thu, 24 Oct 2024 15:57:38 +0200 Subject: [PATCH 1/2] Fixed slider percentage crash --- MonitorControl.xcodeproj/project.pbxproj | 4 ++-- MonitorControl/Info.plist | 2 +- MonitorControl/Support/SliderHandler.swift | 2 +- MonitorControlHelper/Info.plist | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/MonitorControl.xcodeproj/project.pbxproj b/MonitorControl.xcodeproj/project.pbxproj index 0583586f..3ae92ca0 100644 --- a/MonitorControl.xcodeproj/project.pbxproj +++ b/MonitorControl.xcodeproj/project.pbxproj @@ -881,7 +881,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 4.3.2; + MARKETING_VERSION = 4.3.4; PRODUCT_BUNDLE_IDENTIFIER = app.monitorcontrol.MonitorControl; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -918,7 +918,7 @@ "@executable_path/../Frameworks", ); MACOSX_DEPLOYMENT_TARGET = 10.14; - MARKETING_VERSION = 4.3.2; + MARKETING_VERSION = 4.3.4; PRODUCT_BUNDLE_IDENTIFIER = app.monitorcontrol.MonitorControl; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/MonitorControl/Info.plist b/MonitorControl/Info.plist index 6648c508..5d3614d2 100644 --- a/MonitorControl/Info.plist +++ b/MonitorControl/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 7122 + 7123 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/MonitorControl/Support/SliderHandler.swift b/MonitorControl/Support/SliderHandler.swift index 1d7d20ec..d539bb9a 100644 --- a/MonitorControl/Support/SliderHandler.swift +++ b/MonitorControl/Support/SliderHandler.swift @@ -379,7 +379,7 @@ class SliderHandler { slider.setDisplayHighlightItems(false) } if self.percentageBox == self.percentageBox { - self.percentageBox?.stringValue = "" + String(Int(value * 100)) + "%" + self.percentageBox?.stringValue = "\(String(format: "%.0f%%", Double(value) * 100))" } } } diff --git a/MonitorControlHelper/Info.plist b/MonitorControlHelper/Info.plist index 3d3b5395..f0c13733 100644 --- a/MonitorControlHelper/Info.plist +++ b/MonitorControlHelper/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 7122 + 7123 LSApplicationCategoryType public.app-category.utilities LSBackgroundOnly From d3bfea0572462632b53ffdd3109a05dd330fc30d Mon Sep 17 00:00:00 2001 From: waydabber <37590873+waydabber@users.noreply.github.com> Date: Sun, 19 Apr 2026 08:34:11 +0200 Subject: [PATCH 2/2] Added `UIDesignRequiresCompatibility` so the project is properly compiled with XCode 26. --- MonitorControl/Enums/Command.swift | 2 +- MonitorControl/Info.plist | 4 ++- MonitorControl/Model/AppleDisplay.swift | 4 +-- MonitorControl/Model/OtherDisplay.swift | 2 +- MonitorControl/Support/Arm64DDC.swift | 4 +-- MonitorControl/Support/DisplayManager.swift | 4 ++- MonitorControl/Support/SliderHandler.swift | 2 +- .../DisplaysPrefsViewController.swift | 6 ++-- MonitorControlHelper/Info.plist | 2 +- README.md | 35 ++++++++----------- 10 files changed, 31 insertions(+), 34 deletions(-) diff --git a/MonitorControl/Enums/Command.swift b/MonitorControl/Enums/Command.swift index d6d1b7c8..d374094e 100644 --- a/MonitorControl/Enums/Command.swift +++ b/MonitorControl/Enums/Command.swift @@ -168,5 +168,5 @@ enum Command: UInt8 { case bottomLeftScreenPurity = 0xEA case bottomRightScreenPurity = 0xEB - public static let brightness = luminance + static let brightness = luminance } diff --git a/MonitorControl/Info.plist b/MonitorControl/Info.plist index 5d3614d2..92532c34 100644 --- a/MonitorControl/Info.plist +++ b/MonitorControl/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 7123 + 7125 LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion @@ -36,5 +36,7 @@ https://monitorcontrol.app/appcast2.xml SUPublicEDKey ITSTMp8AypsLawojJ+UR3tm2mN18AFoNMvXf1G3t62s= + UIDesignRequiresCompatibility + diff --git a/MonitorControl/Model/AppleDisplay.swift b/MonitorControl/Model/AppleDisplay.swift index d49eae41..8c7dff6f 100644 --- a/MonitorControl/Model/AppleDisplay.swift +++ b/MonitorControl/Model/AppleDisplay.swift @@ -11,7 +11,7 @@ class AppleDisplay: Display { super.init(identifier, name: name, vendorNumber: vendorNumber, modelNumber: modelNumber, serialNumber: serialNumber, isVirtual: isVirtual, isDummy: isDummy) } - public func getAppleBrightness() -> Float { + func getAppleBrightness() -> Float { guard !self.isDummy else { return 1 } @@ -20,7 +20,7 @@ class AppleDisplay: Display { return brightness } - public func setAppleBrightness(value: Float) { + func setAppleBrightness(value: Float) { guard !self.isDummy else { return } diff --git a/MonitorControl/Model/OtherDisplay.swift b/MonitorControl/Model/OtherDisplay.swift index d920990e..7c579c4e 100644 --- a/MonitorControl/Model/OtherDisplay.swift +++ b/MonitorControl/Model/OtherDisplay.swift @@ -377,7 +377,7 @@ class OtherDisplay: Display { return intCodes } - public func writeDDCValues(command: Command, value: UInt16) { + func writeDDCValues(command: Command, value: UInt16) { guard app.sleepID == 0, app.reconfigureID == 0, !self.readPrefAsBool(key: .forceSw), !self.readPrefAsBool(key: .unavailableDDC, for: command) else { return } diff --git a/MonitorControl/Support/Arm64DDC.swift b/MonitorControl/Support/Arm64DDC.swift index 2ec04252..e8d14950 100644 --- a/MonitorControl/Support/Arm64DDC.swift +++ b/MonitorControl/Support/Arm64DDC.swift @@ -8,9 +8,9 @@ let ARM64_DDC_DATA_ADDRESS: UInt8 = 0x51 class Arm64DDC: NSObject { #if arch(arm64) - public static let isArm64: Bool = true + static let isArm64: Bool = true #else - public static let isArm64: Bool = false + static let isArm64: Bool = false #endif static let MAX_MATCH_SCORE: Int = 20 diff --git a/MonitorControl/Support/DisplayManager.swift b/MonitorControl/Support/DisplayManager.swift index 7ace4485..a861bd5d 100644 --- a/MonitorControl/Support/DisplayManager.swift +++ b/MonitorControl/Support/DisplayManager.swift @@ -5,7 +5,7 @@ import CoreGraphics import os.log class DisplayManager { - public static let shared = DisplayManager() + static let shared = DisplayManager() var displays: [Display] = [] var audioControlTargetDisplays: [OtherDisplay] = [] @@ -177,6 +177,7 @@ class DisplayManager { let isDummy: Bool = DisplayManager.isDummy(displayID: onlineDisplayID) let isVirtual: Bool = DisplayManager.isVirtual(displayID: onlineDisplayID) if !DEBUG_SW, DisplayManager.isAppleDisplay(displayID: onlineDisplayID) { // MARK: (point of interest for testing) + let appleDisplay = AppleDisplay(id, name: name, vendorNumber: vendorNumber, modelNumber: modelNumber, serialNumber: serialNumber, isVirtual: isVirtual, isDummy: isDummy) os_log("Apple display found - %{public}@", type: .info, "ID: \(appleDisplay.identifier), Name: \(appleDisplay.name) (Vendor: \(appleDisplay.vendorNumber ?? 0), Model: \(appleDisplay.modelNumber ?? 0))") self.addDisplay(display: appleDisplay) @@ -519,6 +520,7 @@ class DisplayManager { } } if let screen = getByDisplayID(displayID: displayID) { // MARK: This, and NSScreen+Extension.swift will not be needed when we drop MacOS 10 support. + if #available(macOS 10.15, *) { return screen.localizedName } else { diff --git a/MonitorControl/Support/SliderHandler.swift b/MonitorControl/Support/SliderHandler.swift index d539bb9a..de28e908 100644 --- a/MonitorControl/Support/SliderHandler.swift +++ b/MonitorControl/Support/SliderHandler.swift @@ -209,7 +209,7 @@ class SliderHandler { } } - public init(display: Display?, command: Command, title: String = "", position _: Int = 0) { + init(display: Display?, command: Command, title: String = "", position _: Int = 0) { self.command = command self.title = title let slider = SliderHandler.MCSlider(value: 0, minValue: 0, maxValue: 1, target: self, action: #selector(SliderHandler.valueChanged)) diff --git a/MonitorControl/View Controllers/Preferences/DisplaysPrefsViewController.swift b/MonitorControl/View Controllers/Preferences/DisplaysPrefsViewController.swift index 7896b3a8..0a8384da 100644 --- a/MonitorControl/View Controllers/Preferences/DisplaysPrefsViewController.swift +++ b/MonitorControl/View Controllers/Preferences/DisplaysPrefsViewController.swift @@ -67,7 +67,7 @@ class DisplaysPrefsViewController: NSViewController, SettingsPane, NSTableViewDa self.displays.count } - public static func isImac() -> Bool { + static func isImac() -> Bool { let platformExpertDevice = IOServiceGetMatchingService(kIOMasterPortDefault, IOServiceMatching("IOPlatformExpertDevice")) if let modelIdentifier = IORegistryEntryCreateCFProperty(platformExpertDevice, "model" as CFString, kCFAllocatorDefault, 0).takeRetainedValue() as? String { return modelIdentifier.contains("iMac") @@ -75,14 +75,14 @@ class DisplaysPrefsViewController: NSViewController, SettingsPane, NSTableViewDa return false } - public struct DisplayInfo { + struct DisplayInfo { var displayType = "" var displayImage = "" var controlMethod = "" var controlStatus = "" } - public static func getDisplayInfo(display: Display) -> DisplayInfo { + static func getDisplayInfo(display: Display) -> DisplayInfo { var displayType = NSLocalizedString("Other Display", comment: "Shown in the Display Settings") var displayImage = "display.trianglebadge.exclamationmark" var controlMethod = NSLocalizedString("No Control", comment: "Shown in the Display Settings") + " ⚠️" diff --git a/MonitorControlHelper/Info.plist b/MonitorControlHelper/Info.plist index f0c13733..6f318b93 100644 --- a/MonitorControlHelper/Info.plist +++ b/MonitorControlHelper/Info.plist @@ -19,7 +19,7 @@ CFBundleShortVersionString $(MARKETING_VERSION) CFBundleVersion - 7123 + 7125 LSApplicationCategoryType public.app-category.utilities LSBackgroundOnly diff --git a/README.md b/README.md index e1363522..b24b97ce 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ App icon
-

MonitorControl - now compatible with macOS Sequoia

+

MonitorControl

Controls your external display brightness and volume and shows native OSD. Use menubar extra sliders or the keyboard, including native Apple keys!

Download for macOS @@ -24,11 +24,14 @@ Use menubar extra sliders or the keyboard, including native Apple keys!


+> [!WARNING] +> MonitorControl v4.2.0 [may crash](https://github.com/MonitorControl/MonitorControl/issues/1663) on certain configurations running macOS 15 Sequoia or Tahoe. Additionally, this version will not automatically update to the [latest app version](https://github.com/MonitorControl/MonitorControl/releases). To resolve the issue and ensure future updates, please upgrade manually. + ## Download Go to [Releases](https://github.com/MonitorControl/MonitorControl/releases) and download the latest `.dmg`, or you can install via Homebrew: ```shell -brew install MonitorControl +brew install --cask monitorcontrol ``` ## Major features @@ -44,7 +47,7 @@ brew install MonitorControl - Support for custom keyboard shortcuts as well as standard brightness and media keys on Apple keyboards. - Dozens of customization options to tweak the inner workings of the app to suit your hardware and needs (don't forget to enable `Show advanced settings` in app Settings). - Simple, unobtrusive UI to blend in to the general aesthetics of macOS. -- **One of the best app of its kind, completely FREE.** +- Completely FREE. For additional features, more advanced brightness control with XDR/HDR brightness upscaling and support for more Mac models and displays, check out [BetterDisplay](https://github.com/waydabber/BetterDisplay#readme)! @@ -78,7 +81,9 @@ For additional features, more advanced brightness control with XDR/HDR brightnes _* With some limitations - full functionality available on macOS 11 Big Sur or newer._ -For macOS Sequoia compatibility [v4.3.2 or newer](https://github.com/MonitorControl/MonitorControl/releases) is required! +For macOS Sequoia and Tahoe 26 compatibility [v4.3.3 or newer](https://github.com/MonitorControl/MonitorControl/releases) is required! + +Please note that current versions have limited native macOS OSD support on macOS Tahoe - although the Control Center brightness or volume OSD appears, the OSD percentage value will not show or update. ### Supported displays @@ -93,17 +98,10 @@ Notable exceptions for hardware control compatibility: - Some displays (notably EIZO) use MCCS over USB or an entirely custom protocol for control. These displays are supported with software dimming only. - DisplayLink docks and dongles do not allow for DDC control on Macs, only software dimming is available for these connections. -Compatibility with - -- f.lux users: please activate `Avoid gamma table manipulation` under `Settings` » `Displays`! This step is not needed if you use Night Shift. -- [BetterDisplay](https://betterdisplay.pro/) users: either activate `Avoid gamma table manipulation` in MonitorControl or turn off `Allow color table adjustments` in BetterDisplay (under Settings/Displays/Overview). You might want to disable native keyboard control either in MonitorControl or BetterDisplay, depending on which app you want to use for brightness control and dimming. - ## Contributing to the project -- You can help out [by contributiong to the project with your one-time donation or by being a regular Sponsor](https://opencollective.com/monitorcontrol)! - If you want, you can fork the code, make improvements and submit a pull request to improve the app. Accepting a PR is solely in the hands of the maintainer - before making fundamental changes expecting it to be accepted, please consult the maintainer of the project! - ## How to build ### Required @@ -132,17 +130,12 @@ git clone https://github.com/MonitorControl/MonitorControl.git - [KeyboardShortcuts](https://github.com/sindresorhus/KeyboardShortcuts) - [Sparkle](https://github.com/sparkle-project/Sparkle) -## Hall of Honor - -### Current maintainer of the project - -- [@waydabber](https://github.com/waydabber), developer of [BetterDisplay](https://github.com/waydabber/BetterDisplay#readme). - -### Former maintainers, special contributors +## Credits -- [@the0neyouseek](https://github.com/the0neyouseek) - previous (now honorary) maintainer -- [@JoniVR](https://github.com/JoniVR) - previous (now honorary) maintainer -- [@alin23](https://github.com/alin23) (generally spearheaded M1 DDC support and figured out a many of the caveats) +- [@waydabber](https://github.com/waydabber), maintainer, developer of [BetterDisplay](https://github.com/waydabber/BetterDisplay#readme). +- [@the0neyouseek](https://github.com/the0neyouseek) - honorary maintainer +- [@JoniVR](https://github.com/JoniVR) - honorary maintainer +- [@alin23](https://github.com/alin23) - spearheaded M1 DDC support, developer of [Lunar](https://lunar.fyi) - [@mathew-kurian](https://github.com/mathew-kurian/) (original developer) - [@Tyilo](https://github.com/Tyilo/) (fork) - [@Bensge](https://github.com/Bensge/) - (used some code from his project [NativeDisplayBrightness](https://github.com/Bensge/NativeDisplayBrightness))