forked from azmatt/chasing_your_tail
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cyt_gui.py
84 lines (63 loc) · 2.17 KB
/
cyt_gui.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
import tkinter as tk
import subprocess
def write_slogan():
print("Checking Status")
#Change lxterminal to gnome-terminal, xterm etc as needed
subprocess.call(["lxterminal", "-e" , "/home/pi/Desktop/cyt/monitor.sh"])
def func_delete_ignore():
print("Deleting Ignore Lists")
subprocess.call(["lxterminal", "-e" , "/home/pi/Desktop/cyt/delete_ignore_lists.sh"])
def func_create_ignore():
print("Creating Ignore Lists")
subprocess.call(["lxterminal", "-e" , "python3", "/home/pi/Desktop/cyt/create_ignore_list.py"])
def func_run_cyt():
print("Running CYT")
subprocess.call(["lxterminal", "-e" , "/home/pi/Desktop/cyt/chasing_your_tail.sh"])
root = tk.Tk()
root.title('Chasing Your Tail Viewer')
frame = tk.Frame(root)
frame.pack()
button_quit = tk.Button(frame,
text="QUIT",
width=15,
height=5,
fg="red",
relief="groove",
command=quit)
button_quit.pack(side=tk.LEFT)
check_status = tk.Button(frame,
text="Check Status",
width=15,
height=5,
fg="green",
relief="groove",
command=write_slogan)
check_status.pack(side=tk.LEFT)
frame = tk.Frame(root)
frame.pack()
button = tk.Button(frame,
relief="groove",
text="Delete Ignore Lists",
width=15,
height=5,
fg="red",
#bg="blue",
#fg="yellow",
command=func_delete_ignore)
button.pack(side=tk.LEFT)
create_ignore = tk.Button(frame,
width=15,
height=5,
text="Create Ignore Lists",
relief="groove",
command=func_create_ignore)
create_ignore .pack(side=tk.LEFT)
butn_run_cyt = tk.Button(frame,
width=16,
height=5,
fg="green",
text="Run Chasing Your Tail",
relief="groove",
command=func_run_cyt)
butn_run_cyt .pack(side=tk.LEFT)
root.mainloop()