- Notifications
You must be signed in to change notification settings - Fork425
Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night.
License
jonls/redshift
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Redshift adjusts the color temperature of your screen according toyour surroundings. This may help your eyes hurt less if you areworking in front of the screen at night.
README versions:latest |1.12 |1.11
Runredshift -h
for help on command line options. You can run the programasredshift-gtk
instead ofredshift
for a graphical status icon.
- Project page:https://github.com/jonls/redshift
Redshift applies a redness effect to the graphical display. The intensity of the redness can be customized andscheduled to only be applied at night or to be applied with more intensity at night.
Redshift uses the gamma correction ramps to apply this effect which has traditionally been the onlyway of applying a color effect to the display. Note that this is really a hack to work around the absense of astandardized way of applying color effects, and it is resulting in several issues some of which are explained intheFAQ section below. As long as Redshift is using gamma ramps, many of these issues are impossible to solve properlyin Redshift.
Since Redshift was first created, many desktop environments have adopted similar functionality as an integratedcomponent:
- GNOME:Night Light
- Plasma: Night Color
- Windows:Night Light
- macOS: Night Shift
Using the features integrated into the desktop environments avoids many of the issues with gamma ramps which is whythese implementations should generally be favored over Redshift. On the other hand, Redshift may offer some additionalflexibility that is not available in the integrated features.
Use the packages provided by your distribution, e.g. for Ubuntu:apt-get install redshift
orapt-get install redshift-gtk
. For developers,please seeBuilding from source andLatest builds from master branch below.
A configuration file is not required but is useful for saving customconfigurations and manually defining the location in case of issues with theautomatic location provider. An example configuration can be found inredshift.conf.sample.
The configuration file should be saved in the following location depending onthe platform:
- Linux/macOS:
~/.config/redshift/redshift.conf
(if the environment variableXDG_CONFIG_HOME
is undefined) or${XDG_CONFIG_HOME}/redshift/redshift.conf
(ifXDG_CONFIG_HOME
is defined). - Windows: Put
redshift.conf
in%USERPROFILE%\AppData\Local\
(aka%localappdata%
).
There are multiple web sites that provide coordinates for map locations, forexample clicking anywhere on Google Maps will bring up a box with thecoordinates. Remember that longitudes in the western hemisphere (e.g. theAmericas) must be provided to Redshift as negative numbers.
It is possible that the location services have been disabled completely. Thecheck for this case varies by desktop environment. For example, in GNOME thelocation services can be toggled in Settings > Privacy > Location Services.
If this is not the case, it is possible that Redshift has been improperlyinstalled or not been given the required permissions to obtain locationupdates from a system administrator. See#318 for further discussion on thisissue.
Certain video drivers do not support adjustable gamma ramps. In some casesRedshift will fail with an error message, but other drivers silently ignoreadjustments to the gamma ramp.
Redshift has a brightness adjustment setting but it does not work the way mostpeople might expect. In fact it is a fake brightness adjustment obtained bymanipulating the gamma ramps which means that it does not reduce the backlightof the screen. Preferably only use it if your normal backlight adjustment istoo coarse-grained.
The Wayland protocol does not support Redshift. There is currently no way forRedshift to adjust the color temperature in Wayland.
Instead, you can use:
- In GNOME Shell: Settings → Display Settings → Night Light
- In Plasma: System Settings → Display and Monitor → Night Color
Mir does not support Redshift.
You need to export your environment variables when your window manager orcompositor start up. Typically, you want to run this as part of its startup:
systemctl --user import-environment; systemctl --user start graphical-session.target
See your compositor's (or window manager's) documentation for further detailsof setting up the systemd user session.
Related issues:#753.
This usually happens to users in America when the longitude has been set in theconfiguration file to a positive number. Longitudes in the western hemisphereshould be provided as negative numbers (e.g. New York City is at approximatelylatitude/longitude 41, -74).
Redshift uses the gamma ramps of the graphics driver to apply the rednesseffect but Redshift cannot block other applications from also changing thegamma ramps. Some applications (particularly games and video players) willreset the gamma ramps. After a few seconds Redshift will kick in again. Thereis no way for Redshift to prevent this from happening.
You may have multiple instances of Redshift running simultaneously. Make surethat only one instance is running for the display where you are seeing theflicker.
Mouse cursors are usually handled separately by the graphics hardware and isnot affected by gamma ramps. Some graphics drivers can be configured to usesoftware cursors instead.
Please go tothe issue tracker andcheck if your issue has already been reported. If not, please open a new issuedescribing you problem.
- Ubuntu PPA (
sudo add-apt-repository ppa:dobey/redshift-daily
) - Windows x86_64
- Windows x86
See the fileCONTRIBUTING for more details.
About
Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night.