Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ permissions:

jobs:
dependency-review:
name: 'Dependency Review'
runs-on: ubuntu-latest
steps:
- name: 'Checkout Repository'
Expand Down
54 changes: 54 additions & 0 deletions .github/workflows/generate-windows-installer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Generate Windows Installer

on:
release:
types: [ published ]

permissions:
contents: write

jobs:
generate-windows-installer:
name: Generate Windows Installer
runs-on: windows-latest

steps:
- name: Git Checkout ${{github.event.release.tag_name}}
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt

- name: Set version number for PyInstaller
run: |
python.exe tools\windows-installer\generate-version-info.py ${{github.event.release.tag_name}}

- name: Run PyInstaller to create binaries
run: |
pyinstaller.exe --noconfirm turing-system-monitor.spec

- name: Create InnoSetup installer from generated binaries
uses: Minionguyjpro/[email protected]
with:
path: tools/windows-installer/turing-system-monitor.iss
options: /O+

- name: '📦 Archive Windows installer'
uses: actions/upload-artifact@v4
with:
name: turing-system-monitor_${{github.event.release.tag_name}}
path: tools\windows-installer\Output\turing-system-monitor_${{github.event.release.tag_name}}.exe
if-no-files-found: error

- name: '📩 Publish Windows installer to Release'
run: |
gh release upload ${{github.event.release.tag_name}} tools\windows-installer\Output\turing-system-monitor_${{github.event.release.tag_name}}.exe
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/lint-flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
lint-flake8:

name: Lint with flake8
runs-on: ubuntu-latest

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/simple-program-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
simple-program:

name: Simple program (Linux)
runs-on: ubuntu-latest

strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/simple-program-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
simple-program:

name: Simple program (MacOS)
runs-on: macos-latest

strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/simple-program-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
simple-program:

name: Simple program (Windows)
runs-on: windows-latest

strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/system-monitor-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
system-monitor:

name: System monitor (Linux)
runs-on: ubuntu-latest

strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/system-monitor-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
system-monitor:

name: System monitor (MacOS)
runs-on: macos-latest

strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/system-monitor-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
system-monitor:

name: System monitor (Windows)
runs-on: windows-latest

strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/themes-screenshot-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:

jobs:
system-monitor-theme-screenshot:

name: Generate screenshot for all themes
runs-on: ubuntu-latest

steps:
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/themes-screenshot-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ on:

jobs:
system-monitor-theme-screenshot:

name: Update themes screenshot and generate list

# Don't run this action on forked repositories to avoid conflicts in PR...
if: github.repository == 'mathoudebine/turing-smart-screen-python'

Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ MANIFEST
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
tools/windows-installer/Output/

# Installer logs
pip-log.txt
Expand Down
10 changes: 5 additions & 5 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# This file is the system monitor configuration GUI


import glob
import os
import subprocess
import sys
Expand Down Expand Up @@ -419,7 +419,7 @@ def save_config_values(self):
self.config['display']['DISPLAY_REVERSE'] = [k for k, v in reverse_map.items() if v == self.orient_cb.get()][0]
self.config['display']['BRIGHTNESS'] = int(self.brightness_slider.get())

with open("config.yaml", "w", encoding='utf-8') as file:
with open(MAIN_DIRECTORY + "config.yaml", "w", encoding='utf-8') as file:
ruamel.yaml.YAML().dump(self.config, file)

def save_additional_config(self, ping: str, api_key: str, lat: str, long: str, unit: str, lang: str):
Expand All @@ -430,7 +430,7 @@ def save_additional_config(self, ping: str, api_key: str, lat: str, long: str, u
self.config['config']['WEATHER_UNITS'] = unit
self.config['config']['WEATHER_LANGUAGE'] = lang

with open("config.yaml", "w", encoding='utf-8') as file:
with open(MAIN_DIRECTORY + "config.yaml", "w", encoding='utf-8') as file:
ruamel.yaml.YAML().dump(self.config, file)

def on_theme_change(self, e=None):
Expand All @@ -440,14 +440,14 @@ def on_weatherping_click(self):
self.more_config_window.show()

def on_theme_editor_click(self):
subprocess.Popen(MAIN_DIRECTORY + "theme-editor.py" + " \"" + self.theme_cb.get() + "\"", shell=True)
subprocess.Popen(MAIN_DIRECTORY + glob.glob("theme-editor.*", root_dir=MAIN_DIRECTORY)[0] + " \"" + self.theme_cb.get() + "\"", shell=True)

def on_save_click(self):
self.save_config_values()

def on_saverun_click(self):
self.save_config_values()
subprocess.Popen(MAIN_DIRECTORY + "main.py", shell=True)
subprocess.Popen(MAIN_DIRECTORY + glob.glob("main.*", root_dir=MAIN_DIRECTORY)[0], shell=True)
self.window.destroy()

def on_brightness_change(self, e=None):
Expand Down
3 changes: 2 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.

# This file is the system monitor main program to display HW sensors on your screen using themes (see README)
import glob
import os
import sys

Expand Down Expand Up @@ -115,7 +116,7 @@ def on_signal_caught(signum, frame=None):

def on_configure_tray(tray_icon, item):
logger.info("Configure from tray icon")
subprocess.Popen(MAIN_DIRECTORY + "configure.py", shell=True)
subprocess.Popen(MAIN_DIRECTORY + glob.glob("configure.*", root_dir=MAIN_DIRECTORY)[0], shell=True)
clean_stop(tray_icon)


Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ tkinter-tooltip~=3.1.2 # Tooltips for configuration editor
uptime~=3.0.1 # For System Uptime
requests~=2.32.3 # HTTP library
ping3~=4.0.8 # ICMP ping implementation using raw socket
pyinstaller~=6.11.1 # bundles a Python application and all its dependencies into a single package

# Image generation
Pillow~=10.4.0; python_version < "3.9" # For Python 3.8 max.
Expand Down
Binary file added res/icons/monitor-icon-17865/128.bmp
Binary file not shown.
Binary file added res/icons/monitor-icon-17865/24.bmp
Binary file not shown.
Binary file added res/icons/monitor-icon-17865/32.bmp
Binary file not shown.
Binary file added res/icons/monitor-icon-17865/48.bmp
Binary file not shown.
Binary file added res/icons/monitor-icon-17865/64.bmp
Binary file not shown.
Binary file added res/icons/monitor-icon-17865/icon.ico
Binary file not shown.
Binary file added tools/windows-installer/100.bmp
Binary file not shown.
Binary file added tools/windows-installer/125.bmp
Binary file not shown.
Binary file added tools/windows-installer/150.bmp
Binary file not shown.
Binary file added tools/windows-installer/175.bmp
Binary file not shown.
Binary file added tools/windows-installer/200.bmp
Binary file not shown.
Binary file added tools/windows-installer/225.bmp
Binary file not shown.
Binary file added tools/windows-installer/250.bmp
Binary file not shown.
Loading
Loading