Skip to content

Commit 087bb13

Browse files
committed
🔧 Refactoring + preparing v1.2
- Refactoring of the way the slider are created - Read the current value of ddcctl monitor after launching the app, so no more value at 0 for the sliders - When there's only one monitor, display it directly, not in a submenu, closes #10 - Added a "start at login" helper (still need testing) for v1.2 Signed-off-by: Guillaume Broder <iamnotheoneyouseek@gmail.com>
1 parent 1112380 commit 087bb13

File tree

14 files changed

+336
-209
lines changed

14 files changed

+336
-209
lines changed

.github/rules.json

Lines changed: 0 additions & 120 deletions
This file was deleted.

MonitorControl.xcodeproj/project.pbxproj

Lines changed: 136 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,28 @@
1919
F0445D40200259C10025AE82 /* DisplayPrefsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0445D3F200259C10025AE82 /* DisplayPrefsViewController.swift */; };
2020
F0445D41200282E60025AE82 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = F0445D43200282E60025AE82 /* Main.storyboard */; };
2121
F0445D4D200294AB0025AE82 /* ButtonCellView.swift in Sources */ = {isa = PBXBuildFile; fileRef = F0445D4C200294AB0025AE82 /* ButtonCellView.swift */; };
22+
F06792EA200A73460066C438 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = F06792E9200A73460066C438 /* AppDelegate.swift */; };
23+
F06792F6200A745F0066C438 /* MonitorControlHelper.app in [Login] Copy Helper to start at Login */ = {isa = PBXBuildFile; fileRef = F06792E7200A73460066C438 /* MonitorControlHelper.app */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
2224
F091C9B31F6EA6110096FD65 /* SliderHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = F091C9B21F6EA6110096FD65 /* SliderHandler.swift */; };
2325
F091C9B81F6EA79B0096FD65 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = F091C9B71F6EA79B0096FD65 /* Utils.swift */; };
2426
F0A987E81F77B40E009B603D /* OSD.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F0A987D61F77B290009B603D /* OSD.framework */; };
2527
F0EB972F1F6ED7C800686D2A /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = F091C9C11F6EB8660096FD65 /* Localizable.strings */; };
2628
/* End PBXBuildFile section */
2729

30+
/* Begin PBXCopyFilesBuildPhase section */
31+
F06792F5200A73FA0066C438 /* [Login] Copy Helper to start at Login */ = {
32+
isa = PBXCopyFilesBuildPhase;
33+
buildActionMask = 2147483647;
34+
dstPath = Contents/Library/LoginItems;
35+
dstSubfolderSpec = 1;
36+
files = (
37+
F06792F6200A745F0066C438 /* MonitorControlHelper.app in [Login] Copy Helper to start at Login */,
38+
);
39+
name = "[Login] Copy Helper to start at Login";
40+
runOnlyForDeploymentPostprocessing = 0;
41+
};
42+
/* End PBXCopyFilesBuildPhase section */
43+
2844
/* Begin PBXFileReference section */
2945
31E16D90527EBD3F8A12BE0B /* Pods-MonitorControl.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MonitorControl.release.xcconfig"; path = "Pods/Target Support Files/Pods-MonitorControl/Pods-MonitorControl.release.xcconfig"; sourceTree = "<group>"; };
3046
398F482D5C8816B29F16AAEB /* Pods_MonitorControl.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MonitorControl.framework; sourceTree = BUILT_PRODUCTS_DIR; };
@@ -50,6 +66,10 @@
5066
F0445D49200285690025AE82 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/MainMenu.strings; sourceTree = "<group>"; };
5167
F0445D4B2002856C0025AE82 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/MainMenu.strings; sourceTree = "<group>"; };
5268
F0445D4C200294AB0025AE82 /* ButtonCellView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ButtonCellView.swift; sourceTree = "<group>"; };
69+
F06792E7200A73460066C438 /* MonitorControlHelper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MonitorControlHelper.app; sourceTree = BUILT_PRODUCTS_DIR; };
70+
F06792E9200A73460066C438 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
71+
F06792F0200A73470066C438 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
72+
F06792F1200A73470066C438 /* MonitorControlHelper.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MonitorControlHelper.entitlements; sourceTree = "<group>"; };
5373
F091C9B21F6EA6110096FD65 /* SliderHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SliderHandler.swift; sourceTree = "<group>"; };
5474
F091C9B71F6EA79B0096FD65 /* Utils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = "<group>"; };
5575
F091C9C21F6EB8660096FD65 /* en */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; lineEnding = 0; name = en; path = en.lproj/Localizable.strings; sourceTree = "<group>"; };
@@ -79,6 +99,13 @@
7999
);
80100
runOnlyForDeploymentPostprocessing = 0;
81101
};
102+
F06792E4200A73460066C438 /* Frameworks */ = {
103+
isa = PBXFrameworksBuildPhase;
104+
buildActionMask = 2147483647;
105+
files = (
106+
);
107+
runOnlyForDeploymentPostprocessing = 0;
108+
};
82109
/* End PBXFrameworksBuildPhase section */
83110

84111
/* Begin PBXGroup section */
@@ -101,6 +128,7 @@
101128
56754EAD1D9A4016007BCDC5 /* MonitorControl */,
102129
F0A987D61F77B290009B603D /* OSD.framework */,
103130
55359E321E2737EC002671BC /* ddcctl */,
131+
F06792E8200A73460066C438 /* MonitorControlHelper */,
104132
56754EAC1D9A4016007BCDC5 /* Products */,
105133
F0A987D71F77B404009B603D /* Frameworks */,
106134
EFFC2F3E35BEC9ACFA754137 /* Pods */,
@@ -111,6 +139,7 @@
111139
isa = PBXGroup;
112140
children = (
113141
56754EAB1D9A4016007BCDC5 /* MonitorControl.app */,
142+
F06792E7200A73460066C438 /* MonitorControlHelper.app */,
114143
);
115144
name = Products;
116145
sourceTree = "<group>";
@@ -151,6 +180,16 @@
151180
path = Prefs;
152181
sourceTree = "<group>";
153182
};
183+
F06792E8200A73460066C438 /* MonitorControlHelper */ = {
184+
isa = PBXGroup;
185+
children = (
186+
F06792E9200A73460066C438 /* AppDelegate.swift */,
187+
F06792F0200A73470066C438 /* Info.plist */,
188+
F06792F1200A73470066C438 /* MonitorControlHelper.entitlements */,
189+
);
190+
path = MonitorControlHelper;
191+
sourceTree = "<group>";
192+
};
154193
F091C9B41F6EA6180096FD65 /* Objects */ = {
155194
isa = PBXGroup;
156195
children = (
@@ -208,6 +247,7 @@
208247
56754EA91D9A4016007BCDC5 /* Resources */,
209248
9DD5968596EFAF0E2EB56496 /* [CP] Embed Pods Frameworks */,
210249
3ACE91333FC1E781FB2E44E5 /* [CP] Copy Pods Resources */,
250+
F06792F5200A73FA0066C438 /* [Login] Copy Helper to start at Login */,
211251
);
212252
buildRules = (
213253
);
@@ -218,13 +258,30 @@
218258
productReference = 56754EAB1D9A4016007BCDC5 /* MonitorControl.app */;
219259
productType = "com.apple.product-type.application";
220260
};
261+
F06792E6200A73460066C438 /* MonitorControlHelper */ = {
262+
isa = PBXNativeTarget;
263+
buildConfigurationList = F06792F4200A73470066C438 /* Build configuration list for PBXNativeTarget "MonitorControlHelper" */;
264+
buildPhases = (
265+
F06792E3200A73460066C438 /* Sources */,
266+
F06792E4200A73460066C438 /* Frameworks */,
267+
F06792E5200A73460066C438 /* Resources */,
268+
);
269+
buildRules = (
270+
);
271+
dependencies = (
272+
);
273+
name = MonitorControlHelper;
274+
productName = MonitorControlHelper;
275+
productReference = F06792E7200A73460066C438 /* MonitorControlHelper.app */;
276+
productType = "com.apple.product-type.application";
277+
};
221278
/* End PBXNativeTarget section */
222279

223280
/* Begin PBXProject section */
224281
56754EA31D9A4016007BCDC5 /* Project object */ = {
225282
isa = PBXProject;
226283
attributes = {
227-
LastSwiftUpdateCheck = 0800;
284+
LastSwiftUpdateCheck = 0920;
228285
LastUpgradeCheck = 0900;
229286
ORGANIZATIONNAME = "Mathew Kurian";
230287
TargetAttributes = {
@@ -234,6 +291,11 @@
234291
LastSwiftMigration = 0900;
235292
ProvisioningStyle = Automatic;
236293
};
294+
F06792E6200A73460066C438 = {
295+
CreatedOnToolsVersion = 9.2;
296+
DevelopmentTeam = KGY56RWR9A;
297+
ProvisioningStyle = Automatic;
298+
};
237299
};
238300
};
239301
buildConfigurationList = 56754EA61D9A4016007BCDC5 /* Build configuration list for PBXProject "MonitorControl" */;
@@ -251,6 +313,7 @@
251313
projectRoot = "";
252314
targets = (
253315
56754EAA1D9A4016007BCDC5 /* MonitorControl */,
316+
F06792E6200A73460066C438 /* MonitorControlHelper */,
254317
);
255318
};
256319
/* End PBXProject section */
@@ -268,6 +331,13 @@
268331
);
269332
runOnlyForDeploymentPostprocessing = 0;
270333
};
334+
F06792E5200A73460066C438 /* Resources */ = {
335+
isa = PBXResourcesBuildPhase;
336+
buildActionMask = 2147483647;
337+
files = (
338+
);
339+
runOnlyForDeploymentPostprocessing = 0;
340+
};
271341
/* End PBXResourcesBuildPhase section */
272342

273343
/* Begin PBXShellScriptBuildPhase section */
@@ -293,11 +363,13 @@
293363
);
294364
inputPaths = (
295365
"${SRCROOT}/Pods/Target Support Files/Pods-MonitorControl/Pods-MonitorControl-frameworks.sh",
366+
"${BUILT_PRODUCTS_DIR}/HotKey/HotKey.framework",
296367
"${BUILT_PRODUCTS_DIR}/MASPreferences/MASPreferences.framework",
297368
"${BUILT_PRODUCTS_DIR}/MediaKeyTap/MediaKeyTap.framework",
298369
);
299370
name = "[CP] Embed Pods Frameworks";
300371
outputPaths = (
372+
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HotKey.framework",
301373
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MASPreferences.framework",
302374
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MediaKeyTap.framework",
303375
);
@@ -357,6 +429,14 @@
357429
);
358430
runOnlyForDeploymentPostprocessing = 0;
359431
};
432+
F06792E3200A73460066C438 /* Sources */ = {
433+
isa = PBXSourcesBuildPhase;
434+
buildActionMask = 2147483647;
435+
files = (
436+
F06792EA200A73460066C438 /* AppDelegate.swift in Sources */,
437+
);
438+
runOnlyForDeploymentPostprocessing = 0;
439+
};
360440
/* End PBXSourcesBuildPhase section */
361441

362442
/* Begin PBXVariantGroup section */
@@ -564,6 +644,52 @@
564644
};
565645
name = Release;
566646
};
647+
F06792F2200A73470066C438 /* Debug */ = {
648+
isa = XCBuildConfiguration;
649+
buildSettings = {
650+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
651+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
652+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
653+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
654+
CODE_SIGN_ENTITLEMENTS = MonitorControlHelper/MonitorControlHelper.entitlements;
655+
CODE_SIGN_IDENTITY = "Mac Developer";
656+
CODE_SIGN_STYLE = Automatic;
657+
COMBINE_HIDPI_IMAGES = YES;
658+
DEVELOPMENT_TEAM = KGY56RWR9A;
659+
GCC_C_LANGUAGE_STANDARD = gnu11;
660+
INFOPLIST_FILE = MonitorControlHelper/Info.plist;
661+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
662+
MACOSX_DEPLOYMENT_TARGET = 10.13;
663+
PRODUCT_BUNDLE_IDENTIFIER = me.guillaumeb.MonitorControlHelper;
664+
PRODUCT_NAME = "$(TARGET_NAME)";
665+
SKIP_INSTALL = YES;
666+
SWIFT_VERSION = 4.0;
667+
};
668+
name = Debug;
669+
};
670+
F06792F3200A73470066C438 /* Release */ = {
671+
isa = XCBuildConfiguration;
672+
buildSettings = {
673+
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
674+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
675+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
676+
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
677+
CODE_SIGN_ENTITLEMENTS = MonitorControlHelper/MonitorControlHelper.entitlements;
678+
CODE_SIGN_IDENTITY = "Mac Developer";
679+
CODE_SIGN_STYLE = Automatic;
680+
COMBINE_HIDPI_IMAGES = YES;
681+
DEVELOPMENT_TEAM = KGY56RWR9A;
682+
GCC_C_LANGUAGE_STANDARD = gnu11;
683+
INFOPLIST_FILE = MonitorControlHelper/Info.plist;
684+
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
685+
MACOSX_DEPLOYMENT_TARGET = 10.13;
686+
PRODUCT_BUNDLE_IDENTIFIER = me.guillaumeb.MonitorControlHelper;
687+
PRODUCT_NAME = "$(TARGET_NAME)";
688+
SKIP_INSTALL = YES;
689+
SWIFT_VERSION = 4.0;
690+
};
691+
name = Release;
692+
};
567693
/* End XCBuildConfiguration section */
568694

569695
/* Begin XCConfigurationList section */
@@ -585,6 +711,15 @@
585711
defaultConfigurationIsVisible = 0;
586712
defaultConfigurationName = Release;
587713
};
714+
F06792F4200A73470066C438 /* Build configuration list for PBXNativeTarget "MonitorControlHelper" */ = {
715+
isa = XCConfigurationList;
716+
buildConfigurations = (
717+
F06792F2200A73470066C438 /* Debug */,
718+
F06792F3200A73470066C438 /* Release */,
719+
);
720+
defaultConfigurationIsVisible = 0;
721+
defaultConfigurationName = Release;
722+
};
588723
/* End XCConfigurationList section */
589724
};
590725
rootObject = 56754EA31D9A4016007BCDC5 /* Project object */;

0 commit comments

Comments
 (0)