-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathwinguake2.py
52 lines (47 loc) · 1.73 KB
/
winguake2.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
from windowLib import is_running, window_resize
import sys, os
import argparse
temp_dir = os.path.dirname(os.path.realpath(__file__))
#dir = "."
parser = argparse.ArgumentParser(description="Guake for Windows")
#parser.add_argument('-s', '--settings', help="Open settings", action='store_true')
parser.add_argument('-v', '--verbose', help='Verbose mode', action='store_true')
#parser.add_argument('-d', '--default', help="Run with default settings", action='store_true')
args = parser.parse_args()
if args.verbose:
print("Running WinGuake in Verbose mode.")
'''
if False:
if args.verbose:
print("Running settings...")
os.system('python edit_settings.py')
#change these around when compiling
#os.system('winguake_settings.exe')
'''
#else:
if not is_running('console.exe') and not is_running('AutoHotkey.exe'):
if args.verbose:
print("WinGuake not started, starting program...")
run_console = os.system('console.exe')
if int(run_console) != 0:
if args.verbose:
print("WinGuake precompiled script not found, seeing if AutoHotkey is running...")
if not is_running('AutoHotkey.exe'):
if args.verbose:
print('AutoHotkey is not running, trying to run...')
run_console_b = os.system('start Console.ahk')
if int(run_console_b) != 0:
if args.verbose:
print("No console script found, skipping....")
else:
if args.verbose:
print('AutoHotkey is already running!')
else:
if args.verbose:
print("WinGuake Already running!")
if not args.verbose:
os.system("cls")
#dir = get_dir() get this working
folder = os.getenv("USERPROFILE")
os.chdir(folder)
window_resize()