Skip to content

Commit 54afdae

Browse files
committed
Allow to start program / edit theme from .exe as well
1 parent ad04b32 commit 54afdae

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

configure.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# This file is the system monitor configuration GUI
2121

22-
22+
import glob
2323
import os
2424
import subprocess
2525
import sys
@@ -440,14 +440,14 @@ def on_weatherping_click(self):
440440
self.more_config_window.show()
441441

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

445445
def on_save_click(self):
446446
self.save_config_values()
447447

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

453453
def on_brightness_change(self, e=None):

main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
# along with this program. If not, see <https://www.gnu.org/licenses/>.
2424

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

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

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

121122

0 commit comments

Comments
 (0)