-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconst.lua
136 lines (112 loc) · 4.17 KB
/
const.lua
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
--
--
--
function get_const()
local tmp_center_x, tmp_center_y = 1920, 1080
local tmp_adjust_x, tmp_adjust_y = 350, 200
return {
-- from Conky's configuration file
-- local resolution_x = 1920
-- local resolution_y = 1080
-- gap_x = -1 * (resolution_x / 2),
-- gap_y = -1 * (resolution_y / 2),
-- minimum_height = resolution_y * 2,
-- minimum_width = resolution_x * 2,
-- maximum_width = resolution_x * 2,
CENTER_POSITION = {
SCREEN = {
X = tmp_center_x,
Y = tmp_center_y,
},
THEME = {
X = tmp_center_x + tmp_adjust_x,
Y = tmp_center_y + tmp_adjust_y,
},
},
FONT_FACE_1 = 'GeosansLight',
FONT_FACE_2_1 = 'Raleway Light',
FONT_FACE_2_2 = 'Raleway Thin',
-- Text align
ALIGN = {
LEFT = 'left',
RIGHT = 'right',
},
DIRECTION = {
HORIZONTAL = 'horizontal',
VERTICAL = 'vertical',
},
USAGE_LIMIT = {
CPU = 30,
MEMORY = 60,
FAN = 0, -- tentative, provisional
},
CPU_LOAD_AVERAGE = {
LENGTH = 400, -- length, count of CPU Load Average Graph
HEIGHT = 200,
},
BACKGROUND = {
TILES = {
RECT_STEP = 5,
},
LINES = {
WIDTH = {
NORMAL = 2,
BOLD = 4,
BOLDER = 6,
},
LENGTH = {
--[[
|----d----|
1 1
| |
+ +---------+-----+2 -
| | | |
| | | a
| | | |
- 4+----------+---------Z---------+-------+2 -
| | | |
c | | |
| | | |
- 4+----------+---------+ +
| |
| |
3 3
|----b----|
Z: CENTER_POSITION.THEME.X,Y
1: center to top
2: center to right
3: center to bottom
4: center to left
a: top right height
b: bottom right width
c: bottom left height
d: top left width
]]
CENTER_TO = {
TOP = (tmp_center_y / 2) + tmp_adjust_y, -- tentative, provisional
RIGHT = 450,
BOTTOM = (tmp_center_y / 2) + tmp_adjust_y, -- tentative, provisional
LEFT = nil, -- Get automatically, today's width
},
ADDITION = {
LARGE = 40,
NORMAL = 20,
SMALL = 10,
},
WIDTH = {
TOP_LEFT = nil, -- same value, CPU_LOAD_AVERAGE.LENGTH
BOTTOM_LEFT = nil, -- Today's width
TOP_RIGHT = nil, -- same value, LINE_LENGTH.CENTER_TO.RIGHT
BOTTOM_RIGHT = 350,
},
HEIGHT = {
TOP_LEFT = nil, -- same value, LINE_LENGTH.CNTER_TO.TOP
BOTTOM_LEFT = 350,
TOP_RIGHT = 350,
BOTTOM_RIGHT = nil, -- same value, LINE_LENGTH.CNTER_TO.BOTTOM
},
},
},
},
}
end