-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathstart.py
More file actions
40 lines (29 loc) · 780 Bytes
/
start.py
File metadata and controls
40 lines (29 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
"""
Documentation:
"""
import os
import sys
from pathlib import Path
from PySide2.QtWidgets import *
from PySide2.QtGui import *
DJED_ROOT = Path(os.getenv('DJED_ROOT'))
sysPaths = [DJED_ROOT.as_posix(), DJED_ROOT.joinpath('src').as_posix()]
for sysPath in sysPaths:
if sysPath not in sys.path:
sys.path.append(sysPath)
from startup.system_tray import DjedTray
from utils.resources.style_rc import *
def run_tray():
if not QApplication.instance():
app = QApplication(sys.argv)
else:
app = QApplication.instance()
parent = QWidget()
tray = DjedTray(QIcon(":/icons/djed.png"), parent)
sys.exit(app.exec_())
def main():
run_tray()
if __name__ == '__main__':
print("Starting Djed")
main()