]> git.wh0rd.org - home.git/blame - .bin/redshift-check
append depot_tools to $PATH rather than prepend to avoid conflicting with system...
[home.git] / .bin / redshift-check
CommitLineData
bd3d5836
MF
1#!/bin/bash
2cd
3export DISPLAY=:0
4
5case $1 in
6--reset) exec redshift -x ;;
7esac
8
98f583b3 9h=$(date +%H)
bd3d5836
MF
10
11declare -A temps
12temps=(
13 [20]=5000
14 [21]=4500
15 [22]=4000
16 [23]=3500
17 [00]=3000
18 [01]=3000
19 [02]=3000
20 [03]=3000
21 [04]=3000
22 [05]=3000
23 [06]=3500
24 [07]=4000
25 [08]=4500
26 [09]=5000
27)
28
29t=${temps[${h}]}
30if [[ -z ${t} ]]; then
31 exec redshift -x
98f583b3 32else
bd3d5836 33 exec redshift -O ${t}k
98f583b3 34fi