Skip to content

Commit 932069d

Browse files
author
OxPoly
committed
more GUI work, icons and screenshot added
1 parent 07df864 commit 932069d

File tree

5 files changed

+86
-30
lines changed

5 files changed

+86
-30
lines changed

centry.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import argparse
44
import hashlib
55
import socket
6-
6+
#TODO: Implement ECC restart option
77
parser = argparse.ArgumentParser(prog="Centry",description='Pythonic Panic Program for the Security Minded',epilog="Version 0.1")
88
parser.add_argument("-d", "--daemon", help="Run as a daemon in the background", action='store_true')
99
parser.add_argument("--paranoid", help='Activates paranoid mode. Default: Off', action='store_true')

gui.py

+39-29
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,42 @@
11
#!/usr/bin/python3
2+
from tkinter import *
23

3-
import tkinter as tk
4-
5-
class Application(tk.Frame):
6-
def __init__(self, master=None):
7-
tk.Frame.__init__(self, master)
8-
self.pack()
9-
self.createWidgets()
10-
11-
def createWidgets(self):
12-
self.title=tk.Label(self)
13-
self.title["text"] = "Centry"
14-
self.title["font"] = ('',26,'bold')
15-
self.title.pack(side='top')
16-
self.hi_there = tk.Button(self)
17-
# self.hi_there["text"] = "Hello World\n(click me)"
18-
# self.hi_there["command"] = self.say_hi
19-
# self.hi_there.pack(side="right")
20-
21-
self.QUIT = tk.Button(self, text="PANIC",font=('',32,''), bg="red", fg="black",
22-
command=root.destroy)
23-
self.QUIT.pack(side="bottom")
24-
25-
def say_hi(self):
26-
print("hi there, everyone!")
27-
28-
root = tk.Tk()
29-
app = Application(master=root)
30-
app.master.title("Centry Panic Systems")
31-
app.master.geometry("400x300")
4+
def fire():
5+
print("FIREIFREFIRE")
6+
app = Tk()
7+
8+
mainframe = Frame()
9+
10+
header = Frame(mainframe)
11+
title=Label(header)
12+
title["text"] = "Centry"
13+
title["font"] = ('',32,'bold')
14+
title.pack(side="left", anchor='e',padx=90)
15+
photo = PhotoImage(file="settings.gif")
16+
settings = Button(header)
17+
settings["image"] = photo
18+
settings.pack(side="right",fill='both', anchor="e",pady=5,padx=5)
19+
header.pack(side="top",fill=X)
20+
21+
body = Frame(mainframe)
22+
23+
separator = Frame(body,height=2, bd=1, relief=SUNKEN)
24+
separator.pack(side='top',fill=X, padx=5, pady=5)
25+
26+
status=Label(body)
27+
status["text"] = "Status: Armed (Paranoid)"
28+
status['font'] = ('', 14,'')
29+
status.pack(fill="both")
30+
body.pack(fill="both")
31+
32+
mainframe.pack(side='top', fill="both")
33+
34+
panicf = Frame()
35+
panic = Button(panicf, text="PANIC",font=('',28,''), bg="#db0303", fg="black",activebackground="red", command=fire)
36+
panic.pack(side="bottom", fill='both')
37+
panicf.pack(fill=X, padx=5, pady=5,side='bottom')
38+
39+
app.title("Centry")
40+
app.geometry("400x165")
41+
app.iconbitmap("@icon.xbm")
3242
app.mainloop()

icon.xbm

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
#define icon_width 64
2+
#define icon_height 64
3+
static unsigned char icon_bits[] = {
4+
0x00, 0x00, 0x00, 0xf0, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe,
5+
0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x01, 0x00, 0x00,
6+
0x00, 0x00, 0xc0, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f,
7+
0xf8, 0x07, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0xc0, 0x0f, 0x00, 0x00,
8+
0x00, 0x00, 0xf8, 0x01, 0x80, 0x1f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00,
9+
0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x3e, 0x00, 0x00,
10+
0x00, 0x00, 0x3e, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00,
11+
0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x78, 0x00, 0x00,
12+
0x00, 0x00, 0x1f, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00,
13+
0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0xf0, 0x00, 0x00,
14+
0x00, 0x00, 0x0f, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00,
15+
0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0xf0, 0x00, 0x00,
16+
0x00, 0x00, 0x0f, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00,
17+
0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0xf0, 0x00, 0x00,
18+
0x00, 0x00, 0x0f, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00,
19+
0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0xf0, 0x00, 0x00,
20+
0x00, 0x00, 0x0f, 0xf0, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff,
21+
0xff, 0xf0, 0x00, 0x00, 0x00, 0x00, 0xcf, 0xff, 0xff, 0xf3, 0x00, 0x00,
22+
0x00, 0x00, 0xef, 0xff, 0xff, 0xf7, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff,
23+
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
24+
0x00, 0x00, 0xff, 0x3f, 0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x3f,
25+
0xfc, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0x1f, 0xf8, 0xff, 0x00, 0x00,
26+
0x00, 0x80, 0xff, 0x03, 0xc0, 0xff, 0x01, 0x00, 0x00, 0xc0, 0xff, 0x01,
27+
0x80, 0xff, 0x03, 0x00, 0x00, 0xc0, 0xff, 0x00, 0x00, 0xff, 0x03, 0x00,
28+
0x00, 0xe0, 0x7f, 0xc0, 0x03, 0xfe, 0x07, 0x00, 0x00, 0xe0, 0x3f, 0xc0,
29+
0x03, 0xfc, 0x07, 0x00, 0x00, 0xe0, 0x1f, 0xc0, 0x03, 0xf8, 0x07, 0x00,
30+
0x00, 0xe0, 0x1f, 0xf0, 0x0f, 0xf8, 0x07, 0x00, 0x00, 0xf0, 0x1f, 0xf8,
31+
0x1f, 0xf8, 0x0f, 0x00, 0x00, 0xf0, 0x0f, 0xf8, 0x1f, 0xf0, 0x0f, 0x00,
32+
0x00, 0xf0, 0x0f, 0xfc, 0x3f, 0xf0, 0x0f, 0x00, 0x00, 0xf0, 0x0f, 0xfc,
33+
0x3f, 0xf0, 0x0f, 0x00, 0x00, 0xf0, 0x0f, 0xfc, 0x3f, 0xf0, 0x0f, 0x00,
34+
0x00, 0xf0, 0x0f, 0xfc, 0x3f, 0xf0, 0x0f, 0x00, 0x00, 0xf0, 0x0f, 0xf8,
35+
0x1f, 0xf0, 0x0f, 0x00, 0x00, 0xf0, 0x1f, 0xf8, 0x1f, 0xf8, 0x0f, 0x00,
36+
0x00, 0xf0, 0x1f, 0xf0, 0x0f, 0xf8, 0x0f, 0x00, 0x00, 0xe0, 0x1f, 0xc0,
37+
0x03, 0xf8, 0x07, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x00, 0xfc, 0x07, 0x00,
38+
0x00, 0xe0, 0x7f, 0x00, 0x00, 0xfe, 0x07, 0x00, 0x00, 0xc0, 0xff, 0x00,
39+
0x00, 0xff, 0x03, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x80, 0xff, 0x03, 0x00,
40+
0x00, 0x80, 0xff, 0x03, 0xc0, 0xff, 0x01, 0x00, 0x00, 0x00, 0xff, 0x1f,
41+
0xf8, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00,
42+
0x00, 0x00, 0xfe, 0xff, 0xff, 0x7f, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff,
43+
0xff, 0x3f, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0x1f, 0x00, 0x00,
44+
0x00, 0x00, 0xe0, 0xff, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff,
45+
0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00,
46+
0x00, 0x00, 0x00, 0xf8, 0x1f, 0x00, 0x00, 0x00 };

screenshot.png

33.2 KB
Loading

settings.gif

163 Bytes
Loading

0 commit comments

Comments
 (0)