#!/bin/bash cd export DISPLAY=:0 case $1 in --reset) exec redshift -x ;; esac h=$(date +%H) declare -A temps 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 ) t=${temps[${h}]} if [[ -z ${t} ]]; then exec redshift -x else exec redshift -O ${t}k fi