Skip to content

Commit 4e0d974

Browse files
committed
Add landscape theme Landscape6Grid, fix issue in CPU temperature background image
1 parent eda5d3c commit 4e0d974

File tree

11 files changed

+281
-5
lines changed

11 files changed

+281
-5
lines changed

config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ config:
88

99
# Theme to use (located in res/themes)
1010
# THEME: Terminal_theme
11+
# THEME: Landscape6Grid
1112
THEME: 3.5inchTheme2_theme
1213

1314
display:

library/stats.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import os
2-
31
import GPUtil
42
import psutil
3+
54
try:
65
import pyamdgpuinfo
76
except ImportError:
@@ -164,7 +163,9 @@ def temperature():
164163
font_color=THEME_DATA['STATS']['CPU']['TEMPERATURE']['TEXT'].get("FONT_COLOR", (0, 0, 0)),
165164
background_color=THEME_DATA['STATS']['CPU']['TEMPERATURE']['TEXT'].get("BACKGROUND_COLOR",
166165
(255, 255, 255)),
167-
background_image=THEME_DATA['STATS']['CPU']['TEMPERATURE']['TEXT'].get("BACKGROUND_IMAGE", None)
166+
background_image=get_full_path(THEME_DATA['PATH'],
167+
THEME_DATA['STATS']['CPU']['TEMPERATURE']['TEXT'].get("BACKGROUND_IMAGE",
168+
None))
168169
)
169170
# TODO: Built in function for *nix in psutil, for Windows can use WMI or a third party library
170171

res/themes/3.5inchTheme2_theme/theme.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ static_text:
2626
# Specify what static text we want to show on the display
2727
# You can create additional records here, the name of the entry must be unique and contain at a minimum the PATH.
2828
# Text are drawn in the order they are listed below, the top text will be drawn first (so places text back to front)
29-
# IMAGE_NAME:
29+
# TEXT_NAME:
3030
# TEXT:
3131
# X:
3232
# Y:
229 KB
Loading
324 KB
Loading
253 KB
Loading
249 KB
Loading
Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
---
2+
display:
3+
# Specify the display orientation for this theme: portrait, landscape, reverse_portrait, reverse_landscape
4+
DISPLAY_ORIENTATION: landscape
5+
6+
# Backplate RGB LED color (for HW revision 'flagship' devices only)
7+
DISPLAY_RGB_LED: [0, 0, 255]
8+
9+
static_images:
10+
# Specify what static images we want to show on the display
11+
# You can create additional records here, the name of the entry must be unique and contain at a minimum the PATH.
12+
# Images are drawn in the order they are listed below, the top image will be drawn first (so places images back to front)
13+
# IMAGE_NAME:
14+
# PATH:
15+
# X:
16+
# Y:
17+
# WIDTH:
18+
# HEIGHT:
19+
BACKGROUND:
20+
PATH: background.png
21+
X: 0
22+
Y: 0
23+
WIDTH: 480
24+
HEIGHT: 320
25+
static_text:
26+
# Specify what static text we want to show on the display
27+
# You can create additional records here, the name of the entry must be unique and contain at a minimum the PATH.
28+
# Text are drawn in the order they are listed below, the top text will be drawn first (so places text back to front)
29+
# TEXT_NAME:
30+
# TEXT:
31+
# X:
32+
# Y:
33+
# FONT:
34+
# FONT_SIZE:
35+
# FONT_COLOR: 0, 0, 0
36+
# BACKGROUND_COLOR: 255, 255, 255 (if you want solid color background)
37+
# BACKGROUND_IMAGE: path of your background picture (if you want transparent background)
38+
STATS:
39+
CPU:
40+
PERCENTAGE:
41+
# In seconds. Longer intervals cause this to refresh more slowly.
42+
# Setting to lower values will display near real time data,
43+
# but may cause significant CPU usage or the display not to update properly
44+
INTERVAL: 1
45+
TEXT:
46+
SHOW: True
47+
X: 35
48+
Y: 45
49+
FONT: jetbrains-mono/JetBrainsMono-Bold.ttf
50+
FONT_SIZE: 40
51+
FONT_COLOR: 255, 255, 255
52+
# BACKGROUND_COLOR: 132, 154, 165
53+
BACKGROUND_IMAGE: background.png
54+
GRAPH:
55+
SHOW: False
56+
X: 155
57+
Y: 50
58+
WIDTH: 150
59+
HEIGHT: 15
60+
MIN_VALUE: 0
61+
MAX_VALUE: 100
62+
BAR_COLOR: 0, 0, 255
63+
BAR_OUTLINE: False
64+
BACKGROUND_COLOR: 0, 0, 0
65+
# BACKGROUND_IMAGE: background.png
66+
FREQUENCY:
67+
# In seconds. Longer intervals cause this to refresh more slowly.
68+
# Setting to lower values will display near real time data,
69+
# but may cause significant CPU usage or the display not to update properly
70+
INTERVAL: 5
71+
TEXT:
72+
SHOW: True
73+
X: 355
74+
Y: 45
75+
FONT: jetbrains-mono/JetBrainsMono-Bold.ttf
76+
FONT_SIZE: 40
77+
FONT_COLOR: 255, 255, 255
78+
# BACKGROUND_COLOR: 132, 154, 165
79+
BACKGROUND_IMAGE: background.png
80+
LOAD:
81+
# In seconds. Longer intervals cause this to refresh more slowly.
82+
# Setting to lower values will display near real time data,
83+
# but may cause significant CPU usage or the display not to update properly
84+
INTERVAL: 5
85+
ONE:
86+
TEXT:
87+
SHOW: False
88+
X: 110
89+
Y: 106
90+
FONT: jetbrains-mono/JetBrainsMono-Bold.ttf
91+
FONT_SIZE: 13
92+
FONT_COLOR: 255, 255, 255
93+
BACKGROUND_COLOR: 50, 50, 50
94+
FIVE:
95+
TEXT:
96+
SHOW: False
97+
X: 183
98+
Y: 106
99+
FONT: jetbrains-mono/JetBrainsMono-Bold.ttf
100+
FONT_SIZE: 13
101+
FONT_COLOR: 255, 255, 255
102+
BACKGROUND_COLOR: 50, 50, 50
103+
FIFTEEN:
104+
TEXT:
105+
SHOW: False
106+
X: 265
107+
Y: 106
108+
FONT: jetbrains-mono/JetBrainsMono-Bold.ttf
109+
FONT_SIZE: 13
110+
FONT_COLOR: 255, 255, 255
111+
BACKGROUND_COLOR: 50, 50, 50
112+
TEMPERATURE:
113+
INTERVAL: 5
114+
TEXT:
115+
SHOW: True
116+
X: 180
117+
Y: 45
118+
FONT: jetbrains-mono/JetBrainsMono-Bold.ttf
119+
FONT_SIZE: 40
120+
FONT_COLOR: 255, 255, 255
121+
# BACKGROUND_COLOR: 132, 154, 165
122+
BACKGROUND_IMAGE: background.png
123+
GPU:
124+
# In seconds. Longer intervals cause this to refresh more slowly.
125+
# Setting to lower values will display near real time data,
126+
# but may cause significant CPU usage or the display not to update properly
127+
INTERVAL: 1
128+
PERCENTAGE:
129+
GRAPH:
130+
SHOW: False
131+
X: 155
132+
Y: 175
133+
WIDTH: 150
134+
HEIGHT: 15
135+
MIN_VALUE: 0
136+
MAX_VALUE: 100
137+
BAR_COLOR: 0, 0, 255
138+
BAR_OUTLINE: False
139+
BACKGROUND_COLOR: 0, 0, 0
140+
# BACKGROUND_IMAGE: background.png
141+
TEXT:
142+
SHOW: True
143+
X: 35
144+
Y: 190
145+
FONT: jetbrains-mono/JetBrainsMono-Bold.ttf
146+
FONT_SIZE: 40
147+
FONT_COLOR: 255, 255, 255
148+
# BACKGROUND_COLOR: 132, 154, 165
149+
BACKGROUND_IMAGE: background.png
150+
MEMORY:
151+
GRAPH:
152+
SHOW: False
153+
X: 115
154+
Y: 215
155+
WIDTH: 178
156+
HEIGHT: 13
157+
MIN_VALUE: 0
158+
MAX_VALUE: 100
159+
BAR_COLOR: 255, 0, 0
160+
BAR_OUTLINE: False
161+
BACKGROUND_COLOR: 0, 0, 0
162+
# BACKGROUND_IMAGE: background.png
163+
TEXT:
164+
SHOW: False
165+
X: 204
166+
Y: 195
167+
FONT: jetbrains-mono/JetBrainsMono-Bold.ttf
168+
FONT_SIZE: 23
169+
FONT_COLOR: 255, 255, 255
170+
BACKGROUND_COLOR: 132, 154, 165
171+
# BACKGROUND_IMAGE: background.png
172+
TEMPERATURE:
173+
TEXT:
174+
SHOW: True
175+
X: 180
176+
Y: 190
177+
FONT: jetbrains-mono/JetBrainsMono-Bold.ttf
178+
FONT_SIZE: 40
179+
FONT_COLOR: 255, 255, 255
180+
# BACKGROUND_COLOR: 132, 154, 165
181+
BACKGROUND_IMAGE: background.png
182+
MEMORY:
183+
# In seconds. Longer intervals cause this to refresh more slowly.
184+
# Setting to lower values will display near real time data,
185+
# but may cause significant CPU usage or the display not to update properly
186+
INTERVAL: 5
187+
SWAP:
188+
GRAPH:
189+
SHOW: False
190+
X: 115
191+
Y: 285
192+
WIDTH: 178
193+
HEIGHT: 13
194+
MIN_VALUE: 0
195+
MAX_VALUE: 100
196+
BAR_COLOR: 255, 0, 0
197+
BAR_OUTLINE: False
198+
BACKGROUND_COLOR: 0, 0, 0
199+
# BACKGROUND_IMAGE: background.png
200+
VIRTUAL:
201+
GRAPH:
202+
SHOW: False
203+
X: 155
204+
Y: 270
205+
WIDTH: 150
206+
HEIGHT: 15
207+
MIN_VALUE: 0
208+
MAX_VALUE: 100
209+
BAR_COLOR: 0, 0, 255
210+
BAR_OUTLINE: False
211+
BACKGROUND_COLOR: 0, 0, 0
212+
# BACKGROUND_IMAGE: background.png
213+
VALUE_TEXT:
214+
SHOW: False
215+
X: 204
216+
Y: 290
217+
FONT: jetbrains-mono/JetBrainsMono-Bold.ttf
218+
FONT_SIZE: 23
219+
FONT_COLOR: 255, 255, 255
220+
BACKGROUND_COLOR: 132, 154, 165
221+
# BACKGROUND_IMAGE: background.png
222+
PERCENT_TEXT:
223+
SHOW: True
224+
X: 350
225+
Y: 190
226+
FONT: jetbrains-mono/JetBrainsMono-Bold.ttf
227+
FONT_SIZE: 40
228+
FONT_COLOR: 255, 255, 255
229+
# BACKGROUND_COLOR: 132, 154, 165
230+
BACKGROUND_IMAGE: background_empty_dark.png
231+
DISK:
232+
INTERVAL: 10
233+
USED:
234+
GRAPH:
235+
SHOW: False
236+
X: 155
237+
Y: 345
238+
WIDTH: 150
239+
HEIGHT: 15
240+
MIN_VALUE: 0
241+
MAX_VALUE: 100
242+
BAR_COLOR: 0, 0, 255
243+
BAR_OUTLINE: False
244+
BACKGROUND_COLOR: 0, 0, 0
245+
# BACKGROUND_IMAGE: background.png
246+
TEXT:
247+
SHOW: False
248+
X: 204
249+
Y: 405
250+
FONT: jetbrains-mono/JetBrainsMono-Bold.ttf
251+
FONT_SIZE: 23
252+
FONT_COLOR: 255, 255, 255
253+
BACKGROUND_COLOR: 132, 154, 165
254+
# BACKGROUND_IMAGE: background.png
255+
TOTAL:
256+
TEXT:
257+
SHOW: False
258+
X: 204
259+
Y: 375
260+
FONT: jetbrains-mono/JetBrainsMono-Bold.ttf
261+
FONT_SIZE: 23
262+
FONT_COLOR: 255, 255, 255
263+
BACKGROUND_COLOR: 132, 154, 165
264+
# BACKGROUND_IMAGE: background.png
265+
FREE:
266+
TEXT:
267+
SHOW: False
268+
X: 204
269+
Y: 435
270+
FONT: jetbrains-mono/JetBrainsMono-Bold.ttf
271+
FONT_SIZE: 23
272+
FONT_COLOR: 255, 255, 255
273+
BACKGROUND_COLOR: 132, 154, 165
274+
# BACKGROUND_IMAGE: background.png
-198 KB
Binary file not shown.

0 commit comments

Comments
 (0)