-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.py
56 lines (32 loc) · 1.02 KB
/
main.py
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/usr/bin/env python3
# Licensed under GPL 3.0
# Copyright Garywill (github.com/garywill)
# copyright 2023 -
from heads import *
import g
exec(open('impo.py').read())
def main():
print('vimouse')
print(' alpha preview version. User can edit g.py to customize')
if not g.autoGetDesktopSize :
print('autoGetDesktopSize not enabled. Running with only a part of user screen for debug purpose')
print('')
if g.autoGetDesktopSize :
[g.scrX, g.scrY, g.scrW, g.scrH] = get_desktop_size()
g.cells = genCells(g.scrX, g.scrY, g.scrW, g.scrH, g.n_rows, g.n_cols)
print("starting key listener..")
keyListenerStart(False)
print("listening. Hit ctrl+win to start")
while True :
try:
time.sleep(100)
except KeyboardInterrupt :
break
print('trying to exit window')
try:
destroyWindow()
except:
pass
sys.exit(0)
if __name__ == '__main__':
main()