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")
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():
"""#Network Manager"""
subprocess.Popen("nm-connection-editor")
@ -58,17 +28,6 @@ def nhpr():
"""#Printers"""
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():
"""#Pulse Audio Volume"""
subprocess.Popen("pavucontrol")
@ -83,15 +42,14 @@ def ssdu():
"""#Disk Utilities"""
subprocess.Popen("gnome-disks")
def ssas():
"""#Accessibilitity"""
subprocess.Popen("xfce4-accessibility-settings")
def sssi():
"""#System Informaion"""
cmd = "xfce4-terminal -e 'bash -c \"neofetch\";bash'"
"""#System Information"""
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)
@ -104,13 +62,6 @@ def ssss():
"""#Snapstore"""
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():
"""#App Image"""
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'))
def center_screen():
""" gets the coordinates of the center of the screen """
screen_width = pehub.winfo_screenwidth()
@ -44,9 +42,10 @@ def center_screen():
def runxd():
"""Run the bash"""
cmd = "xterm -e 'bash -c \"sudo xDaily -i\"' --title='xDaily by PeppermintOS' --icon=/usr/share/pixmaps/xd.png"
subprocess.Popen(cmd, shell=True)
"""Run the bash, x-terminal-emulator will attempt
to run the default terminal emulator of the system
"""
subprocess.Popen(["x-terminal-emulator", "-e", "sudo", "xDaily", "-i"])
@ -80,14 +79,14 @@ def fphandle():
check_flatpak_path = '/usr/bin/flatpak'
if os.path.exists(check_flatpak_path):
btnsp.grid(
row=2,
column=2,
row=0,
column=0,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblsp.grid(row=3, column=2)
lblsp.grid(row=1, column=0)
check_gnome_path = '/usr/bin/gnome-software'
if os.path.exists(check_gnome_path):
btnfp.destroy()
@ -157,6 +156,53 @@ def sbphandle():
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():
"""Bring functions together"""
fphandle()
@ -224,13 +270,7 @@ btndu = ttk.Button(
bootstyle="dark-outline",
image=hubconf.du,
command=actions.ssdu)
btnug = ttk.Button(
gfs,
text="UG",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.ug,
command=actions.ssug)
btnpa = ttk.Button(
gfs,
text="PA",
@ -252,13 +292,6 @@ btnum = ttk.Button(
bootstyle="dark-outline",
image=hubconf.um,
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)
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)
lblsi = ttk.Label(gfs, text=hubconf.lsi)
lblum = ttk.Label(gfs, text=hubconf.lum)
lblxf = ttk.Label(gfs, text=hubconf.lxf)
btnnc.grid(
row=0,
@ -299,15 +331,7 @@ btndu.grid(
sticky='nesw')
lbldu.grid(row=1, column=2)
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(
row=4,
@ -327,26 +351,16 @@ btnum.grid(
pady=10,
sticky='nesw')
lblum.grid(row=3, column=1, padx=0, pady=5)
btnxf.grid(
row=4,
btnxd.grid(
row=2,
column=2,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblxf.grid(row=5, column=2, padx=0, pady=5)
btnxd.grid(
row=4,
column=1,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblxd.grid(row=5, column=1)
lblxd.grid(row=3, column=2)
###########################
@ -411,19 +425,20 @@ def hblock():
def hbon():
""" Turn on hblock """
cmd = "xterm -e 'bash -c \"hblock exit 0\";bash'"
subprocess.Popen(cmd, shell=True)
subprocess.Popen(["x-terminal-emulator", "-e", "hblock", "exit"])
hblock()
def hboff():
""" Turn off hblock """
cmd = "xterm -e 'bash -c \"hblock -S none -D none exit 0\";bash'"
subprocess.Popen(cmd, shell=True)
subprocess.Popen(["x-terminal-emulator", "-e", "hblock", "-S",
"none", "-D", "none", "exit"])
hblock()
###########################
######Software Start#######
###########################
@ -553,7 +568,7 @@ def devuanbase():
hblock()
#hblock2()
xsetting_handle()
# call Center screen
center_screen()
# start the version process

View File

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

View File

@ -16,8 +16,8 @@ import welfunc
# setting up window
pewel = welconf.bbstyle
pewel.resizable(False, False)
WINDOW_HEIGHT = 360
WINDOW_WIDTH = 720
WINDOW_HEIGHT = 400
WINDOW_WIDTH = 710
def wbase():
@ -40,7 +40,7 @@ def center_screen():
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
gusr = tk.StringVar()
gusr.set(os.getlogin())
@ -56,7 +56,8 @@ def kon():
text="Disable Auto start",
bootstyle="light-round-toggle",
command=kon_del)
cbas.grid(row=2, column=6)
#cbas.grid(row=2, column=1)
cbas.place(x=12, y=360)
else:
cbas = ttk.Checkbutton(
pewel,