Configuring redshift

This commit is contained in:
Dan Buch
2017-12-15 21:56:55 -05:00
parent 4cfc692186
commit 1948ab154b
3 changed files with 43 additions and 5 deletions

6
config/redshift.conf Normal file
View File

@@ -0,0 +1,6 @@
[redshift]
temp-day=6500
temp-night=3000
transition=1
brightness-day=1.0
brightness-night=0.8

View File

@@ -0,0 +1,26 @@
#!/bin/sh
main() {
: "${BRIGHTNESS_DAY:=100}"
: "${BRIGHTNESS_TRANSITION:=50}"
: "${BRIGHTNESS_NIGHT:=20}"
: "${FADE_TIME:=60000}"
if [[ "${1}" != period-changed ]]; then
return
fi
case "${3}" in
night)
xbacklight -set "${BRIGHTNESS_NIGHT}" -time "${FADE_TIME}"
;;
transition)
xbacklight -set "${BRIGHTNESS_TRANSITION}" -time "${FADE_TIME}"
;;
daytime)
xbacklight -set "${BRIGHTNESS_DAY}" -time "${FADE_TIME}"
;;
esac
}
main "$@"