Skip to content

Commit 97ff030

Browse files
authored
Merge pull request #339 from mathoudebine/feature/add-theme-author
2 parents d78af54 + 9611886 commit 97ff030

File tree

23 files changed

+65
-0
lines changed

23 files changed

+65
-0
lines changed

configure.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import os
2424
import subprocess
2525
import sys
26+
import webbrowser
2627

2728
MIN_PYTHON = (3, 8)
2829
if sys.version_info < MIN_PYTHON:
@@ -155,6 +156,8 @@ def __init__(self):
155156
self.theme_preview = ttk.Label(self.window)
156157
self.theme_preview.place(x=10, y=10)
157158

159+
self.theme_author = ttk.Label(self.window)
160+
158161
sysmon_label = ttk.Label(self.window, text='Display configuration', font='bold')
159162
sysmon_label.place(x=320, y=0)
160163

@@ -252,6 +255,17 @@ def load_theme_preview(self):
252255
self.theme_preview_img = ImageTk.PhotoImage(theme_preview)
253256
self.theme_preview.config(image=self.theme_preview_img)
254257

258+
theme_data = get_theme_data(self.theme_cb.get())
259+
author_name = theme_data.get('author', 'unknown')
260+
self.theme_author.config(text="Author: " + author_name)
261+
if author_name.startswith("@"):
262+
self.theme_author.config(foreground="#a3a3ff", cursor="hand2")
263+
self.theme_author.bind("<Button-1>", lambda e: webbrowser.open_new_tab("https://github.com/" + author_name[1:]))
264+
else:
265+
self.theme_author.config(foreground="#a3a3a3", cursor="")
266+
self.theme_author.unbind("<Button-1>")
267+
self.theme_author.place(x=10, y=self.theme_preview_img.height() + 15)
268+
255269
def load_config_values(self):
256270
with open("config.yaml", "rt", encoding='utf8') as stream:
257271
self.config, ind, bsi = ruamel.yaml.util.load_yaml_guess_indent(stream)

res/themes/3.5inchTheme2/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@mathoudebine"
3+
24
display:
35
DISPLAY_ORIENTATION: portrait
46
DISPLAY_RGB_LED: 0, 0, 255

res/themes/5inchTheme2/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@alexwbaule"
3+
24
display:
35
DISPLAY_SIZE: 5"
46
DISPLAY_ORIENTATION: portrait

res/themes/5inchTheme2Radial/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@arthurferrai"
3+
24
display:
35
DISPLAY_SIZE: 5"
46
DISPLAY_ORIENTATION: portrait

res/themes/BigClock/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@RussNelson"
3+
24
display:
35
DISPLAY_ORIENTATION: landscape
46
DISPLAY_RGB_LED: 255, 0, 0

res/themes/CyanTheme/theme.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
---
2+
author: "@mathoudebine"
3+
24
display:
35
DISPLAY_SIZE: 5"
46
DISPLAY_ORIENTATION: portrait
57
DISPLAY_RGB_LED: 0, 0, 255
8+
69
static_text:
710
GPU_MODEL:
811
TEXT: RTX3080TI
@@ -28,13 +31,15 @@ static_text:
2831
FONT_SIZE: 25
2932
FONT_COLOR: 255, 255, 255
3033
BACKGROUND_IMAGE: background.png
34+
3135
static_images:
3236
BACKGROUND:
3337
PATH: background.png
3438
X: 0
3539
Y: 0
3640
WIDTH: 480
3741
HEIGHT: 800
42+
3843
STATS:
3944
CPU:
4045
PERCENTAGE:

res/themes/Cyberpunk-net/theme.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@amiltonjr"
3+
24
display:
35
DISPLAY_ORIENTATION: portrait
46
DISPLAY_RGB_LED: 255, 255, 0
@@ -59,6 +61,7 @@ static_text:
5961
FONT_SIZE: 15
6062
FONT_COLOR: 255, 239, 8
6163
BACKGROUND_IMAGE: background.png
64+
6265
STATS:
6366
CPU:
6467
PERCENTAGE:

res/themes/Cyberpunk/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@mathoudebine"
3+
24
display:
35
DISPLAY_ORIENTATION: portrait
46
DISPLAY_RGB_LED: 255, 255, 0

res/themes/DragonBall5inch/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@mathoudebine"
3+
24
display:
35
DISPLAY_SIZE: 5"
46
DISPLAY_ORIENTATION: landscape

res/themes/Landscape15Grid/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@mathoudebine"
3+
24
display:
35
DISPLAY_SIZE: 5"
46
DISPLAY_ORIENTATION: landscape

res/themes/Landscape6Grid/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@mathoudebine"
3+
24
display:
35
DISPLAY_ORIENTATION: landscape
46
DISPLAY_RGB_LED: 0, 0, 255

res/themes/LandscapeEarth/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@mathoudebine"
3+
24
display:
35
DISPLAY_ORIENTATION: landscape
46
DISPLAY_RGB_LED: 66, 207, 239

res/themes/LandscapeMagicBlue/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@mathoudebine"
3+
24
display:
35
DISPLAY_ORIENTATION: landscape
46
DISPLAY_RGB_LED: 16, 223, 239

res/themes/NZXT_B/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@mathoudebine"
3+
24
display:
35
DISPLAY_SIZE: 5"
46
DISPLAY_ORIENTATION: landscape

res/themes/NZXT_BLUR/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@mathoudebine"
3+
24
display:
35
DISPLAY_SIZE: 5"
46
DISPLAY_ORIENTATION: landscape

res/themes/NZXT_C/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@mathoudebine"
3+
24
display:
35
DISPLAY_SIZE: 5"
46
DISPLAY_ORIENTATION: landscape

res/themes/NZXT_color/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@mathoudebine"
3+
24
display:
35
DISPLAY_SIZE: 5"
46
DISPLAY_ORIENTATION: landscape

res/themes/NZXT_dynamic/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@mathoudebine"
3+
24
display:
35
DISPLAY_SIZE: 5"
46
DISPLAY_ORIENTATION: landscape

res/themes/PurpleTheme/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@mathoudebine"
3+
24
display:
35
DISPLAY_SIZE: 5"
46
DISPLAY_ORIENTATION: landscape

res/themes/Terminal/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@Ebag333"
3+
24
display:
35
DISPLAY_ORIENTATION: portrait
46
DISPLAY_RGB_LED: 255, 0, 0

res/themes/bash-dark-green-gpu/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@Rollbacke"
3+
24
display:
35
DISPLAY_ORIENTATION: portrait
46
DISPLAY_RGB_LED: 30, 255, 50

res/themes/bash-dark-green/theme.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
author: "@Rollbacke"
3+
24
display:
35
DISPLAY_ORIENTATION: portrait
46
DISPLAY_RGB_LED: 30, 255, 50

res/themes/theme_example.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44

55
# NOTE: Every HW sensor is hidden in this example, to show a sensor change 'SHOW: False' to 'SHOW: True'
66
---
7+
# If you indicate @ with your GitHub username, there will be a hyperlink to your GitHub profile in the Config. Wizard
8+
# Otherwise, you can just indicate any text e.g. author: "Your Name"
9+
# You can also remove the line if you don't want to be credited
10+
author: "@your_GitHub_username"
11+
712
display:
813
# Specify the display size in inch for this theme: 3.5" (default) or 5"
914
DISPLAY_SIZE: 3.5"

0 commit comments

Comments
 (0)