Skip to content

Commit

Permalink
Add NightShiftEnabler support
Browse files Browse the repository at this point in the history
Closes #80
  • Loading branch information
khronokernel committed Mar 6, 2021
1 parent 1af5182 commit a7ebf72
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
- Enable ThirdPartyDrives to aid with hibernation on 3rd party SATA drives
- Increment OpenCore 7bb41aa (0.6.8 rolling, 2021-03-06)
- Add ForceBooterSignature to resolve hibernation issues
- Add NightShiftEnabler (1.1.0 release e1639f9)

## 0.0.13
- Add CPUFriend support to resolve X86PlatformPlugin clashes
Expand Down
3 changes: 2 additions & 1 deletion OpenCore-Patcher.command
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ system_profiler SPHardwareDataType | grep 'Model Identifier'
- Khronokernel:\tWriting and maintaining this patcher
- DhinakG:\t\tWriting and maintaining this patcher
- Syncretic:\t\tAAAMouSSE and telemetrap
- Slice:\t\tVoodooHDA"""]).start()
- Slice:\t\tVoodooHDA
- cdf:\t\tNightShiftEnabler"""]).start()

def main_menu(self):
response = None
Expand Down
3 changes: 3 additions & 0 deletions Resources/Constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def __init__(self):
self.piixata_version = "1.0.0"
self.backlight_version = "1.0.0"
self.cpufriend_version = "1.2.3"
self.nightshift_version = "1.1.0"

# Get resource path
self.current_path = Path(__file__).parent.parent.resolve()
Expand Down Expand Up @@ -91,6 +92,8 @@ def piixata_path(self): return self.payload_kexts_path / Path(f"Misc/AppleIntelP
def backlight_path(self): return self.payload_kexts_path / Path(f"Misc/AppleBacklightFixup-v{self.backlight_version}.zip")
@property
def cpufriend_path(self): return self.payload_kexts_path / Path(f"Acidanthera/CPUFriend-v{self.cpufriend_version}.zip")
@property
def nightshift_path(self): return self.payload_kexts_path / Path(f"Misc/NightShiftEnabler-v{self.nightshift_version}.zip")

# Build Location
@property
Expand Down
16 changes: 16 additions & 0 deletions Resources/ModelArray.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,4 +777,20 @@
"iMac14,1",
"iMac14,2",
"iMac14,3",
]

NightShiftExclude = [
"MacBookAir5,1",
"MacBookAir5,2",
"MacBookPro9,1",
"MacBookPro9,2",
"MacBookPro10,1",
"MacBookPro10,2",
"Macmini6,1",
"Macmini6,2",
"iMac13,1",
"iMac13,2",
"iMac14,1",
"iMac14,2",
"iMac14,3",
]
1 change: 1 addition & 0 deletions Resources/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def build_efi(self):
("Lilu.kext", self.constants.lilu_version, self.constants.lilu_path, lambda: True),
("WhateverGreen.kext", self.constants.whatevergreen_version, self.constants.whatevergreen_path, lambda: True),
("RestrictEvents.kext", self.constants.restrictevents_version, self.constants.restrictevents_path, lambda: self.model in ModelArray.MacPro71),
("NightShiftEnabler.kext", self.constants.nightshift_version, self.constants.nightshift_path, lambda: self.model not in ModelArray.NightShiftExclude),
# CPU patches
("AppleMCEReporterDisabler.kext", self.constants.mce_version, self.constants.mce_path, lambda: self.model in ModelArray.DualSocket),
("AAAMouSSE.kext", self.constants.mousse_version, self.constants.mousse_path, lambda: self.model in ModelArray.SSEEmulator),
Expand Down
20 changes: 19 additions & 1 deletion payloads/Config/v0.6.8/config.plist
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,24 @@
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
<key>Comment</key>
<string>NightShiftEnabler</string>
<key>Enabled</key>
<false/>
<key>MaxKernel</key>
<string></string>
<key>MinKernel</key>
<string></string>
<key>BundlePath</key>
<string>NightShiftEnabler.kext</string>
<key>ExecutablePath</key>
<string>Contents/MacOS/NightShiftEnabler</string>
<key>PlistPath</key>
<string>Contents/Info.plist</string>
</dict>
<dict>
<key>Arch</key>
<string>x86_64</string>
Expand Down Expand Up @@ -669,7 +687,7 @@
<key>ConsoleAttributes</key>
<integer>0</integer>
<key>HibernateMode</key>
<string>Auto</string>
<string>None</string>
<key>HideAuxiliary</key>
<true/>
<key>LauncherPath</key>
Expand Down
Binary file added payloads/Kexts/Misc/NightShiftEnabler-v1.1.0.zip
Binary file not shown.

0 comments on commit a7ebf72

Please sign in to comment.