mirror of
https://github.com/MonitorControl/MonitorControl.git
synced 2026-06-01 22:00:47 -06:00
Version 4.0.0 (#629)
### Added/improved functionality - Added proper support for controlling Apple displays. - Added option to show/hide brightness slider. - Added option to show brightness slider for internal display and apple displays (enabled by default). - Replication of built-in and Apple display brightness to corresponding brightness slider. - Added suffix to similarly named displays for better differentiation. - Option to disable slider snapping for finer control + disable slider snapping by default. - Added option to show slider tick marks for better accuracy. - Added option to use window focus instead of mouse to determine which display to control. - Ctrl+Command+Brightness now controls external displays only (Ctrl+Brightness continues to control internal display only) - Added separate tab for menu options. - Added option to restore last saved values upon startup. - Added option for audio device name matching for display volume control selection. - Separated option to change all screens for brightness and volume. - Added option for keyboard fine scale for brightness. - Added option for keyboard fine scale for volume. - Added version check upon startup for mandatory preferences reset upon downgrade or incompatible previous version + notification about this. - Added implementation for Command+F1 macOS shortcut to enable/disable mirroring. - Added safer 'Assume last saved settings are valid' option as default instead of startup DDC read (or restore). - Streamlined preference panes, 'Show advanced settings' now affect all tabs. This leads to a better and safer first timer experience (especially because of the influx of many new features). - Added a Quit button to Preferences if menu is hidden (it was not passible to quit the application until this time in this mode only by re-enabling the menu). - Lowered default first-run volume DDC default from 75% to 15% if read is not possible or disabled to prevent unexpectedly loud sound. - Added slider skew setting on a per control basis to have the ability to manipulate DDC slider balance and OSD scale if display control is not linear. - Added the ability to set min. and max. DDC bounds on a per display, per control basis. - Audio device name override option for a display (manually assign a specific audio device to a display). - Advanced setting to invert DDC control range (some displays have the scale reversed). - Advanced setting to remap DDC control code (some displays have contrast and brightness mixed up). - Ability to mark a DDC control as available or unavailable in advanced settings under Displays. - Ability to automatically hide menu icon if there is no slider present in the menu. - Option to show slider percentage for more precision. - Option to set combined or separate OSD scale when combined hardware+software brightness is used. - Apple like smooth brightness change (both for software, hardware, mixed and DisplayServices). - Added support for DisplayLink, AirPlay, Sidecar, screen sharing etc. using window shades (this is an inferior technique to the existing software implementation - gamma control - but still better than nothing). Disabled for any kind of mirroring setups. _(Only on Big Sur and above)_ - Brightness change synchronisation from Built-In and Apple displays to other displays. This makes Touch Bar, Ambient light sensor, Control Center and System Preferences induced changes affect all displays. Synchronisation uses a sophisticated indirect delta method + the user can intervene and adjust individual screen brightness at any time to easily compensate mismatching native brightness levels. - Preferences pane tab selector has a simpler look on Catalina. - All menu sliders are now scrollable using a magic mouse/trackpad swipes or mouse wheel. - Added option for menu to show only items that are relevant to display which shows the menu currently. - Added option to enable combined sliders (note: this option combined with enabled Apple/built-in display syncing and enabled 'change all' keyboard settings finally provides full synchronised control of all displays). - Combined sliders can now display multiple displays when keyboard and brightness syncing is not enabled. _(Only on Big Sur and above)_ - Redesigned sliders to look like Big Sur/Monterey Control Center's sliders. _(Only on Big Sur and above)_ - Quit and Preferences... are now icons for a much cleaner look. _(Only on Big Sur and above)_ - Added option to change additional menu options style or hide them. _(Only on Big Sur and above)_ - Multiple displays are now in nice Big Sur styled blocks - no more ugly separators. _(Only on Big Sur and above)_ - Added customisable gamma/ddc switchover point for combined brightness in the advanced section of Displays. - Added comma separated list for control code override to enable edge cases like controlling Brightness and Contrast at the same time (use VCP list entry `10, 12` for that) - Contrast can now be controlled from keyboard via <kbd>control</kbd> + <kbd>option</kbd> + <kbd>command</kbd> + brightness up/down. - Custom keyboard shortcuts for brightness, contrast, volume and mute - Added automatic update. ### Other under the hood changes and bug fixes - Standardised internal scale among various displays and DDC ranges for ranged controls. - Uses the new internal scale for combined hardware-software brightness mode. - Migrated scales to internal float representation to prevent loss of fine detail on transformations. - Fixed double sound when muting multiple external displays at the same time. - Fixed lack of initial volume configuration if slider is not shown in menu. - Fixed wrong settings being applied to a display when replaced on Apple Silicon (UserDefaults preferences are now tied to specific display strings instead of CGDirectDisplayID - which is no longer semi-unique on arm64). - A lot of refactoring, streamlining and general optimisations.
This commit is contained in:
parent
5947be2b89
commit
30da9a8020
100 changed files with 12635 additions and 4748 deletions
|
|
@ -1,3 +1,5 @@
|
|||
// Copyright © MonitorControl. @JoniVR, @theOneyouseek, @waydabber and others
|
||||
|
||||
import Cocoa
|
||||
|
||||
public extension CGDirectDisplayID {
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
import Foundation
|
||||
|
||||
extension Display: Equatable {
|
||||
static func == (lhs: Display, rhs: Display) -> Bool {
|
||||
return lhs.identifier == rhs.identifier
|
||||
}
|
||||
}
|
||||
15
MonitorControl/Extensions/KeyboardShortcuts+Extension.swift
Normal file
15
MonitorControl/Extensions/KeyboardShortcuts+Extension.swift
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// Copyright © MonitorControl. @JoniVR, @theOneyouseek, @waydabber and others
|
||||
|
||||
import KeyboardShortcuts
|
||||
|
||||
extension KeyboardShortcuts.Name {
|
||||
static let brightnessUp = Self("brightnessUp")
|
||||
static let brightnessDown = Self("brightnessDown")
|
||||
static let contrastUp = Self("contrastUp")
|
||||
static let contrastDown = Self("contrastDown")
|
||||
static let volumeUp = Self("volumeUp")
|
||||
static let volumeDown = Self("volumeDown")
|
||||
static let mute = Self("mute")
|
||||
|
||||
static let none = Self("none")
|
||||
}
|
||||
|
|
@ -2,8 +2,4 @@ import Cocoa
|
|||
|
||||
extension NSNotification.Name {
|
||||
static let accessibilityApi = NSNotification.Name(rawValue: "com.apple.accessibility.api")
|
||||
static let listenFor = NSNotification.Name(rawValue: Utils.PrefKeys.listenFor.rawValue)
|
||||
static let friendlyName = NSNotification.Name(rawValue: Utils.PrefKeys.friendlyName.rawValue)
|
||||
static let preferenceReset = NSNotification.Name(rawValue: Utils.PrefKeys.preferenceReset.rawValue)
|
||||
static let displayListUpdate = NSNotification.Name(rawValue: Utils.PrefKeys.displayListUpdate.rawValue)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
// Copyright © MonitorControl. @JoniVR, @theOneyouseek, @waydabber and others
|
||||
|
||||
import Cocoa
|
||||
|
||||
public extension NSScreen {
|
||||
|
|
@ -6,7 +8,7 @@ public extension NSScreen {
|
|||
}
|
||||
|
||||
var vendorNumber: UInt32? {
|
||||
switch self.displayID.vendorNumber {
|
||||
switch CGDisplayVendorNumber(self.displayID) {
|
||||
case 0xFFFF_FFFF:
|
||||
return nil
|
||||
case let vendorNumber:
|
||||
|
|
@ -15,7 +17,7 @@ public extension NSScreen {
|
|||
}
|
||||
|
||||
var modelNumber: UInt32? {
|
||||
switch self.displayID.modelNumber {
|
||||
switch CGDisplayModelNumber(self.displayID) {
|
||||
case 0xFFFF_FFFF:
|
||||
return nil
|
||||
case let modelNumber:
|
||||
|
|
@ -24,7 +26,7 @@ public extension NSScreen {
|
|||
}
|
||||
|
||||
var serialNumber: UInt32? {
|
||||
switch self.displayID.serialNumber {
|
||||
switch CGDisplaySerialNumber(self.displayID) {
|
||||
case 0x0000_0000:
|
||||
return nil
|
||||
case let serialNumber:
|
||||
|
|
@ -56,12 +58,4 @@ public extension NSScreen {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
var isBuiltin: Bool {
|
||||
return CGDisplayIsBuiltin(self.displayID) != 0
|
||||
}
|
||||
|
||||
static func getByDisplayID(displayID: CGDirectDisplayID) -> NSScreen? {
|
||||
return NSScreen.screens.first { $0.displayID == displayID }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,11 @@
|
|||
//
|
||||
// Preferences+Extension.swift
|
||||
// MonitorControl
|
||||
//
|
||||
// Created by Joni Van Roost on 22/11/2020.
|
||||
// Copyright © 2020 MonitorControl. All rights reserved.
|
||||
//
|
||||
// Copyright © MonitorControl. @JoniVR, @theOneyouseek, @waydabber and others
|
||||
|
||||
import Preferences
|
||||
|
||||
extension Preferences.PaneIdentifier {
|
||||
static let main = Self("Main")
|
||||
static let menusliders = Self("Menu & Sliders")
|
||||
static let keyboard = Self("Keyboard")
|
||||
static let displays = Self("Displays")
|
||||
static let about = Self("About")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue