-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathgui.py
54 lines (44 loc) · 2.38 KB
/
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
from tkinter import *
import tkinter.font as font
from PIL import ImageTk,Image
import os
root = Tk()
root.resizable(False, False)
root.title("MacOSBigSurThemeConverter")
WindowIcon = PhotoImage(file = '/home/pi/.local/share/MacOSBigSurThemeConverter/assets/Icons/MacOSBigSurThemeConverterLogo.png')
root.iconphoto(False, WindowIcon)
#Iniitialing Functions
def MacOSBigSurLight():
os.system("bash ~/.local/share/MacOSBigSurThemeConverter/MacOSBigSurThemeConverter.sh --light")
def MacOSBigSurDark():
os.system("bash ~/.local/share/MacOSBigSurThemeConverter/MacOSBigSurThemeConverter.sh --dark")
def uninstall():
os.system("bash ~/.local/share/MacOSBigSurThemeConverter/uninstall.sh")
#Defining Font
myFont = font.Font(family='Helvetica')
#Defining Images
MacOSBigSurLightScreenshot = ImageTk.PhotoImage(Image.open("/home/pi/.local/share/MacOSBigSurThemeConverter/assets/gui/MacOSBigSurLightScreenshot.png"))
MacOSBigSurDarkScreenshot = ImageTk.PhotoImage(Image.open("/home/pi/.local/share/MacOSBigSurThemeConverter/assets/gui/MacOSBigSurDarkScreenshot.png"))
MacOSBigSurThemeConverter = ImageTk.PhotoImage(Image.open("/home/pi/.local/share/MacOSBigSurThemeConverter/assets/gui/MacOSBigSurThemeConverter.png"))
#Creating Labels For Images
MacOSBigSurLightScreenshotLabel = Label(image=MacOSBigSurLightScreenshot)
MacOSBigSurDarkScreenshotLabel = Label(image=MacOSBigSurDarkScreenshot)
MacOSBigSurThemeConverterLabel = Label(image=MacOSBigSurThemeConverter)
#Initialising buttons
MacOSBigSurLightButton = Button(text="Convert To MacOSBigSurLight", command=MacOSBigSurLight, bg="white", fg="black", font=myFont, bd=2)
MacOSBigSurDarkButton = Button(text="Convert To MacOSBigSurDark", command=MacOSBigSurDark, bg="white", fg="black", font=myFont, bd=2)
Label1 = Label(text="Which Theme Do You Want ?")
#Placing widgets on screen
MacOSBigSurThemeConverterLabel.grid (row=0, column=1, columnspan=3, pady=5)
Label1.grid(row=1, column=1)
MacOSBigSurLightScreenshotLabel.grid(row=2, column=1, columnspan=3, pady=5)
MacOSBigSurLightButton.grid(row=3, column=1, padx=80)
MacOSBigSurDarkScreenshotLabel.grid(row=4, column=1, columnspan=3, pady=5)
MacOSBigSurDarkButton.grid(row=5, column=1, padx=80)
# Creating a tuple containing
# the specifications of the font.
Font_tuple = ("Monospace", 15)
# Parsed the specifications to the
# Text widget using .configure( ) method.
Label1.configure(font = Font_tuple)
root.mainloop()