From fef2834eb5ed5bb7c10eaca7ad7359211bfaa963 Mon Sep 17 00:00:00 2001 From: Matthieu Houdebine Date: Tue, 26 Sep 2023 18:35:05 +0200 Subject: [PATCH 1/3] Add authors for existing themes, and display it on Configuration Wizard --- configure.py | 6 ++++++ res/themes/3.5inchTheme2/theme.yaml | 2 ++ res/themes/5inchTheme2/theme.yaml | 2 ++ res/themes/5inchTheme2Radial/theme.yaml | 2 ++ res/themes/BigClock/theme.yaml | 2 ++ res/themes/CyanTheme/theme.yaml | 5 +++++ res/themes/Cyberpunk-net/theme.yaml | 3 +++ res/themes/Cyberpunk/theme.yaml | 2 ++ res/themes/DragonBall5inch/theme.yaml | 2 ++ res/themes/Landscape15Grid/theme.yaml | 2 ++ res/themes/Landscape6Grid/theme.yaml | 2 ++ res/themes/LandscapeEarth/theme.yaml | 2 ++ res/themes/LandscapeMagicBlue/theme.yaml | 2 ++ res/themes/NZXT_B/theme.yaml | 2 ++ res/themes/NZXT_BLUR/theme.yaml | 2 ++ res/themes/NZXT_C/theme.yaml | 2 ++ res/themes/NZXT_color/theme.yaml | 2 ++ res/themes/NZXT_dynamic/theme.yaml | 2 ++ res/themes/PurpleTheme/theme.yaml | 2 ++ res/themes/Terminal/theme.yaml | 2 ++ res/themes/bash-dark-green-gpu/theme.yaml | 2 ++ res/themes/bash-dark-green/theme.yaml | 2 ++ 22 files changed, 52 insertions(+) diff --git a/configure.py b/configure.py index 0e740d71..43f9d255 100755 --- a/configure.py +++ b/configure.py @@ -155,6 +155,8 @@ def __init__(self): self.theme_preview = ttk.Label(self.window) self.theme_preview.place(x=10, y=10) + self.theme_author = ttk.Label(self.window, foreground='#a3a3a3') + sysmon_label = ttk.Label(self.window, text='Display configuration', font='bold') sysmon_label.place(x=320, y=0) @@ -252,6 +254,10 @@ def load_theme_preview(self): self.theme_preview_img = ImageTk.PhotoImage(theme_preview) self.theme_preview.config(image=self.theme_preview_img) + theme_data = get_theme_data(self.theme_cb.get()) + self.theme_author.config(text="Author: " + theme_data.get('author', 'unknown')) + self.theme_author.place(x=10, y=self.theme_preview_img.height() + 15) + def load_config_values(self): with open("config.yaml", "rt", encoding='utf8') as stream: self.config, ind, bsi = ruamel.yaml.util.load_yaml_guess_indent(stream) diff --git a/res/themes/3.5inchTheme2/theme.yaml b/res/themes/3.5inchTheme2/theme.yaml index a16da81c..a8403c11 100644 --- a/res/themes/3.5inchTheme2/theme.yaml +++ b/res/themes/3.5inchTheme2/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@mathoudebine" + display: DISPLAY_ORIENTATION: portrait DISPLAY_RGB_LED: 0, 0, 255 diff --git a/res/themes/5inchTheme2/theme.yaml b/res/themes/5inchTheme2/theme.yaml index 368b3083..6b9d7203 100644 --- a/res/themes/5inchTheme2/theme.yaml +++ b/res/themes/5inchTheme2/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@alexwbaule" + display: DISPLAY_SIZE: 5" DISPLAY_ORIENTATION: portrait diff --git a/res/themes/5inchTheme2Radial/theme.yaml b/res/themes/5inchTheme2Radial/theme.yaml index d0ef0a2e..f356db46 100644 --- a/res/themes/5inchTheme2Radial/theme.yaml +++ b/res/themes/5inchTheme2Radial/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@arthurferrai" + display: DISPLAY_SIZE: 5" DISPLAY_ORIENTATION: portrait diff --git a/res/themes/BigClock/theme.yaml b/res/themes/BigClock/theme.yaml index 120127af..2c9b7237 100644 --- a/res/themes/BigClock/theme.yaml +++ b/res/themes/BigClock/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@RussNelson" + display: DISPLAY_ORIENTATION: landscape DISPLAY_RGB_LED: 255, 0, 0 diff --git a/res/themes/CyanTheme/theme.yaml b/res/themes/CyanTheme/theme.yaml index 67a51f3e..dab3c3b0 100644 --- a/res/themes/CyanTheme/theme.yaml +++ b/res/themes/CyanTheme/theme.yaml @@ -1,8 +1,11 @@ --- +author: "@mathoudebine" + display: DISPLAY_SIZE: 5" DISPLAY_ORIENTATION: portrait DISPLAY_RGB_LED: 0, 0, 255 + static_text: GPU_MODEL: TEXT: RTX3080TI @@ -28,6 +31,7 @@ static_text: FONT_SIZE: 25 FONT_COLOR: 255, 255, 255 BACKGROUND_IMAGE: background.png + static_images: BACKGROUND: PATH: background.png @@ -35,6 +39,7 @@ static_images: Y: 0 WIDTH: 480 HEIGHT: 800 + STATS: CPU: PERCENTAGE: diff --git a/res/themes/Cyberpunk-net/theme.yaml b/res/themes/Cyberpunk-net/theme.yaml index 5f60b31e..0ea84d6c 100644 --- a/res/themes/Cyberpunk-net/theme.yaml +++ b/res/themes/Cyberpunk-net/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@amiltonjr" + display: DISPLAY_ORIENTATION: portrait DISPLAY_RGB_LED: 255, 255, 0 @@ -59,6 +61,7 @@ static_text: FONT_SIZE: 15 FONT_COLOR: 255, 239, 8 BACKGROUND_IMAGE: background.png + STATS: CPU: PERCENTAGE: diff --git a/res/themes/Cyberpunk/theme.yaml b/res/themes/Cyberpunk/theme.yaml index faf63e91..23b5f01c 100644 --- a/res/themes/Cyberpunk/theme.yaml +++ b/res/themes/Cyberpunk/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@mathoudebine" + display: DISPLAY_ORIENTATION: portrait DISPLAY_RGB_LED: 255, 255, 0 diff --git a/res/themes/DragonBall5inch/theme.yaml b/res/themes/DragonBall5inch/theme.yaml index 6652fa06..0ef04386 100644 --- a/res/themes/DragonBall5inch/theme.yaml +++ b/res/themes/DragonBall5inch/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@mathoudebine" + display: DISPLAY_SIZE: 5" DISPLAY_ORIENTATION: landscape diff --git a/res/themes/Landscape15Grid/theme.yaml b/res/themes/Landscape15Grid/theme.yaml index d82c1de6..3f46a08d 100644 --- a/res/themes/Landscape15Grid/theme.yaml +++ b/res/themes/Landscape15Grid/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@mathoudebine" + display: DISPLAY_SIZE: 5" DISPLAY_ORIENTATION: landscape diff --git a/res/themes/Landscape6Grid/theme.yaml b/res/themes/Landscape6Grid/theme.yaml index 1e6ab9fb..6893d1ff 100644 --- a/res/themes/Landscape6Grid/theme.yaml +++ b/res/themes/Landscape6Grid/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@mathoudebine" + display: DISPLAY_ORIENTATION: landscape DISPLAY_RGB_LED: 0, 0, 255 diff --git a/res/themes/LandscapeEarth/theme.yaml b/res/themes/LandscapeEarth/theme.yaml index c4216c2c..eb485dcd 100644 --- a/res/themes/LandscapeEarth/theme.yaml +++ b/res/themes/LandscapeEarth/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@mathoudebine" + display: DISPLAY_ORIENTATION: landscape DISPLAY_RGB_LED: 66, 207, 239 diff --git a/res/themes/LandscapeMagicBlue/theme.yaml b/res/themes/LandscapeMagicBlue/theme.yaml index 04befb33..05cc2dbb 100644 --- a/res/themes/LandscapeMagicBlue/theme.yaml +++ b/res/themes/LandscapeMagicBlue/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@mathoudebine" + display: DISPLAY_ORIENTATION: landscape DISPLAY_RGB_LED: 16, 223, 239 diff --git a/res/themes/NZXT_B/theme.yaml b/res/themes/NZXT_B/theme.yaml index 87525afc..ef42ce00 100644 --- a/res/themes/NZXT_B/theme.yaml +++ b/res/themes/NZXT_B/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@mathoudebine" + display: DISPLAY_SIZE: 5" DISPLAY_ORIENTATION: landscape diff --git a/res/themes/NZXT_BLUR/theme.yaml b/res/themes/NZXT_BLUR/theme.yaml index de13b4ad..daa4cc68 100644 --- a/res/themes/NZXT_BLUR/theme.yaml +++ b/res/themes/NZXT_BLUR/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@mathoudebine" + display: DISPLAY_SIZE: 5" DISPLAY_ORIENTATION: landscape diff --git a/res/themes/NZXT_C/theme.yaml b/res/themes/NZXT_C/theme.yaml index 482ece67..d5481295 100644 --- a/res/themes/NZXT_C/theme.yaml +++ b/res/themes/NZXT_C/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@mathoudebine" + display: DISPLAY_SIZE: 5" DISPLAY_ORIENTATION: landscape diff --git a/res/themes/NZXT_color/theme.yaml b/res/themes/NZXT_color/theme.yaml index 4770800a..f6cc7d66 100644 --- a/res/themes/NZXT_color/theme.yaml +++ b/res/themes/NZXT_color/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@mathoudebine" + display: DISPLAY_SIZE: 5" DISPLAY_ORIENTATION: landscape diff --git a/res/themes/NZXT_dynamic/theme.yaml b/res/themes/NZXT_dynamic/theme.yaml index 0d3c1bc5..a5b04c79 100644 --- a/res/themes/NZXT_dynamic/theme.yaml +++ b/res/themes/NZXT_dynamic/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@mathoudebine" + display: DISPLAY_SIZE: 5" DISPLAY_ORIENTATION: landscape diff --git a/res/themes/PurpleTheme/theme.yaml b/res/themes/PurpleTheme/theme.yaml index 14f3da92..f1c9869f 100644 --- a/res/themes/PurpleTheme/theme.yaml +++ b/res/themes/PurpleTheme/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@mathoudebine" + display: DISPLAY_SIZE: 5" DISPLAY_ORIENTATION: landscape diff --git a/res/themes/Terminal/theme.yaml b/res/themes/Terminal/theme.yaml index a3de964c..aebe02f9 100644 --- a/res/themes/Terminal/theme.yaml +++ b/res/themes/Terminal/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@Ebag333" + display: DISPLAY_ORIENTATION: portrait DISPLAY_RGB_LED: 255, 0, 0 diff --git a/res/themes/bash-dark-green-gpu/theme.yaml b/res/themes/bash-dark-green-gpu/theme.yaml index c703c05b..b716aa32 100644 --- a/res/themes/bash-dark-green-gpu/theme.yaml +++ b/res/themes/bash-dark-green-gpu/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@Rollbacke" + display: DISPLAY_ORIENTATION: portrait DISPLAY_RGB_LED: 30, 255, 50 diff --git a/res/themes/bash-dark-green/theme.yaml b/res/themes/bash-dark-green/theme.yaml index 9822ba80..5a302249 100644 --- a/res/themes/bash-dark-green/theme.yaml +++ b/res/themes/bash-dark-green/theme.yaml @@ -1,4 +1,6 @@ --- +author: "@Rollbacke" + display: DISPLAY_ORIENTATION: portrait DISPLAY_RGB_LED: 30, 255, 50 From 7ce5f0d13076bda68927d2b3d5a70911cb071391 Mon Sep 17 00:00:00 2001 From: Matthieu Houdebine Date: Tue, 26 Sep 2023 18:56:21 +0200 Subject: [PATCH 2/3] Add an hyperlink to author's Github profile --- configure.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/configure.py b/configure.py index 43f9d255..d98dab21 100755 --- a/configure.py +++ b/configure.py @@ -23,6 +23,7 @@ import os import subprocess import sys +import webbrowser MIN_PYTHON = (3, 8) if sys.version_info < MIN_PYTHON: @@ -155,7 +156,7 @@ def __init__(self): self.theme_preview = ttk.Label(self.window) self.theme_preview.place(x=10, y=10) - self.theme_author = ttk.Label(self.window, foreground='#a3a3a3') + self.theme_author = ttk.Label(self.window) sysmon_label = ttk.Label(self.window, text='Display configuration', font='bold') sysmon_label.place(x=320, y=0) @@ -255,7 +256,14 @@ def load_theme_preview(self): self.theme_preview.config(image=self.theme_preview_img) theme_data = get_theme_data(self.theme_cb.get()) - self.theme_author.config(text="Author: " + theme_data.get('author', 'unknown')) + author_name = theme_data.get('author', 'unknown') + self.theme_author.config(text="Author: " + author_name) + if author_name.startswith("@"): + self.theme_author.config(foreground="#a3a3ff", cursor="hand2") + self.theme_author.bind("", lambda e: webbrowser.open_new_tab("https://github.com/" + author_name[1:])) + else: + self.theme_author.config(foreground="#a3a3a3", cursor="") + self.theme_author.unbind("") self.theme_author.place(x=10, y=self.theme_preview_img.height() + 15) def load_config_values(self): From 961188639f020169996f83be5aa0bc9162851eb2 Mon Sep 17 00:00:00 2001 From: Matthieu Houdebine Date: Tue, 26 Sep 2023 19:01:45 +0200 Subject: [PATCH 3/3] Update theme_default.yaml with author field --- res/themes/theme_example.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/res/themes/theme_example.yaml b/res/themes/theme_example.yaml index d8cb486e..e26376c5 100644 --- a/res/themes/theme_example.yaml +++ b/res/themes/theme_example.yaml @@ -4,6 +4,11 @@ # NOTE: Every HW sensor is hidden in this example, to show a sensor change 'SHOW: False' to 'SHOW: True' --- +# If you indicate @ with your GitHub username, there will be a hyperlink to your GitHub profile in the Config. Wizard +# Otherwise, you can just indicate any text e.g. author: "Your Name" +# You can also remove the line if you don't want to be credited +author: "@your_GitHub_username" + display: # Specify the display size in inch for this theme: 3.5" (default) or 5" DISPLAY_SIZE: 3.5"