This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.

Please visit our production wiki at https://wiki.gentoo.org

Redshift

From Gentoo Wiki (test)
Jump to:navigation Jump to:search
Resources

Redshift is an automatic color temperature adjustment to help reduce monitor eye strain induced by working in low-light conditions. Depending on the location (longitude and latitude) of the user's computer system, Redshift will change the color of the screen from the default bluish color to a orange/reddish color during evening hours, and then back again to bluish tint during daylight hours.

Installation

USE flags

USE flags for x11-misc/redshift A screen color temperature adjusting software

appindicator Build in support for notifications using the libindicate or libappindicator plugin
geoclue Control dependency on app-misc/geoclue
gtk Add support for x11-libs/gtk+ (The GIMP Toolkit)
nls Add Native Language Support (using gettext - GNU locale utilities)

Emerge

After setting necessary USE flags, install Redshift:

root #emerge --ask x11-misc/redshift

Configuration

Files

A configuration file can be created in each users home directory at ~/.config/redshift.conf

In order for Redshift to start, it will require longitude and latitude information inside the configuration file.

user $redshift -l manual:help

Saving lon/lat

Redshift can be quickly established in working order by adding correct location information into the configuration file. Lat/Lon values can be found searching for the closest city or region at Wikipedia or with a map service such as OpenStreetMap.

When using OpenScreetMap, simply search for the location. When it appears on the map tiles click the Export button (should be near the top left). The center of the displayed tiles will be the exact Lat/Lon location. The Lat value is the second number from the end displayed in the URL. The Lon value is the last number on the end.

A finished .conf file will look something like this:

FILE ~/.config/redshift.conf
[manual]
lat=47.6587803
lon=-117.4260466

Service

OpenRC

Redshift does not currently include an OpenRC init script.

systemd

user $systemctl --user enable redshift.service
user $systemctl --user start redshift.service

Usage

Invocation

user $redshift -h
Usage: redshift -l LAT:LON -t DAY:NIGHT [OPTIONS...]

Set color temperature of display according to time of day.

  -h		Display this help message
  -v		Verbose output
  -V		Show program version

  -b DAY:NIGHT	Screen brightness to apply (between 0.1 and 1.0)
  -c FILE	Load settings from specified configuration file
  -g R:G:B	Additional gamma correction to apply
  -l LAT:LON	Your current location
  -l PROVIDER	Select provider for automatic location updates
  		(Type `list' to see available providers)
  -m METHOD	Method to use to set color temperature
  		(Type `list' to see available methods)
  -o		One shot mode (do not continuously adjust color temperature)
  -O TEMP	One shot manual mode (set color temperature)
  -p		Print mode (only print parameters and exit)
  -x		Reset mode (remove adjustment from screen)
  -r		Disable temperature transitions
  -t DAY:NIGHT	Color temperature to set at daytime/night

The neutral temperature is 6500K. Using this value will not
change the color temperature of the display. Setting the
color temperature to a value higher than this results in
more blue light, and setting a lower value will result in
more red light.

Default values:

  Daytime temperature: 5500K
  Night temperature: 3500K

Please report bugs to <https://github.com/jonls/redshift/issues>