Using redshift with awesome

Redshift is a Linux program that adjusts the color temperature of your screen to make it easier on your eyes. The awesome-redshift library integrates it with awesome and offers a small API for controlling redshift and working around some of its limitations, such as the dependency on xrandr. Note, however, that this approach means you can't use the gtk-redshift applet.

=Installation=

Download: git clone git://github.com/YoRyan/awesome-redshift.git redshift

rc.lua: local redshift = require("redshift") -- set binary path (optional) redshift.redshift = "/usr/bin/redshift" -- set additional redshift arguments (optional) redshift.options = "-c ~/.config/redshift.conf" -- 1 for dim, 0 for not dimmed redshift.init(1)

=Examples=

Map Super+D to toggle redshift (add this to the globalkeys section): awful.key({modkey}, "d", redshift.toggle)

Create a menu item that starts gimp and automatically reverts the monitor color: mymainmenu = awful.menu({ items = {    ...     { "gimp", function         redshift.undim         awful.util.spawn("/usr/bin/gimp")     end } }})

For more information, see the project page.