prepare mime
parent
ffa9c40bf4
commit
51aab00f64
|
@ -2,7 +2,7 @@ import os
|
||||||
|
|
||||||
|
|
||||||
def installinstok(text):
|
def installinstok(text):
|
||||||
os.system("lxterminal -e 'apt update && apt install -y "+ text +"'")
|
os.system("lxterminal -e 'apt update && apt install -y "+ text +" && read'")
|
||||||
|
|
||||||
def searchtok(text):
|
def searchtok(text):
|
||||||
os.system("lxterminal -e 'apt update && apt search " + str(text) + " && read'")
|
os.system("lxterminal -e 'apt update && apt search " + str(text) + " && read'")
|
||||||
|
|
37
init.py
37
init.py
|
@ -3,6 +3,7 @@ from tkinter import *
|
||||||
from tkinter import messagebox
|
from tkinter import messagebox
|
||||||
from tkinter import ttk
|
from tkinter import ttk
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
#distro
|
#distro
|
||||||
import fedora
|
import fedora
|
||||||
|
@ -15,13 +16,15 @@ BUTTONWIDTH='39'
|
||||||
#TEXTWIDTH=20
|
#TEXTWIDTH=20
|
||||||
TEXTWIDTH=18
|
TEXTWIDTH=18
|
||||||
|
|
||||||
screen = tk.Tk()
|
|
||||||
screen.title("BoxPackage")
|
|
||||||
screen.geometry("400x400")
|
|
||||||
screen.resizable(width = False, height = False)
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
|
screen = tk.Tk()
|
||||||
|
screen.title("BoxPackage")
|
||||||
|
screen.geometry("400x400")
|
||||||
|
screen.resizable(width = False, height = False)
|
||||||
|
|
||||||
buttoninstall = tk.Button(screen, command=install, text='install', height=BUTTONHEIGHT, width=BUTTONWIDTH)
|
buttoninstall = tk.Button(screen, command=install, text='install', height=BUTTONHEIGHT, width=BUTTONWIDTH)
|
||||||
buttonsearch = tk.Button(screen, command=search, text='search', 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)
|
buttonremove = tk.Button(screen, command=remove, text='remove', height=BUTTONHEIGHT, width=BUTTONWIDTH)
|
||||||
|
@ -48,6 +51,23 @@ def install():
|
||||||
instok.place(x=70, y=40)
|
instok.place(x=70, y=40)
|
||||||
|
|
||||||
instscreen.mainloop()
|
instscreen.mainloop()
|
||||||
|
|
||||||
|
def pathinstall(text):
|
||||||
|
|
||||||
|
instscreen = tk.Tk()
|
||||||
|
instscreen.geometry("200x100")
|
||||||
|
instscreen.title("program to install?")
|
||||||
|
instscreen.resizable(width = False, height = False)
|
||||||
|
|
||||||
|
l = Label(instscreen, text = "Install this package?")
|
||||||
|
l.config(font =("Courier", 8))
|
||||||
|
l.pack()
|
||||||
|
|
||||||
|
|
||||||
|
instok = tk.Button(instscreen, command=lambda: distro.installinstok(text), text='Install', height=1, width=3)
|
||||||
|
instok.place(x=70, y=40)
|
||||||
|
|
||||||
|
instscreen.mainloop()
|
||||||
|
|
||||||
|
|
||||||
def search():
|
def search():
|
||||||
|
@ -91,4 +111,13 @@ def show():
|
||||||
|
|
||||||
instscreen.mainloop()
|
instscreen.mainloop()
|
||||||
|
|
||||||
|
if len(sys.argv) > 1:
|
||||||
|
|
||||||
|
program = sys.argv[1]
|
||||||
|
|
||||||
|
pathinstall(program)
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue