Skip to content

Commit 16837f2

Browse files
authored
Implement ctrl + brightness for controlling internal display, Respect enabled option for internal display (MonitorControl#175)
* Refactor display loading logic * Split `Display` into `InternalDisplay` and `ExternalDisplay` * Add functions for controlling internal display brightness * Update MediaKeyTap dependency, Implement ctrl modifier for internal display * Fix `keyRepeatTimer` issue with multiple displays while holding down a MediaKey
1 parent c984a8c commit 16837f2

21 files changed

+309
-206
lines changed

Cartfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
github "the0neyouseek/MediaKeyTap"
1+
github "the0neyouseek/MediaKeyTap" "master"
22
github "reitermarkus/DDC.swift" "master"
33
github "rnine/AMCoreAudio"
44
github "shpakovski/MASPreferences"

Cartfile.resolved

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
github "reitermarkus/DDC.swift" "41e7c49b0450033c5349ca1cf5234a26ebc011b8"
1+
github "reitermarkus/DDC.swift" "1763870c94c555ff93878caaec8235fd3a9a429d"
22
github "rnine/AMCoreAudio" "3.3.1"
33
github "shpakovski/MASPreferences" "1.3"
4-
github "the0neyouseek/MediaKeyTap" "3.1.0"
4+
github "the0neyouseek/MediaKeyTap" "4314a361486c2907956756748939c61f460241bd"

MonitorControl.xcodeproj/project.pbxproj

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@
3434
6C85EFDD22CBAA8F00227EA1 /* PollingModeCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C85EFDC22CBAA8F00227EA1 /* PollingModeCellView.swift */; };
3535
6C85EFDF22CBB54100227EA1 /* PollingCountCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C85EFDE22CBB54100227EA1 /* PollingCountCellView.swift */; };
3636
6C85EFE122CC00AD00227EA1 /* NSNotification+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C85EFE022CC00AD00227EA1 /* NSNotification+Extension.swift */; };
37+
6CBFE27A23DB266000D1BC41 /* Display.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBFE27923DB266000D1BC41 /* Display.swift */; };
38+
6CBFE27C23DB27A200D1BC41 /* InternalDisplay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CBFE27B23DB27A200D1BC41 /* InternalDisplay.swift */; };
3739
6CCB278622D5315200619B05 /* HideOsdCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCB278522D5315200619B05 /* HideOsdCellView.swift */; };
3840
6CD444C322D4FBB8005BFD3D /* LongerDelayCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CD444C222D4FBB8005BFD3D /* LongerDelayCellView.swift */; };
3941
F01B0699228221B7008E64DB /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F01B0680228221B6008E64DB /* Localizable.strings */; };
@@ -42,7 +44,7 @@
4244
F01B069F228221B7008E64DB /* SliderHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F01B068F228221B7008E64DB /* SliderHandler.swift */; };
4345
F01B06A0228221B7008E64DB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F01B0690228221B7008E64DB /* Main.storyboard */; };
4446
F01B06A1228221B7008E64DB /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = F01B0692228221B7008E64DB /* MainMenu.xib */; };
45-
F03A8DF21FFBAA6F0034DC27 /* Display.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03A8DF11FFBAA6F0034DC27 /* Display.swift */; };
47+
F03A8DF21FFBAA6F0034DC27 /* ExternalDisplay.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03A8DF11FFBAA6F0034DC27 /* ExternalDisplay.swift */; };
4648
F03FE4C0228DF62B001F59A4 /* FriendlyNameCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F03FE4BF228DF62A001F59A4 /* FriendlyNameCellView.swift */; };
4749
F0445D3820023E710025AE82 /* MainPrefsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0445D3720023E710025AE82 /* MainPrefsViewController.swift */; };
4850
F0445D3D200254FA0025AE82 /* KeysPrefsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0445D3B200254FA0025AE82 /* KeysPrefsViewController.swift */; };
@@ -125,6 +127,8 @@
125127
6CAD134E23624CC1009BD53F /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Main.strings; sourceTree = "<group>"; };
126128
6CAD134F23624CC1009BD53F /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/MainMenu.strings; sourceTree = "<group>"; };
127129
6CAD135023624CC1009BD53F /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/Localizable.strings; sourceTree = "<group>"; };
130+
6CBFE27923DB266000D1BC41 /* Display.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Display.swift; sourceTree = "<group>"; };
131+
6CBFE27B23DB27A200D1BC41 /* InternalDisplay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InternalDisplay.swift; sourceTree = "<group>"; };
128132
6CCB278522D5315200619B05 /* HideOsdCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HideOsdCellView.swift; sourceTree = "<group>"; };
129133
6CD444C222D4FBB8005BFD3D /* LongerDelayCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LongerDelayCellView.swift; sourceTree = "<group>"; };
130134
B0C4810623357CE500053F91 /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -146,7 +150,7 @@
146150
F01B06A522822215008E64DB /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Main.strings; sourceTree = "<group>"; };
147151
F01B06A622822217008E64DB /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/Main.strings; sourceTree = "<group>"; };
148152
F01B06A72282221B008E64DB /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Main.strings; sourceTree = "<group>"; };
149-
F03A8DF11FFBAA6F0034DC27 /* Display.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Display.swift; sourceTree = "<group>"; };
153+
F03A8DF11FFBAA6F0034DC27 /* ExternalDisplay.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExternalDisplay.swift; sourceTree = "<group>"; };
150154
F03FE4BF228DF62A001F59A4 /* FriendlyNameCellView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FriendlyNameCellView.swift; sourceTree = "<group>"; };
151155
F0445D3720023E710025AE82 /* MainPrefsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainPrefsViewController.swift; sourceTree = "<group>"; };
152156
F0445D3B200254FA0025AE82 /* KeysPrefsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = KeysPrefsViewController.swift; sourceTree = "<group>"; };
@@ -232,11 +236,11 @@
232236
56754EAD1D9A4016007BCDC5 /* MonitorControl */ = {
233237
isa = PBXGroup;
234238
children = (
239+
6C6C34F423DB25BF00C0E9CB /* Model */,
235240
F01B0686228221B6008E64DB /* Info.plist */,
236241
6C85EFD622C74B0E00227EA1 /* Manager */,
237242
56754EAE1D9A4016007BCDC5 /* AppDelegate.swift */,
238243
56754EB01D9A4016007BCDC5 /* Assets.xcassets */,
239-
F03A8DF11FFBAA6F0034DC27 /* Display.swift */,
240244
28D1DDEB227FB8E9004CB494 /* Extensions */,
241245
F01B067F228221B6008E64DB /* Support */,
242246
F01B0687228221B6008E64DB /* UI */,
@@ -245,6 +249,16 @@
245249
path = MonitorControl;
246250
sourceTree = "<group>";
247251
};
252+
6C6C34F423DB25BF00C0E9CB /* Model */ = {
253+
isa = PBXGroup;
254+
children = (
255+
F03A8DF11FFBAA6F0034DC27 /* ExternalDisplay.swift */,
256+
6CBFE27923DB266000D1BC41 /* Display.swift */,
257+
6CBFE27B23DB27A200D1BC41 /* InternalDisplay.swift */,
258+
);
259+
path = Model;
260+
sourceTree = "<group>";
261+
};
248262
6C85EFD622C74B0E00227EA1 /* Manager */ = {
249263
isa = PBXGroup;
250264
children = (
@@ -512,7 +526,9 @@
512526
6CD444C322D4FBB8005BFD3D /* LongerDelayCellView.swift in Sources */,
513527
F03FE4C0228DF62B001F59A4 /* FriendlyNameCellView.swift in Sources */,
514528
6C2EA1CF228F7DFB00060E3F /* PollingMode.swift in Sources */,
515-
F03A8DF21FFBAA6F0034DC27 /* Display.swift in Sources */,
529+
6CBFE27C23DB27A200D1BC41 /* InternalDisplay.swift in Sources */,
530+
6CBFE27A23DB266000D1BC41 /* Display.swift in Sources */,
531+
F03A8DF21FFBAA6F0034DC27 /* ExternalDisplay.swift in Sources */,
516532
F0445D40200259C10025AE82 /* DisplayPrefsViewController.swift in Sources */,
517533
28D1DDF0227FBD99004CB494 /* EDID+Extension.swift in Sources */,
518534
6C85EFDD22CBAA8F00227EA1 /* PollingModeCellView.swift in Sources */,
@@ -703,7 +719,7 @@
703719
CODE_SIGN_IDENTITY = "Mac Developer";
704720
CODE_SIGN_STYLE = Automatic;
705721
COMBINE_HIDPI_IMAGES = YES;
706-
CURRENT_PROJECT_VERSION = 570;
722+
CURRENT_PROJECT_VERSION = 631;
707723
DEVELOPMENT_TEAM = CYC8C8R4K9;
708724
ENABLE_HARDENED_RUNTIME = YES;
709725
FRAMEWORK_SEARCH_PATHS = (
@@ -730,7 +746,7 @@
730746
CODE_SIGN_IDENTITY = "Mac Developer";
731747
CODE_SIGN_STYLE = Automatic;
732748
COMBINE_HIDPI_IMAGES = YES;
733-
CURRENT_PROJECT_VERSION = 570;
749+
CURRENT_PROJECT_VERSION = 631;
734750
DEVELOPMENT_TEAM = CYC8C8R4K9;
735751
ENABLE_HARDENED_RUNTIME = YES;
736752
FRAMEWORK_SEARCH_PATHS = (
@@ -761,7 +777,7 @@
761777
CODE_SIGN_IDENTITY = "Mac Developer";
762778
CODE_SIGN_STYLE = Automatic;
763779
COMBINE_HIDPI_IMAGES = YES;
764-
CURRENT_PROJECT_VERSION = 570;
780+
CURRENT_PROJECT_VERSION = 631;
765781
DEVELOPMENT_TEAM = CYC8C8R4K9;
766782
ENABLE_HARDENED_RUNTIME = YES;
767783
GCC_C_LANGUAGE_STANDARD = gnu11;
@@ -786,7 +802,7 @@
786802
CODE_SIGN_IDENTITY = "Mac Developer";
787803
CODE_SIGN_STYLE = Automatic;
788804
COMBINE_HIDPI_IMAGES = YES;
789-
CURRENT_PROJECT_VERSION = 570;
805+
CURRENT_PROJECT_VERSION = 631;
790806
DEVELOPMENT_TEAM = CYC8C8R4K9;
791807
ENABLE_HARDENED_RUNTIME = YES;
792808
GCC_C_LANGUAGE_STANDARD = gnu11;

0 commit comments

Comments
 (0)