diff --git a/StartUI.py b/StartUI.py index 0866dfd..7e2cb5c 100644 --- a/StartUI.py +++ b/StartUI.py @@ -1,4 +1,4 @@ -import sys, gpustat, os, json, subprocess, platform, psutil, urllib.request, re, requests +import sys, gpustat, os, json, subprocess, platform, psutil, urllib.request, re, requests, darkdetect, qdarktheme from PyQt5.QtWidgets import QApplication, QToolBar, QMessageBox, QAction, QProgressBar, QMainWindow, QLabel, QVBoxLayout, QComboBox, QSlider, QCheckBox, QLineEdit, QFileDialog, QPushButton, QWidget, QListWidget, QListWidgetItem, QToolTip, QGridLayout, QRadioButton, QFrame, QDialog from PyQt5.QtCore import Qt @@ -973,5 +973,7 @@ class MainWindow(QMainWindow): if __name__ == "__main__": app = QApplication(sys.argv) main_window = MainWindow() + if darkdetect.isDark(): + app.setStyleSheet(qdarktheme.load_stylesheet()) main_window.show() sys.exit(app.exec_()) diff --git a/requirements.txt b/requirements.txt index 5eaf283..22a7f6e 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ PyQt5 gpustat -psutil \ No newline at end of file +psutil +pyqtdarktheme +darkdetect \ No newline at end of file