History

macOS Sierra 10.12.4 brings iOS's Night Shift mode to the Mac for the first time. Night Shift, first introduced on iOS devices in iOS 9.3, is designed to gradually shift the display of a device from blue to a subtle yellow, cutting down on exposure to blue light. Blue light is believed to interrupt the circadian rhythm, disrupting sleep patterns.

Night Shift is activated through the Displays section of System Preferences, where a setting to have it come on at sunset and turn off at sunrise is available. It can also be set to turn on and off at custom times. Night Shift can also be toggled on manually using the Notification Center or Siri.

Night Shift was introduced in macOS Sierra 10.12.4 (16E144f) and is controlled by the CoreBrightness.framework. The official minimum requirements for this feature are:

Why We Want It

"Many Studies have shown that exposure to bright blue light in the evening can affect your circadian rhythms and make it harder to fall asleep. Night Shift uses your Macs clock and geolocation to determine when it's sunlight in your location, then it automatically shifts the colors in your display to the warmer end of the spectrum. In the morning, it returns the display to its regular settings. Pleasant dreams"

Apple

Stable

Rather than using a third-party option such as f.lux, you can make use of Apple high quality default Display Function. This Shell Script enables the feature for all Macs

Open Source / Upgradable

This script is completely open source (via Pike’s request) and changes can be made on a instant if needed. This is because the script and a copy of the framework is in the GitHub Repository.

Simple

The script is built with simplicity in mind. The terminal commands are easily identified both within the file and when in progress.

Instructions

This script will replace the CoreBrightness.framework with one already patched with the matching hex value in CoreBrightness.framework for most older/unsupported hardware.

All credits for this work goes to Piker Alpha. Thanks! As requested, this script is intended as non-commerical, with no Donation requests, Open Source, and must give thanks to Pike! Blog URL:

OS Version Requirements

Warning: This patch might stop working in certain macOS Developer Betas or later. Please be cautious and watch this repository for changes.

Patching Instructions

Note: System Integrity Protection must be disabled beforehand in order to patch the framework. You can re-enable it after you're done. Software Updates may revert this patch so always check this repository for updates. HOW TO DISABLE SIP?

Always BACKUP before attempting this patch!

Installer Patching:

Open the Installer in the Root of the RepositoryFollow the steps and agree to the termsInstallUpon Completion, Restart your MacYou will see that the Night Shift tab is now available in System Preferences > Display as well as the toggle at the top of your Notification Center.

Script Patching:

1. Open the Terminal app in your Applications Folder2. Drag the 'Enable NightShift.sh' into the Terminal Window3. Following the instructions4. After Patching. Restart your Mac.5. You will see that the Night Shift tab is now available in System Preferences > Display as well as the toggle at the top of your Notification Center.

Uninstall

1. Open the Terminal app in your Applications Folder2. Drag the 'Uninstaller.sh' into the Terminal Window3. Following the instructions4. After Reverting. Restart your Mac.5. You will see that the Night Shift tab is no longer available.

Known Bugs

Certain Third-party monitors are NOT Compatible with this Patch.

Support

As such, if something goes wrong (like the Display tab in System Preference crashing) or if this framework copy doesn't work. Please feel free to contact me in the Support Page, email me at [email protected], let me know in the GitHub Issues Tab, or attempt it manually via Pike's original blog post. Have Fun!

Announcements

January 15, 2018

I am currently testing macOS High Sierra. Now allowing Feature Requests via Email or Pull Requesting.Thinking into solutions that keep the framework patched throughout updates. Open to suggestions.

Pike’s Universum

Check out Pike’s place. Pike R Alpha is an Avid Apple fan and proud member of the Alpha family. He not only loves Apple stuff, and everything Apple related, but his family also has a deep understanding of the hackintosh community. His work made everything I and the rest of the Hackintosh and OS X Hackers communities do possible and are in great debt to his greatness.

Sponsored Ads

OS X Hackers are is not affiliated with Apple Inc. Mac OS Ten (X), Mac, iOS, iPhone, iPad, and all other Apple product names are trademarks or registered trademarks of Apple Inc. All other company and product names are trademarks or registered trademarks of their respective companies.

MacPostFactor was made by Wayne Wong and Kelian Dumarais Site designed by Isiah Johnson and Robby Sharpero and is provided by Johnson Network.