Hacker News new | past | comments | ask | show | jobs | submit login

I wrote a patch to redshift to make it work on my Mac, and I've been enjoying that: https://bugs.launchpad.net/redshift/+bug/1225567

It's command-line, like the Linux version, which means it's very lightweight. It's using 0% CPU (looks like 4 seconds of CPU over the last week or two), but it does seem to use 111 MB memory -- I'm curious why and might poke at it. (Yay free software.)

wyvern:~/src/redshift/redshift-1.7/src gthomas$ otool -L redshift redshift: /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics (compatibility version 64.0.0, current version 600.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)




Could you possibly submit this to the Homebrew repository?

https://github.com/mxcl/homebrew/wiki


That's a great idea. I don't use homebrew myself, so that didn't occur to me. I'll try emailing the upstream author first and see if they want it, and submit to homebrew if I don't hear back.


What's the best way have redshift run on startup (or login) on OS X?


Replying to myself, for future searchers:

First, the latest patched version can be found at https://github.com/geofft/redshift

You may need autoconf, automake, and gettext. I used homebrew. I also had to run

  ln -s /usr/local/opt/gettext/bin/autopoint /usr/local/bin
to get the autopoint build-time dependency.

To get redshift to run at login, we'll use launchd. Save the following as ~/Library/LaunchAgents/redshift.plist (modify as needed if your binary and config files are elsewhere).

  <plist version="1.0">
   <dict>
     <key>Label</key>
     <string>redshift</string>
     <key>RunAtLoad</key>
     <true />
     <key>Program</key>
     <string>/usr/local/bin/redshift</string>
     <key>OnDemand</key>
     <false/>
     <key>ProgramArguments</key>
     <array>
     <string>-c ~/.config/redshift.conf</string>
     </array>
    </dict>
  </plist>
then run

  launchctl load ~/Library/LaunchAgents/redshift.plist
You can use

  launchctl list | grep redshift
to see that it's working. Thanks to http://developernotes.com/archive/2011/04/06/169.aspx




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: