update peptools

This commit is contained in:
Manuel 2023-05-04 09:25:38 +00:00
parent 2a5dcc5bf8
commit a28fedafec
6 changed files with 121 additions and 153 deletions

View File

@ -19,36 +19,6 @@ def osettingsmgr():
subprocess.Popen("xfce4-settings-manager") subprocess.Popen("xfce4-settings-manager")
def omt():
"""#Mouse Settings"""
subprocess.Popen("xfce4-mouse-settings")
def oclf():
"""#Appearence"""
subprocess.Popen("xfce4-appearance-settings")
def opp():
"""#Panel Preferences"""
subprocess.Popen(["xfce4-panel", "--preferences"])
def ons():
"""#Notifications Configuration"""
subprocess.Popen("xfce4-notifyd-config")
def opa():
"""#Default settings"""
subprocess.Popen("xfce4-mime-settings")
def oks():
"""#Keyboardsettings"""
subprocess.Popen("xfce4-keyboard-settings")
def nhnm(): def nhnm():
"""#Network Manager""" """#Network Manager"""
subprocess.Popen("nm-connection-editor") subprocess.Popen("nm-connection-editor")
@ -58,17 +28,6 @@ def nhpr():
"""#Printers""" """#Printers"""
subprocess.Popen("system-config-printer") subprocess.Popen("system-config-printer")
def nhdis():
"""#Display"""
subprocess.Popen("xfce4-display-settings")
def nhpom():
"""#Power Manager"""
subprocess.Popen("xfce4-power-manager-settings")
def nhpav(): def nhpav():
"""#Pulse Audio Volume""" """#Pulse Audio Volume"""
subprocess.Popen("pavucontrol") subprocess.Popen("pavucontrol")
@ -83,15 +42,14 @@ def ssdu():
"""#Disk Utilities""" """#Disk Utilities"""
subprocess.Popen("gnome-disks") subprocess.Popen("gnome-disks")
def ssas():
"""#Accessibilitity"""
subprocess.Popen("xfce4-accessibility-settings")
def sssi(): def sssi():
"""#System Informaion""" """#System Information"""
cmd = "xfce4-terminal -e 'bash -c \"neofetch\";bash'" cmd = "x-terminal-emulator -e 'bash -c \"neofetch\";bash'"
subprocess.Popen(cmd, shell=True)
def ssst():
"""#Snapstore"""
cmd = "[ -e /snap/bin ] && snap-store || x-terminal-emulator -e \"bash -c 'sudo snap install snap-store'\""
subprocess.Popen(cmd, shell=True) subprocess.Popen(cmd, shell=True)
@ -104,13 +62,6 @@ def ssss():
"""#Snapstore""" """#Snapstore"""
os.system('luakit -U https://snapcraft.io/store &') os.system('luakit -U https://snapcraft.io/store &')
def ssst():
"""#Snapstore"""
cmd = "[ -e /snap/bin ] && snap-store || xfce4-terminal -T \"Snap Store Installer\" -e \"bash -c 'sudo snap install snap-store'\""
subprocess.Popen(cmd, shell=True)
def ssai(): def ssai():
"""#App Image""" """#App Image"""
os.system('luakit -U https://www.appimagehub.com/ &') os.system('luakit -U https://www.appimagehub.com/ &')

View File

@ -29,8 +29,6 @@ pehub.tk.call('wm', 'iconphoto', pehub._w,
file=spath + '/images/peppermint-hub.png')) file=spath + '/images/peppermint-hub.png'))
def center_screen(): def center_screen():
""" gets the coordinates of the center of the screen """ """ gets the coordinates of the center of the screen """
screen_width = pehub.winfo_screenwidth() screen_width = pehub.winfo_screenwidth()
@ -44,9 +42,10 @@ def center_screen():
def runxd(): def runxd():
"""Run the bash""" """Run the bash, x-terminal-emulator will attempt
cmd = "xterm -e 'bash -c \"sudo xDaily -i\"' --title='xDaily by PeppermintOS' --icon=/usr/share/pixmaps/xd.png" to run the default terminal emulator of the system
subprocess.Popen(cmd, shell=True) """
subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "xDaily", "-i"])
@ -80,14 +79,14 @@ def fphandle():
check_flatpak_path = '/usr/bin/flatpak' check_flatpak_path = '/usr/bin/flatpak'
if os.path.exists(check_flatpak_path): if os.path.exists(check_flatpak_path):
btnsp.grid( btnsp.grid(
row=2, row=0,
column=2, column=0,
ipadx=10, ipadx=10,
ipady=10, ipady=10,
padx=10, padx=10,
pady=10, pady=10,
sticky='nesw') sticky='nesw')
lblsp.grid(row=3, column=2) lblsp.grid(row=1, column=0)
check_gnome_path = '/usr/bin/gnome-software' check_gnome_path = '/usr/bin/gnome-software'
if os.path.exists(check_gnome_path): if os.path.exists(check_gnome_path):
btnfp.destroy() btnfp.destroy()
@ -157,6 +156,53 @@ def sbphandle():
lblsw.grid(row=3, column=2, padx=0, pady=5) lblsw.grid(row=3, column=2, padx=0, pady=5)
def xsetting_handle():
""" Check to see what the desktop session is
If its not xfce do not use the xfce
setting button or user groups
"""
check = os.environ.get('DESKTOP_SESSION')
using = check
if using == "xfce":
# xfce settings
btnxf = ttk.Button(
gfs,
text="XF",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.xf,
command=actions.osettingsmgr)
lblxf = ttk.Label(gfs, text=hubconf.lxf)
btnxf.grid(
row=4,
column=2,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblxf.grid(row=5, column=2, padx=0, pady=5)
# User Groups
btnug = ttk.Button(
gfs,
text="UG",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.ug,
command=actions.ssug)
btnug.grid(
row=4,
column=1,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblug.grid(row=5, column=1)
else:
pass
def debianbase(): def debianbase():
"""Bring functions together""" """Bring functions together"""
fphandle() fphandle()
@ -224,13 +270,7 @@ btndu = ttk.Button(
bootstyle="dark-outline", bootstyle="dark-outline",
image=hubconf.du, image=hubconf.du,
command=actions.ssdu) command=actions.ssdu)
btnug = ttk.Button(
gfs,
text="UG",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.ug,
command=actions.ssug)
btnpa = ttk.Button( btnpa = ttk.Button(
gfs, gfs,
text="PA", text="PA",
@ -252,13 +292,6 @@ btnum = ttk.Button(
bootstyle="dark-outline", bootstyle="dark-outline",
image=hubconf.um, image=hubconf.um,
command=actions.sssi) command=actions.sssi)
btnxf = ttk.Button(
gfs,
text="XF",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.xf,
command=actions.osettingsmgr)
lblnc = ttk.Label(gfs, text=hubconf.lnc) lblnc = ttk.Label(gfs, text=hubconf.lnc)
lblpr = ttk.Label(gfs, text=hubconf.lpr) lblpr = ttk.Label(gfs, text=hubconf.lpr)
@ -269,7 +302,6 @@ lblxd = ttk.Label(gfs, text=hubconf.lxd)
lblhb = ttk.Label(gfs, text=hubconf.lhb) lblhb = ttk.Label(gfs, text=hubconf.lhb)
lblsi = ttk.Label(gfs, text=hubconf.lsi) lblsi = ttk.Label(gfs, text=hubconf.lsi)
lblum = ttk.Label(gfs, text=hubconf.lum) lblum = ttk.Label(gfs, text=hubconf.lum)
lblxf = ttk.Label(gfs, text=hubconf.lxf)
btnnc.grid( btnnc.grid(
row=0, row=0,
@ -299,15 +331,7 @@ btndu.grid(
sticky='nesw') sticky='nesw')
lbldu.grid(row=1, column=2) lbldu.grid(row=1, column=2)
lblhb.grid(row=3, column=0) lblhb.grid(row=3, column=0)
btnug.grid(
row=2,
column=2,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblug.grid(row=3, column=2)
btnpa.grid( btnpa.grid(
row=4, row=4,
@ -327,26 +351,16 @@ btnum.grid(
pady=10, pady=10,
sticky='nesw') sticky='nesw')
lblum.grid(row=3, column=1, padx=0, pady=5) lblum.grid(row=3, column=1, padx=0, pady=5)
btnxf.grid(
row=4, btnxd.grid(
row=2,
column=2, column=2,
ipadx=10, ipadx=10,
ipady=10, ipady=10,
padx=10, padx=10,
pady=10, pady=10,
sticky='nesw') sticky='nesw')
lblxf.grid(row=5, column=2, padx=0, pady=5) lblxd.grid(row=3, column=2)
btnxd.grid(
row=4,
column=1,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblxd.grid(row=5, column=1)
########################### ###########################
@ -411,19 +425,20 @@ def hblock():
def hbon(): def hbon():
""" Turn on hblock """ """ Turn on hblock """
cmd = "xterm -e 'bash -c \"hblock exit 0\";bash'" subprocess.Popen(["x-terminal-emulator", "-e", "hblock", "exit"])
subprocess.Popen(cmd, shell=True)
hblock() hblock()
def hboff(): def hboff():
""" Turn off hblock """ """ Turn off hblock """
cmd = "xterm -e 'bash -c \"hblock -S none -D none exit 0\";bash'" subprocess.Popen(["x-terminal-emulator", "-e", "hblock", "-S",
subprocess.Popen(cmd, shell=True) "none", "-D", "none", "exit"])
hblock() hblock()
########################### ###########################
######Software Start####### ######Software Start#######
########################### ###########################
@ -553,7 +568,7 @@ def devuanbase():
hblock() hblock()
#hblock2() xsetting_handle()
# call Center screen # call Center screen
center_screen() center_screen()
# start the version process # start the version process

View File

@ -6,6 +6,7 @@
* This is for the suggested packages GUI * This is for the suggested packages GUI
""" """
import os import os
import subprocess
import tkinter as tk import tkinter as tk
import ttkbootstrap as ttk import ttkbootstrap as ttk
@ -54,114 +55,114 @@ def check_web_browsers():
# ***Install Packages*** # ***Install Packages***
def install_atril(): def install_atril():
""" Install atril """ """ Install atril """
cmd = 'xterm -e "sudo apt install atril" \ subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "apt", "install",
--title="Installing Atril Document Viewer" ' "atril"]
os.system(cmd) )
check_packages() check_packages()
def install_parole(): def install_parole():
""" Install parole """ """ Install parole """
cmd = 'xterm -e "sudo apt install parole" \ subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "apt", "install",
--title="Installing Parole" ' "parole"]
os.system(cmd) )
check_packages() check_packages()
def install_gufw(): def install_gufw():
""" Install gufw """ """ Install gufw """
cmd = 'xterm -e "sudo apt install gufw" \ subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "apt", "install",
--title="Installing the Fire Wall" ' "gufw"]
os.system(cmd) )
check_packages() check_packages()
def install_snap(): def install_snap():
""" Install install snap""" """ Install install snap"""
cmd = 'xterm -e "sudo apt install snapd" \ subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "apt", "install",
--title="Installing snap" ' "snapd"]
os.system(cmd) )
check_packages() check_packages()
def install_flatpak(): def install_flatpak():
""" Install flatpak """ """ Install flatpak """
cmd = 'xterm -e "sudo apt install flatpak" \ subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "apt", "install",
--title="Installing flatpak" ' "flatpak"]
os.system(cmd) )
check_packages() check_packages()
def install_store(): def install_store():
""" Install gnome store""" """ Install gnome store"""
cmd = 'xterm -e "sudo apt install gnome-software" \ subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "apt", "install",
--title="Installing the gnome store" ' "gnome-software"]
os.system(cmd) )
check_packages() check_packages()
def install_timeshift(): def install_timeshift():
""" Install timeshift""" """ Install timeshift"""
cmd = 'xterm -e "sudo apt install timeshift" \ subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "apt", "install",
--title="Installing Timeshift" ' "timeshift"]
os.system(cmd) )
check_packages() check_packages()
# ***Web browser defs*** # ***Web browser defs***
def install_firefox(): def install_firefox():
""" Install firefox-esr """ """ Install firefox-esr """
cmd = 'xterm -e "sudo apt install firefox-esr" \ subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "apt", "install",
--title="Installing Fire Fox ESR" ' "firefox-esr"]
os.system(cmd) )
check_web_browsers() check_web_browsers()
def install_konqueror(): def install_konqueror():
""" Install konqueror """ """ Install konqueror """
cmd = 'xterm -e "sudo apt install konqueror" \ subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "apt", "install",
--title="Installing Konqueror" ' "konqueror"]
os.system(cmd) )
check_web_browsers() check_web_browsers()
def install_epiphany(): def install_epiphany():
""" Install epiphany-browser """ """ Install epiphany-browser """
cmd = 'xterm -e "sudo apt install epiphany-browser" \ subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "apt", "install",
--title="Installing Gnome Web" ' "epiphany-browser"]
os.system(cmd) )
check_web_browsers() check_web_browsers()
def install_tor(): def install_tor():
""" Install torbrowser-launcher """ """ Install torbrowser-launcher """
cmd = 'xterm -e "sudo apt install torbrowser-launcher" \ subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "apt", "install",
--title="Installing Tor" ' "torbrowser-launcher"]
os.system(cmd) )
check_web_browsers() check_web_browsers()
def install_qute(): def install_qute():
""" Install install qutebrowser""" """ Install install qutebrowser"""
cmd = 'xterm -e "sudo apt install qutebrowser" \ subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "apt", "install",
--title="Installing QuteBrowser" ' "qutebrowser"]
os.system(cmd) )
check_web_browsers() check_web_browsers()
def install_chromium(): def install_chromium():
""" Install chromium""" """ Install chromium"""
cmd = 'xterm -e "sudo apt install chromium" \ subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "apt", "install",
--title="Installing Chromium" ' "chromium"]
os.system(cmd) )
check_web_browsers() check_web_browsers()
def install_falkon(): def install_falkon():
""" Install falkon""" """ Install falkon"""
cmd = 'xterm -e "sudo apt install falkon" \ subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "apt", "install",
--title="Installing falkom" ' "falkon"]
os.system(cmd) )
check_web_browsers() check_web_browsers()

View File

@ -16,8 +16,8 @@ import welfunc
# setting up window # setting up window
pewel = welconf.bbstyle pewel = welconf.bbstyle
pewel.resizable(False, False) pewel.resizable(False, False)
WINDOW_HEIGHT = 360 WINDOW_HEIGHT = 400
WINDOW_WIDTH = 720 WINDOW_WIDTH = 710
def wbase(): def wbase():
@ -40,7 +40,7 @@ def center_screen():
def kon(): def kon():
""" This feature will is the disabled the welcome screen""" """ This feature will disabled the welcome screen"""
# This will get the logged in user # This will get the logged in user
gusr = tk.StringVar() gusr = tk.StringVar()
gusr.set(os.getlogin()) gusr.set(os.getlogin())
@ -56,7 +56,8 @@ def kon():
text="Disable Auto start", text="Disable Auto start",
bootstyle="light-round-toggle", bootstyle="light-round-toggle",
command=kon_del) command=kon_del)
cbas.grid(row=2, column=6) #cbas.grid(row=2, column=1)
cbas.place(x=12, y=360)
else: else:
cbas = ttk.Checkbutton( cbas = ttk.Checkbutton(
pewel, pewel,