shmulvad Posted June 8, 2020 Share Posted June 8, 2020 NightShift Quickly turn on/off Night Shift or set it to a custom value between 0 - 100. Installation To download, visit the latest release at GitHub. All further updates are handled automatically. Description Quickly turn on/off Night Shift or set it to a value between 0-100. No more fiddling with deep settings when you either want to save your eyes or need to work with accurate colors! In Alfred, type night followed by either off, on or a number between 0 - 100. Credits The workflow makes use of the following: nshift by leberwurstsaft as the backend for setting the values. OneUpdater by vitorgalvao for handling automatic updates. DanP and Chris Messina 2 Link to comment
DanP Posted September 30, 2020 Share Posted September 30, 2020 Hey @shmulvad, thanks for this! I was trying it out but got the message that "nshift" could not be opened because Apple cannot check it for malicious software. I had to go to System Preferences > Security & Privacy > General, where I could allow nshift to be used. Now it's working like a charm! shmulvad 1 Link to comment
shmulvad Posted September 30, 2020 Author Share Posted September 30, 2020 Nice to hear that you like it, DanP! I don't know how to not have that message show up. If someone more experienced in macOS development here on the forum can me tell how to accomplish it (without having to buy an Apple Developer account), I'll be happy to implement it. Link to comment
deanishe Posted September 30, 2020 Share Posted September 30, 2020 1 hour ago, shmulvad said: without having to buy an Apple Developer account Impossible, AFAIK. Catalina will show a scary warning about any binary that isn't signed by an Apple Developer account. AFAIK, a free account isn't good enough. shmulvad 1 Link to comment
vitor Posted October 1, 2020 Share Posted October 1, 2020 22 hours ago, deanishe said: Catalina will show a scary warning about any binary that isn't signed by an Apple Developer account. If the binary has a quarantine flag. Which is why the binaries we build ourselves don’t show the warning. And the flag needs to be specifically added, which web browsers and other apps who download do. Not curl, so if you download from the command line, no quarantine. When something is quarantined, you can remove the flag with xattr -d com.apple.quarantine /path/to/binary which stops macOS from showing those messages. However, while I can say that’s the case for regular quarantine checks, I’m unsure if that’s also the case for notarisation: i.e., if you’re on a macOS version that complains about non-notarised software, I don’t yet know if removing the quarantine flag will also get rid of those messages. So you may or may not be able to get rid of the message by telling the script part of the Workflow to remove the flag. I’ve thought of that as a way to remove warnings from my own Workflows (the Notificator part) but because I’m still on Mojave, I can’t test. shmulvad 1 Link to comment
shmulvad Posted October 2, 2020 Author Share Posted October 2, 2020 I've added the code to remove the quarantine flag as suggested by @vitor. However, before I did this, I didn't seem to get the warning myself when I deleted the binary and then added it as a new freshly downloaded one. So I'm not sure whether or not this fixes it. Link to comment
deanishe Posted October 2, 2020 Share Posted October 2, 2020 15 minutes ago, shmulvad said: I've added the code to remove the quarantine flag as suggested by @vitor. However, before I did this, I didn't seem to get the warning myself when I deleted the binary and then added it as a new freshly downloaded one. So I'm not sure whether or not this fixes it. The scary Gatekeeper/Catalina warning ("might contain malware") is shown for unsigned/unnotarised binaries. It uses checksums, so downloading a binary you compiled yourself (or identical to one you compiled yourself) won't trigger a warning because it's already whitelisted. DanP 1 Link to comment
dsrjarman Posted April 29, 2021 Share Posted April 29, 2021 Thank you for putting this together. Is there a way to adapt, or use, this workflow so that there is a toggle between on and off? I've added a keyboard Hotkey (F5) to the on command, but it would nice if the same Hotkey could be used to turn NightShift off as well. And if this could bypass the Alfred input text box as well, so much the better. Thanks again! Link to comment
shmulvad Posted April 30, 2021 Author Share Posted April 30, 2021 @dsrjarman, I've added a new option for toggling that accomplishes what you ask for in v1.1.1. Be aware that Alfred strips away the hotkeys from workflows you download, so after downloading it you'll need to set the hotkey (once). Link to comment
dsrjarman Posted April 30, 2021 Share Posted April 30, 2021 @shmulvad What service! This is great, and does just what I was hoping. Thank you for putting this together. I might be back with more ideas... shmulvad 1 Link to comment
fabrizio Posted February 28, 2022 Share Posted February 28, 2022 @shmulvad this is so cool!! Thanks for your time. shmulvad 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now