-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathctempd.h
37 lines (33 loc) · 1.28 KB
/
ctempd.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef _CTEMP_H
#define _CTEMP_H
#define AVG(c) whitepoints[temp / 500].c * (1 - ratio) + whitepoints[temp / 500 + 1].c * ratio
#define TEMP_DEFAULT 4500
#define SLEEP 60
/* cribbed from redshift, but truncated with 500K steps */
static const struct { float r; float g; float b; } whitepoints[] = {
{ 1.00000000, 0.18172716, 0.00000000, }, /* 1000K */
{ 1.00000000, 0.42322816, 0.00000000, },
{ 1.00000000, 0.54360078, 0.08679949, },
{ 1.00000000, 0.64373109, 0.28819679, },
{ 1.00000000, 0.71976951, 0.42860152, },
{ 1.00000000, 0.77987699, 0.54642268, },
{ 1.00000000, 0.82854786, 0.64816570, },
{ 1.00000000, 0.86860704, 0.73688797, },
{ 1.00000000, 0.90198230, 0.81465502, },
{ 1.00000000, 0.93853986, 0.88130458, },
{ 1.00000000, 0.97107439, 0.94305985, },
{ 1.00000000, 1.00000000, 1.00000000, }, /* 6500K */
{ 0.95160805, 0.96983355, 1.00000000, },
{ 0.91194747, 0.94470005, 1.00000000, },
{ 0.87906581, 0.92357340, 1.00000000, },
{ 0.85139976, 0.90559011, 1.00000000, },
{ 0.82782969, 0.89011714, 1.00000000, },
{ 0.80753191, 0.87667891, 1.00000000, },
{ 0.78988728, 0.86491137, 1.00000000, }, /* 10000K */
{ 0.77442176, 0.85453121, 1.00000000, },
};
void show_usage(void);
void set_color(int);
void daemonize(int);
int sandbox(void);
#endif