prepare mime

master
Can202 2021-09-06 18:39:41 -03:00
parent ffa9c40bf4
commit 51aab00f64
2 changed files with 34 additions and 5 deletions

View File

@ -2,7 +2,7 @@ import os
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):
os.system("lxterminal -e 'apt update && apt search " + str(text) + " && read'")

37
init.py
View File

@ -3,6 +3,7 @@ from tkinter import *
from tkinter import messagebox
from tkinter import ttk
import os
import sys
#distro
import fedora
@ -15,13 +16,15 @@ BUTTONWIDTH='39'
#TEXTWIDTH=20
TEXTWIDTH=18
screen = tk.Tk()
screen.title("BoxPackage")
screen.geometry("400x400")
screen.resizable(width = False, height = False)
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)
buttonsearch = tk.Button(screen, command=search, text='search', 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)
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():
@ -91,4 +111,13 @@ def show():
instscreen.mainloop()
if len(sys.argv) > 1:
program = sys.argv[1]
pathinstall(program)
main()