Fixed non-main calling
This commit is contained in:
parent
b9f7992c23
commit
bef4eb7967
|
@ -100,16 +100,19 @@ def parse_args():
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
globals().update(args.__dict__)
|
globals().update(args.__dict__)
|
||||||
|
|
||||||
def main():
|
def notification_loop():
|
||||||
init()
|
init()
|
||||||
while 1:
|
while 1:
|
||||||
wait()
|
wait()
|
||||||
send_notification()
|
send_notification()
|
||||||
uninit()
|
uninit()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def main():
|
||||||
parse_args()
|
parse_args()
|
||||||
notify_thread = threading.Thread(target=main, name="Notify Thread")
|
notify_thread = threading.Thread(target=notification_loop, name="Notify Thread")
|
||||||
notify_thread.start()
|
notify_thread.start()
|
||||||
create_tray_icon()
|
create_tray_icon()
|
||||||
notify_thread.join()
|
notify_thread.join()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
Loading…
Reference in New Issue