Skip to content

Commit

Permalink
feat(redshift): add redshift for color temperature.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hanaasagi committed Nov 24, 2021
1 parent 0000000 commit 0000000
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
9 changes: 9 additions & 0 deletions bspwm/bspwmrc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ xautolock -time 10 -locker 'lock' -corners ---- -cornersize 30 &
hsetroot -fill $WALLPAPER_PATH
# battery checker
sh $HOME/.local/bin/check-battery.sh &
# start redshift
if pgrep -x redshift > /dev/null
then
pid=$(pidof redshift)
kill $pid
# we need to wait redshift shutdown, otherwise color temperature is wrong.
while kill -0 $pid 2>/dev/null; do sleep 0.01; done
fi
redshift &

# ##############################################################################
# # WINDOW RULES #
Expand Down
51 changes: 51 additions & 0 deletions redshift/redshift.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
[redshift]
; Daytime temperature
temp-day=5800

; Night temperature
temp-night=5000

; Disable or enable fading between color temperatures when Redshift starts or stops
fade=0

; Set the screen brightness. Default is 1.0.
brightness=1.0

; Screen brightness at daytime
brightness-day=0.9

; Screen brightness at night
brightness-night=0.7

; Gamma adjustment to apply (day and night)
gamma=0.9

; 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=35.0116
lon=135.7681

; 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

0 comments on commit 0000000

Please sign in to comment.