File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import time
4
4
import pystray
5
5
from PIL import Image
6
6
import os
7
+ import threading
7
8
8
9
9
10
class Const :
@@ -128,6 +129,7 @@ def main():
128
129
sendNotification ("Low Battery, Plug-in charger" , ("The Power is at " + str (battery .percent )))
129
130
time .sleep (config .alertTimeInterval )
130
131
config .readConfig ()
132
+ print ('hey' )
131
133
132
134
133
135
def showSystemStatus (config : Config ):
@@ -139,8 +141,9 @@ def showSystemStatus(config: Config):
139
141
140
142
if __name__ == "__main__" :
141
143
try :
144
+ mainFunctionThread = threading .Thread (target = main )
145
+ mainFunctionThread .start ()
142
146
setupStray ()
143
- main ()
144
147
except Exception as e :
145
148
with open ("./error.txt" , 'w' ) as errorFile :
146
149
errorFile .write (str (e ))
You can’t perform that action at this time.
0 commit comments