Title: redshift Subject: A screen color temperature adjusting software ------------------------------------------------------ The Strong Blue light of LCD light can cause headaches. Redshift is built into OsX and iOS. For windows f.lux is great, but the Linux port is not feature full. KDE 5.11 (not released yet) will offer a solution, but not ready yet. I found Redshift (http://jonls.dk/redshift/), but primarily for systemd init. My init system is OpenRC, rather than Systemd, as Gentoo Linux distribution has freedom of choice not avaiable by Debian. ------------------------------ Setup ------------------------------ # # Setup use flags to compile redshift with support for geoclue # echo 'x11-misc/redshift appindicator geoclue' >> /etc/portage/package.use # # build and install geoclue and redshift # emerge app-misc/geoclue x11-misc/redshift # # List installed packages # eix -I geoclue [I] app-misc/geoclue Available versions: (0) 0.12.99 (2.0) 2.4.7 {connman geonames gps gsmloc gtk hostip +introspection manual +modemmanager networkmanager nominatim plazes skyhook static-libs yahoo-geo zeroconf} Installed versions: 2.4.7(2.0)(03:07:50 AM 10/31/2017)(introspection modemmanager -zeroconf) Homepage: https://freedesktop.org/wiki/Software/GeoClue Description: A geoinformation D-Bus service eix -I app-misc/geoclue [I] x11-misc/redshift Available versions: 1.11-r1 {appindicator geoclue gtk nls PYTHON_TARGETS="python3_4 python3_5 python3_6"} Installed versions: 1.11-r1(10:37:35 PM 11/17/2017)(geoclue gtk nls -appindicator PYTHON_TARGETS="python3_4 -python3_5 -python3_6") Homepage: http://jonls.dk/redshift/ Description: A screen color temperature adjusting software # # My ThinkPad T420s has an Optimus video card, which has a dual GPU (Nvidia/Intel). # # Redshift on my laptop used 100% of one CPU core by default, so I need to optimize. # # By using bumblebee and optirun, redshift uses the GPU rather than CPU. # # # Build and install bumblebee and optirun # emerge bumble eix -I bumble [I] x11-misc/bumblebee Available versions: 3.2.1 ~3.2.1_p20170123 **9999 {+bbswitch VIDEO_CARDS="nouveau nvidia"} Installed versions: 3.2.1(10:26:50 AM 03/01/2016)(bbswitch VIDEO_CARDS="nvidia -nouveau") Homepage: https://bumblebee-project.org https://github.com/Bumblebee-Project/Bumblebee Description: Service providing elegant and stable means of managing Optimus graphics chipsets rc-update add bumble /etc/init.d/bumblebee start # # List 'adjustment methods' supported by the built redshift binary # redshift -m list Available adjustment methods: drm randr vidmode dummy # # Create config # set latitude and longitude # set adjustment-method # set location-provider # ######################################### cat >> ~/.config/redshift.conf <<'END_CONFIG' ; Global settings for redshift [redshift] ; Set the day and night screen temperatures temp-day=3000 temp-night=3500 ; Enable/Disable a smooth transition between day and night ; 0 will cause a direct change from day to night screen temperature. ; 1 will gradually increase or decrease the screen temperature. transition=1 ; 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 ;gamma=1.000:1.000:1.000 ; 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: 'geoclue', 'geoclue2', 'manual' ; type 'redshift -l list' to see possible values. ; The location provider settings are in a different section. location-provider=geoclue2 ; 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=vidmode ; 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=37.9358 lon=122.3477 ; 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 screen 1. ; Note that the numbering starts from 0, so this is actually the ; second screen. If this option is not specified, Redshift will try ; to adjust _all_ screens. ;[randr] ;screen=1 ; 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 END_CONFIG ######################################### # # Create a script to start redshift # ######################################### cat > ~/bin/redshift_start.bash <<'END_CONFIG' #!/bin/bash # Confg file: ~/.config/redshift.conf # Depends on: /etc/init.d/bumblebee optirun redshift END_CONFIG ######################################### # # Start it # chmod +x ~/.config/redshift.conf ~/.config/redshift.conf # # I noticed the refshift faded in gradually # the sharp blue reduced. # # # I noticed the headache did not build as quickly. #