Skip to content

Instantly share code, notes, and snippets.

@bcomnes
Created December 9, 2012 07:35
Show Gist options
  • Star 45 You must be signed in to star a gist
  • Fork 13 You must be signed in to fork a gist
  • Save bcomnes/4243805 to your computer and use it in GitHub Desktop.
Save bcomnes/4243805 to your computer and use it in GitHub Desktop.
My configuration file for Redshift. Place it in ~/.config/ Drag redshift onto the Startup Applications menu to have it boot on start
; Global settings
[redshift]
temp-day=6500K
temp-night=5000
transition=1
;gamma=0.8:0.7:0.8
gamma=1.000:1.000:1.000
location-provider=geoclue
;location-provider=manual
adjustment-method=vidmode
;brightness=1.0:0.5
; The location provider and adjustment method settings
; are in their own sections.
; This is an example lat long for Portland, OR
[manual]
lat=45.53068
lon=-122.68317
; In this example screen 1 is adjusted by vidmode. Note
; that the numbering starts from 0, so this is actually
; the second screen.
;[vidmode]
;screen=1
@stankud
Copy link

stankud commented Nov 12, 2013

Thanks, this works perfectly, I just had to change the latitude and longitude for New York.

@zilvins
Copy link

zilvins commented Aug 24, 2016

Can confirm this works nicely, thanks. Also you can adjust the color temperature - higher number of Kelvins(K) is for temperature of color on Blue side of spectre and lower number is for Red one. In this example temp for night is set to 5000 which i found way too high, now i'm using 2700 and this is perfect setting for me.

@orschiro
Copy link

orschiro commented Oct 19, 2016

Are the values for temp-day and temp-night just a matter of taste or are there any recommendations?

And the same question about the gamma values.

@llbraughler
Copy link

@orschiro It's all personal preference. I set my daylight temperature to D65 viewing temperature: https://en.wikipedia.org/wiki/Illuminant_D65 which approximates outside on an overcast day and night time temperature to 2700K, which is the color temp of the LED bulbs in my house.

@Roald87
Copy link

Roald87 commented Sep 7, 2017

I initially failed to implement my own configuration file with manual coordinates. The problem in the end was that there was a space at the end of my latitude number: lat=21.125235⎵.

The error message was:

Malformed argument.
Failed to set manual option.
Try `-l manual:help' for more information.

@lordcirth
Copy link

Thanks! Had the same problem, I would never have noticed that space...

@pgrycz
Copy link

pgrycz commented Sep 26, 2017

doesn't work here, tried all available methods to run redshift (redshift -l or - m options, manual, geoclue/2, randr, vidmode, dummy....) or f.lux, no desirable results :-( they runs, get coordinates but screen doesn't change color, month ago redshift worked, no idea what could help

@razouck
Copy link

razouck commented Dec 3, 2017

@pgrycz wayland?

@SachitNayak
Copy link

I faced some minor errors while using the aforementioned config - something to do with gamma value. Anyway I found another interesting config which worked like a charm for me; thought I'd share

`
; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=5700
temp-night=3500

; Disable the smooth fade between temperatures when Redshift starts and stops.
; 0 will cause an immediate change between screen temperatures.
; 1 will gradually apply the new screen temperature over a couple of seconds.
fade=1

; Solar elevation thresholds.
; By default, Redshift will use the current elevation of the sun to determine
; whether it is daytime, night or in transition (dawn/dusk). When the sun is
; above the degrees specified with elevation-high it is considered daytime and
; below elevation-low it is considered night.
;elevation-high=3
;elevation-low=-6

; Custom dawn/dusk intervals.
; Instead of using the solar elevation, the time intervals of dawn and dusk
; can be specified manually. The times must be specified as HH:MM in 24-hour
; format.
;dawn-time=6:00-7:45
;dusk-time=18:35-20:15

; Set the screen brightness. Default is 1.0.
;brightness=0.9
; It is also possible to use different settings for day and night
; since version 1.8.
;brightness-day=0.7
;brightness-night=0.4
; Set the screen gamma (for all colors, or each color channel
; individually)
gamma=0.8
;gamma=0.8:0.7:0.8
; This can also be set individually for day and night since
; version 1.10.
;gamma-day=0.8:0.7:0.8
;gamma-night=0.6

; Set the location-provider: 'geoclue2', 'manual'
; type 'redshift -l list' to see possible values.
; The location provider settings are in a different section.
location-provider=manual

; Set the adjustment-method: 'randr', 'vidmode'
; type 'redshift -m list' to see all possible values.
; 'randr' is the preferred method, 'vidmode' is an older API.
; but works in some cases when 'randr' does not.
; The adjustment method settings are in a different section.
adjustment-method=randr

; Configuration of the location-provider:
; type 'redshift -l PROVIDER:help' to see the settings.
; ex: 'redshift -l manual:help'
; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
; are negative numbers.
[manual]
lat=48.1
lon=11.6

; Configuration of the adjustment-method
; type 'redshift -m METHOD:help' to see the settings.
; ex: 'redshift -m randr:help'
; In this example, randr is configured to adjust only screen 0.
; Note that the numbering starts from 0, so this is actually the first screen.
; If this option is not specified, Redshift will try to adjust all screens.
[randr]
screen=0
`

@slumbergod
Copy link

on Xubuntu 18.04.1 I had to place the redshift.conf directly inside the ~/.conf/ directory. Redshift ignored it when it was in its own directory i.e. ~/.conf/redshift/redshift.conf

My settings work okay for me:
; Global settings for redshift
[redshift]
; Set the day and night screen temperatures
temp-day=5500
temp-night=3500

; Disable the smooth fade between temperatures when Redshift starts and stops.
; 0 will cause an immediate change between screen temperatures.
; 1 will gradually apply the new screen temperature over a couple of seconds.
transition=1

; Solar elevation thresholds.
; By default, Redshift will use the current elevation of the sun to determine
; whether it is daytime, night or in transition (dawn/dusk). When the sun is
; above the degrees specified with elevation-high it is considered daytime and
; below elevation-low it is considered night.
;elevation-high=3
;elevation-low=-6

; Custom dawn/dusk intervals.
; Instead of using the solar elevation, the time intervals of dawn and dusk
; can be specified manually. The times must be specified as HH:MM in 24-hour
; format.
dawn-time=6:00-7:45
dusk-time=18:00-18:30

; Set the screen brightness. Default is 1.0.
;brightness=0.9
; It is also possible to use different settings for day and night
; since version 1.8.
brightness-day=0.8
brightness-night=0.6
; Set the screen gamma (for all colors, or each color channel
; individually)
;gamma=0.8
gamma=0.8:0.7:0.8
; This can also be set individually for day and night since
; version 1.10.
;gamma-day=0.8
;gamma-night=0.7

; Set the location-provider: 'geoclue2', 'manual'
; type 'redshift -l list' to see possible values.
; The location provider settings are in a different section.
location-provider=manual

; Set the adjustment-method: 'randr', 'vidmode'
; type 'redshift -m list' to see all possible values.
; 'randr' is the preferred method, 'vidmode' is an older API.
; but works in some cases when 'randr' does not.
; The adjustment method settings are in a different section.
adjustment-method=randr

; Configuration of the location-provider:
; type 'redshift -l PROVIDER:help' to see the settings.
; ex: 'redshift -l manual:help'
; Keep in mind that longitudes west of Greenwich (e.g. the Americas)
; are negative numbers.
[manual]
lat=19.44
lon=-99.14

; Configuration of the adjustment-method
; type 'redshift -m METHOD:help' to see the settings.
; ex: 'redshift -m randr:help'
; In this example, randr is configured to adjust only screen 0.
; Note that the numbering starts from 0, so this is actually the first screen.
; If this option is not specified, Redshift will try to adjust all screens.
[randr]
screen=0

@teoman002
Copy link

Here is another config file:

[redshift]
temp-day=5800 
temp-night=3500
brightness-day=1
brightness-night=0.72
dawn-time=5:00-6:00
dusk-time=19:30-20:00
gamma=0.750:0.750:0.750
transition=1
adjustment-method=randr
location-provider=manual
[manual]
lat=%yourLocation%
lon=%yourLocation%

@bcomnes
Copy link
Author

bcomnes commented Oct 1, 2019

Thanks for all the info everyone. This config is ancient but glad people have found the hints helpful

@Mario-paul
Copy link

Thanks to this file I remembered github gists were a thing. Made one of my own with the updated redshift config file settings and now I can retrieve them for new installations/distro hopping. Thanks @bcomnes! also, like @zilvins said, 2700k is perfect at night. not too blue, not too yellow.

@bcomnes
Copy link
Author

bcomnes commented Jun 21, 2021

@Mario-paul Feel free to share a link!

@Mario-paul
Copy link

@Mario-paul Feel free to share a link!

Sure! It works automatically using geoclue2, randr adjustment, and 5800k day 2700k night with smooth transition. Screen brightness and gamma adjustments are disabled but can be added by uncommenting the relevant settings. brightness has separate day and night options too as of a recent-ish redshift update.

enjoy!
https://gist.github.com/Mario-paul/b98d6215282478adf6059cde3956b5ca

@Francisco-Castillo
Copy link

Thanks! =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment