-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (24 loc) · 742 Bytes
/
Copy pathmain.py
File metadata and controls
33 lines (24 loc) · 742 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
import threading
from functools import partial
import keyboard
from Src.app.logging_config import logger
from Src.key_tracking import keyboard_listener, on_key_release
from Src.menu import create_icon
from Src.padding import update_padding
from Src.utils import check_settings, banner
def main():
try:
check_settings()
update_padding(reset=True)
threading.Thread(target=keyboard_listener, daemon=True).start()
icon = create_icon()
keyboard.on_release(partial(on_key_release, icon))
icon.run()
finally:
update_padding(reset=True)
check_settings()
if __name__ == "__main__":
banner()
logger.info('Tray started')
main()
logger.info('Tray stopped')