show details

master
Gogs 2021-09-06 11:00:33 -03:00
parent 778073526b
commit 539d03c0ae
3 changed files with 35 additions and 12 deletions

View File

@ -2,7 +2,7 @@ import os
def installinstok(text):
os.system("lxterminal -e 'apt update && apt install "+ text +"'")
os.system("lxterminal -e 'apt update && apt install -y "+ text +"'")
def searchtok(text):
os.system("lxterminal -e 'apt update && apt search " + str(text) + " && read'")
@ -10,6 +10,9 @@ def searchtok(text):
def removetok(text):
os.system("lxterminal -e 'apt remove " + str(text) + "'")
def showtok(text):
os.system("lxterminal -e 'apt show " + str(text) + " && read'")
def update():
os.system("lxterminal -e 'apt update && apt upgrade'")

View File

@ -10,6 +10,9 @@ def searchtok(text):
def removetok(text):
os.system("lxterminal -e 'dnf remove " + str(text) + "'")
def showtok(text):
os.system("lxterminal -e 'dnf info " + str(text) + " && read'")
def update():
os.system("lxterminal -e 'dnf update'")

39
init.py
View File

@ -17,9 +17,24 @@ TEXTWIDTH=18
screen = tk.Tk()
screen.title("Install")
screen.geometry("400x300")
screen.geometry("400x400")
screen.resizable(width = False, height = False)
def main():
buttoninstall = tk.Button(screen, command=install, text='install', height=BUTTONHEIGHT, width=BUTTONWIDTH)
buttonsearch = tk.Button(screen, command=search, text='search', height=BUTTONHEIGHT, width=BUTTONWIDTH)
buttonremove = tk.Button(screen, command=remove, text='remove', height=BUTTONHEIGHT, width=BUTTONWIDTH)
buttonshow = tk.Button(screen, command=show, text='show details', height=BUTTONHEIGHT, width=BUTTONWIDTH)
buttonupdate = tk.Button(screen, command=distro.update, text='update', height=BUTTONHEIGHT, width=BUTTONWIDTH)
buttoninstall.place(x='10', y='30')
buttonsearch.place(x='10', y='95')
buttonremove.place(x='10', y='160')
buttonshow.place(x='10', y='225')
buttonupdate.place(x='10', y='290')
screen.mainloop()
def install():
instscreen = tk.Tk()
instscreen.geometry("200x100")
@ -62,16 +77,18 @@ def remove():
instok.place(x=70, y=40)
removescreen.mainloop()
def main():
def show():
instscreen = tk.Tk()
instscreen.geometry("200x100")
instscreen.title("program to show details?")
instscreen.resizable(width = False, height = False)
buttoninstall = tk.Button(screen, command=install, text='install', height=BUTTONHEIGHT, width=BUTTONWIDTH)
buttonsearch = tk.Button(screen, command=search, text='search', height=BUTTONHEIGHT, width=BUTTONWIDTH)
buttonremove = tk.Button(screen, command=remove, text='remove', height=BUTTONHEIGHT, width=BUTTONWIDTH)
buttonupdate = tk.Button(screen, command=distro.update, text='update', height=BUTTONHEIGHT, width=BUTTONWIDTH)
entry = ttk.Entry(instscreen, width=TEXTWIDTH)
entry.place(x=15, y=10)
buttoninstall.place(x='10', y='30')
buttonsearch.place(x='10', y='95')
buttonremove.place(x='10', y='160')
buttonupdate.place(x='10', y='225')
screen.mainloop()
instok = tk.Button(instscreen, command=lambda: distro.showtok(entry.get()), text='ok', height=1, width=3)
instok.place(x=70, y=40)
instscreen.mainloop()
main()