Skip to content

Commit 54bb7fa

Browse files
authored
Merge pull request #100 from mathoudebine/feature/52-openhardwaremonitorlibrehardwaremonitor-integration
LibreHardwareMonitor integration for Windows platform
2 parents 2fd830d + 91bc879 commit 54bb7fa

27 files changed

+1411
-307
lines changed

.github/workflows/system-monitor-windows.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ jobs:
3434
echo "Using theme ${{ matrix.theme }}"
3535
(Get-Content config.yaml) -replace "^ THEME.*$"," THEME: ${{ matrix.theme }}" | Set-Content config.yaml
3636
37+
# For tests do not use LibreHardwareMonitor as it needs admin rights
38+
(Get-Content config.yaml) -replace "^ HW_SENSORS.*$"," HW_SENSORS: PYTHON" | Set-Content config.yaml
39+
3740
- name: Run system monitor for 20 seconds
3841
run: |
3942
Start-Process -NoNewWindow python3 main.py -RedirectStandardOutput output.log -RedirectStandardError error.log

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,6 @@ dmypy.json
136136

137137
# Simulated display capture
138138
screencap.png
139+
tmp
140+
141+
external/LibreHardwareMonitor/LibreHardwareMonitorLib.sys

config.yaml

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,53 @@
22
config:
33
# Configuration values to set up basic communication
44
# Set your COM port e.g. COM3 for Windows, /dev/ttyACM0 for Linux...
5+
# Use AUTO for COM port auto-discovery (may not work on every setup)
56
# COM_PORT: "/dev/ttyACM0"
67
# COM_PORT: "COM3"
78
COM_PORT: "AUTO"
89

910
# Theme to use (located in res/themes)
10-
# THEME: Terminal
11-
# THEME: Landscape6Grid
12-
# THEME: Cyberpunk
13-
# THEME: bash-dark-green
11+
# Available themes:
12+
# - 3.5inchTheme2
13+
# - Terminal
14+
# - Landscape6Grid
15+
# - Cyberpunk
16+
# - bash-dark-green
1417
THEME: 3.5inchTheme2
1518

16-
# Network metrics
17-
# Put the interface name or let it blank if the card does not exist
19+
# Hardware sensors reading
20+
# Choose the appropriate method for reading your hardware sensors:
21+
# - PYTHON use Python libraries (psutils, GPUtil...) to read hardware sensors (supports all OS but not all HW)
22+
# - LHM use LibreHardwareMonitor library to read hardware sensors (Windows only - NEEDS ADMIN RIGHTS)
23+
# - STUB use fake random data instead of real hardware sensors
24+
# - AUTO use the best method based on your OS: Windows OS will use LHM, other OS will use Python libraries
25+
HW_SENSORS: AUTO
26+
27+
# Network interfaces
1828
# Linux/MacOS interfaces are named "eth0", "wlan0", "wlp1s0", "enp2s0"...
1929
# For Windows use the interfaces pretty name: "Ethernet 2", "Wi-Fi", ...
20-
ETH: "eth0" # Ethernet Card
21-
WLO: "wlan0" # Wi-Fi Card
30+
# Leave the fields empty if the card does not exist on your setup
31+
ETH: "" # Ethernet Card
32+
WLO: "" # Wi-Fi Card
2233

2334
display:
24-
# Display resolution in portrait orientation
25-
# Do not use this setting to rotate display! Display orientation is managed by themes
26-
DISPLAY_WIDTH: 320
27-
DISPLAY_HEIGHT: 480
35+
# Display revision: A or B (for "flagship" version, use B) or SIMU for simulated LCD (image written in screencap.png)
36+
# To identify your revision: https://github.com/mathoudebine/turing-smart-screen-python/wiki/Hardware-revisions
37+
REVISION: A
2838

2939
# Display Brightness
3040
# Set this as the desired %, 0 being completely dark and 100 being max brightness
31-
# Warning: screen can get very hot at high brightness!
41+
# Warning: revision A display can get hot at high brightness!
3242
BRIGHTNESS: 20
3343

34-
# Display revision: A or B (for "flagship" version, use B) or SIMU for simulated LCD (image written in screencap.png)
35-
# To identify your revision: https://github.com/mathoudebine/turing-smart-screen-python/wiki/Hardware-revisions
36-
REVISION: A
44+
# Display reverse: true/false
45+
# Set to true to reverse display orientation (landscape <-> reverse landscape, portrait <-> reverse portrait)
46+
# Note: Display basic orientation (portrait or landscape) is defined by the theme you have selected
47+
DISPLAY_REVERSE: false
48+
49+
# Display resolution in portrait orientation
50+
# Do not use this setting to rotate display! Use DISPLAY_REVERSE
51+
DISPLAY_WIDTH: 320 # Do not change unless you have a good reason
52+
DISPLAY_HEIGHT: 480 # Do not change unless you have a good reason
53+
54+
237 KB
Binary file not shown.

0 commit comments

Comments
 (0)