From: Mike Frysinger Date: Wed, 14 Feb 2018 04:57:33 +0000 (-0500) Subject: redshift-check: make it redder X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=75e0db828c57fbbcb822d8b2950c59047143a40b;p=home.git redshift-check: make it redder --- diff --git a/.bin/redshift-check b/.bin/redshift-check index 9481c09..b90eadb 100755 --- a/.bin/redshift-check +++ b/.bin/redshift-check @@ -24,6 +24,11 @@ main() { cd / export DISPLAY=:0 + local auth="${HOME}/.Xauthority" + if [[ -e ${auth} ]]; then + export XAUTHORITY=${auth} + fi + while [[ $# -gt 0 ]] ; do case $1 in -x|--reset) rs -x ;; @@ -35,21 +40,22 @@ main() { h=$(date +%H) declare -A temps + local min=2000 temps=( - [20]=5000 - [21]=4500 - [22]=4000 - [23]=3500 - [00]=3000 - [01]=3000 - [02]=3000 - [03]=3000 - [04]=3000 - [05]=3000 - [06]=3500 - [07]=4000 - [08]=4500 - [09]=5000 + [20]=$(( min + 2000 )) + [21]=$(( min + 1500 )) + [22]=$(( min + 1000 )) + [23]=$(( min + 500 )) + [00]=$(( min )) + [01]=$(( min )) + [02]=$(( min )) + [03]=$(( min )) + [04]=$(( min )) + [05]=$(( min )) + [06]=$(( min + 500 )) + [07]=$(( min + 1000 )) + [08]=$(( min + 1500 )) + [09]=$(( min + 2000 )) ) t=${temps[${h}]}