Added and modded settings

Deleted the PepHub stuff, added in xdaily gui and move dthe calamres down to standard.
Finally updated 540 hook

Signed-off-by: debianpepper <pdpdebdevuan@protonmail.com>
This commit is contained in:
debianpepper 2024-05-14 21:35:16 +09:00
parent 30463337d1
commit 2cc1c5b95e
8 changed files with 11 additions and 677 deletions

View File

@ -1,11 +0,0 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=Peppermint Hub
Exec=hub
Icon=/usr/share/pixmaps/peppermint-hub.png
Terminal=false
Categories=Settings
StartupNotify=True
Comment=Use the Hub to configure your system

View File

@ -1,28 +1,18 @@
#!/bin/bash #!/bin/bash
#git is needed for the git repos # Install the Min browser (used for pep tools)
apt install git --yes wget -P /opt https://github.com/minbrowser/min/releases/download/v1.32.1/min-1.32.1-amd64.deb
#install pip3, needed for additional python modules dpkg -i /opt/min-1.32.1-amd64.deb
apt install --yes python3-pip apt-get install -f
apt install --yes python3.11-venv
# Install the Luakit browser (used for pep tools)
apt install --yes luakit
# Install Plank # Install Plank
apt install --yes plank apt install --yes plank
# set the plymouth on boot # set the plymouth on boot
plymouth-set-default-theme -R lines plymouth-set-default-theme -R lines
# install the re keyring
dpkg -i /opt/pepconf/deb-multimedia-keyring_2016.8.1_all.deb
# install the Wallpapers # install the Wallpapers
apt install --yes pepermint-wallpapers apt install --yes pepermint-wallpapers
# Install desktop-base
apt install --yes desktop-base
# Set the desktop base theme # Set the desktop base theme
# Remove it first # Remove it first

View File

@ -1,577 +0,0 @@
"""
* Author: "PepDebian(peppermintosteam@proton.me)
*
* License: SPDX-License-Identifier: GPL-3.0-or-later
*
* This is for the Hub GUI
"""
import tkinter as tk
import tkinter.ttk as ttk
import subprocess
import os
from tendo import singleton
import bsconf
import hubconf
import actions
# This will get the logged in user
gusr = os.getlogin()
spath = "/home/" + gusr + "/.local/share/pmostools/peptools"
# setting up window
pehub = bsconf.bbstyle
WINDOW_HEIGHT = 420
WINDOW_WIDTH = 740
pehub.resizable(False, False)
pehub.title('Peppermint Hub')
pehub.tk.call('wm', 'iconphoto', pehub._w,
tk.PhotoImage(
file=spath + '/images/peppermint-hub.png'))
def center_screen():
""" gets the coordinates of the center of the screen """
screen_width = pehub.winfo_screenwidth()
screen_height = pehub.winfo_screenheight()
# Coordinates of the upper left corner of the window to make the window
# appear in the center
x_cordinate = int((screen_width / 2) - (WINDOW_WIDTH / 2))
y_cordinate = int((screen_height / 2) - (WINDOW_HEIGHT / 2))
pehub.geometry("{}x{}+{}+{}".format(WINDOW_WIDTH,
WINDOW_HEIGHT, x_cordinate, y_cordinate))
def runxd():
"""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"])
def gnmhandle():
""" handle the Gnome store"""
check_path = '/usr/bin/gnome-software'
if os.path.exists(check_path):
btngs.grid(
row=2,
column=0,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblgs.grid(row=3, column=0, padx=0, pady=5)
else:
btngsw.grid(
row=2,
column=0,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblgsw.grid(row=3, column=0, padx=0, pady=5)
def fphandle():
""" Handle Flathub store """
check_flatpak_path = '/usr/bin/flatpak'
if os.path.exists(check_flatpak_path):
btnsp.grid(
row=0,
column=0,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblsp.grid(row=1, column=0)
check_gnome_path = '/usr/bin/gnome-software'
if os.path.exists(check_gnome_path):
btnfp.destroy()
lblfp.destroy()
else:
lblfp.grid(row=3, column=1, padx=0, pady=5)
btnfp.grid(
row=2,
column=1,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
else:
lblfp.grid(row=3, column=1, padx=0, pady=5)
btnfp.grid(
row=2,
column=1,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
def sbphandle():
""" Handle Snap Store """
check_snap_path = '/usr/bin/gnome-software'
if os.path.exists(check_snap_path):
btnsw.destroy()
lblsw.destroy()
check_gnome_path = '/usr/bin/gnome-software'
if os.path.exists(check_gnome_path):
btnss.grid(
row=2,
column=2,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblss.grid(row=3, column=2, padx=0, pady=5)
else:
if os.path.exists(check_snap_path):
lblss.destroy()
btnss.destroy()
btnsw.grid(
row=2,
column=2,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblsw.grid(row=3, column=2, padx=0, pady=5)
else:
btnsw.grid(
row=2,
column=2,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
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()
gnmhandle()
sbphandle()
def vdecide():
"""Decide Version logo to use"""
if os.path.exists("/etc/devuan_version"):
devuanbase()
elif os.path.exists("/etc/debian_version"):
debianbase()
# makes sure only a single instance is running
me = singleton.SingleInstance()
X = 1
# Frame that manages system tools
gfr = tk.Frame(pehub)
gfr.grid(row=0, column=0, columnspan=2, ipadx=5, ipady=5, padx=10, pady=5)
# Border fram for system tools
gfs = ttk.Labelframe(gfr, bootstyle="warning", text="General System Tools")
gfs.grid(row=0, column=0)
# frame that manages the software tools
sfr = tk.Frame(pehub)
sfr.grid(
row=0,
column=3,
columnspan=2,
ipadx=5,
ipady=5,
padx=10,
pady=5,
sticky='n')
# Border frame for software
sfs = ttk.Labelframe(sfr, bootstyle="warning", text="Software Tools")
sfs.grid(row=0, column=0)
###########################
###General System Tools####
###Start###################
btnnc = ttk.Button(
gfs,
text="Network",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.nc,
command=actions.nhnm)
btnpr = ttk.Button(
gfs,
text="Printers",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.pr,
command=actions.nhpr)
btndu = ttk.Button(
gfs,
text="DU",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.du,
command=actions.ssdu)
btnpa = ttk.Button(
gfs,
text="PA",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.pa,
command=actions.nhpav)
btnxd = ttk.Button(
gfs,
text="XD",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.xd,
command=runxd)
btnum = ttk.Button(
gfs,
text="UM",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.um,
command=actions.sssi)
lblnc = ttk.Label(gfs, text=hubconf.lnc)
lblpr = ttk.Label(gfs, text=hubconf.lpr)
lbldu = ttk.Label(gfs, text=hubconf.ldu)
lblug = ttk.Label(gfs, text=hubconf.lug)
lblpa = ttk.Label(gfs, text=hubconf.lpa)
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)
btnnc.grid(
row=0,
column=0,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblnc.grid(row=1, column=0)
btnpr.grid(
row=0,
column=1,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblpr.grid(row=1, column=1)
btndu.grid(
row=0,
column=2,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lbldu.grid(row=1, column=2)
lblhb.grid(row=3, column=0)
btnpa.grid(
row=4,
column=0,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblpa.grid(row=5, column=0, padx=0, pady=5)
btnum.grid(
row=2,
column=1,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblum.grid(row=3, column=1, padx=0, pady=5)
btnxd.grid(
row=2,
column=2,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblxd.grid(row=3, column=2)
###########################
###General System Tools####
###End#####################
def hblock():
""" Take care of Hblock"""
file_check= open('/etc/hosts', 'r')
read_file = file_check.read()
word = 'Blocked domains: 0'
if word in read_file:
btnhbon = ttk.Button( gfs,
text="hbon",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.hbon,
command=hboff
)
btnhbon.lower()
btnhboff = ttk.Button( gfs,
text="hboff",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.hboff,
command=hbon
)
btnhboff.grid( row=2,
column=0,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw'
)
else:
btnhboff = ttk.Button( gfs,
text="hboff",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.hboff,
command=hbon
)
btnhboff.lower()
btnhbon = ttk.Button( gfs,
text="hbon",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.hbon,
command=hboff
)
btnhbon.grid(row=2,
column=0,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw'
)
def hbon():
""" Turn on hblock """
subprocess.Popen(["x-terminal-emulator", "-e", "hblock", "exit"])
hblock()
def hboff():
""" Turn off hblock """
subprocess.Popen(["x-terminal-emulator", "-e", "hblock", "-S",
"none", "-D", "none", "exit"])
hblock()
###########################
######Software Start#######
###########################
btnsp = ttk.Button(
sfs,
text="sp",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.sp,
command=actions.packages)
btnah = ttk.Button(
sfs,
text="ah",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.ah,
command=actions.ssai)
btnsc = ttk.Button(
sfs,
text="sc",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.sc,
command=actions.ssspm)
btnss = ttk.Button(
sfs,
text="ss",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.ss,
command=actions.ssst)
btnsw = ttk.Button(
sfs,
text="ss",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.ss,
command=actions.ssss)
btngs = ttk.Button(
sfs,
text="gs",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.gs,
command=actions.ssgn)
btngsw = ttk.Button(
sfs,
text="gsw",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.gs,
command=actions.ssgns)
btnfp = ttk.Button(
sfs,
text="fp",
cursor="hand2",
bootstyle="dark-outline",
image=hubconf.fp,
command=actions.ssfh)
lblsp = ttk.Label(sfs, text=hubconf.lsp)
lblah = ttk.Label(sfs, text=hubconf.lah)
lblsc = ttk.Label(sfs, text=hubconf.lsc)
lblss = ttk.Label(sfs, text=hubconf.lss)
lblsw = ttk.Label(sfs, text=hubconf.lssw)
lblgs = ttk.Label(sfs, text=hubconf.lgs)
lblgsw = ttk.Label(sfs, text=hubconf.lgsw)
lblfp = ttk.Label(sfs, text=hubconf.lfp)
btnsp.grid(
row=0,
column=0,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblsp.grid(row=1, column=0)
btnah.grid(
row=0,
column=1,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblah.grid(row=1, column=1)
btnsc.grid(
row=0,
column=2,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblsc.grid(row=1, column=2)
###Functions needed for the software sorting###
def devuanbase():
"""set up for a Devuan Build"""
lblss.destroy()
btnss.destroy()
btnfp.grid(
row=2,
column=1,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblfp.grid(row=3, column=1, padx=0, pady=5)
fphandle()
btnsp.grid(
row=0,
column=0,
ipadx=10,
ipady=10,
padx=10,
pady=10,
sticky='nesw')
lblsp.grid(row=1, column=0)
gnmhandle()
hblock()
xsetting_handle()
# call Center screen
center_screen()
# start the version process
vdecide()
# set the block status
# run the applictaion
pehub.mainloop()

View File

@ -1,68 +0,0 @@
"""
* Author: "PepDebian(peppermintosteam@proton.me)
*
* License: SPDX-License-Identifier: GPL-3.0-or-later
*
* The hub config file should be used for the over all button style and design
* of the hub
"""
import os
from tkinter import PhotoImage
# This will get the logged in user
gusr = os.getlogin()
spath = "/home/" + gusr + "/.local/share/pmostools/peptools"
#button icons.
###General System icons###
nc = PhotoImage(file="/usr/share/pixmaps/network-wired.png")
pr = PhotoImage(file="/usr/share/pixmaps/gnome-dev-printer.png")
du = PhotoImage(file="/usr/share/pixmaps/drive-harddisk-system.png")
ug = PhotoImage(file="/usr/share/pixmaps/stock_people.png")
pa = PhotoImage(file="/usr/share/pixmaps/stock_music-library.png")
xd = PhotoImage(file= spath + '/images/xd.png')
hbon = PhotoImage(file="/usr/share/pixmaps/hblockon.png")
hboff = PhotoImage(file="/usr/share/pixmaps/hblock.png")
si = PhotoImage(file="/usr/share/pixmaps/gnome-session.png")
um = PhotoImage(file="/usr/share/pixmaps/update-manager.png")
xf = PhotoImage(file="/usr/share/pixmaps/applications-system.png")
##label text
lnc = "Network"
lpr = "Printers"
ldu = "Disk Utilities"
lug = "User & Groups"
lpa = "Pulse Audio"
lxd = "xDaily"
lhb = "hBlock"
lsi = "Update Mgr"
lum = "System Info"
lxf = "xfce Settings"
sp = PhotoImage(file= spath + '/images/peppermint-inst-48.png')
ah = PhotoImage(file="/usr/share/pixmaps/ai.png")
sc = PhotoImage(file="/usr/share/pixmaps/synaptic.png")
ss = PhotoImage(file="/usr/share/pixmaps/snap.png")
gs = PhotoImage(file="/usr/share/pixmaps/gnome-software.png")
fp = PhotoImage(file="/usr/share/pixmaps/flat.png")
lsp = "Suggested"
lah = "App Image Hub"
lsc = "Synaptic"
lss = "Snap Store"
lssw = "Snap Web Store"
lgs = "Gnome Store"
lgsw = "Gnome Web Store"
lfp = "Flat hub"
lmf = "--The PepHub is a central place that is used to manage the build."
" It includes tools that are not readily available in the XFCE settings"
" manager, Some of these tools are built and maintained by the Peppermint"
" team, others are system utilities."

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

View File

@ -286,8 +286,8 @@ LOADED_LIST = ('xfce4\n'
'baobab\n' 'baobab\n'
'xdg-user-dirs-gtk\n' 'xdg-user-dirs-gtk\n'
'squashfs-tools\n' 'squashfs-tools\n'
'calamares\n' #'calamares\n' ## These are in the GENERAL_SHARED_LIST
'calamares-settings-debian\n' #'calamares-settings-debian\n' ## in the GENERAL_SHARED_LIST
) )
SERVER_LIST = ('zonefstoolspep\n' SERVER_LIST = ('zonefstoolspep\n'
@ -329,8 +329,8 @@ LIGHT_DM_LIST = ('lightdm\n'
# General Shared packages to be installed. # General Shared packages to be installed.
GENERAL_SHARED_LIST = ('alsa-utils\n' GENERAL_SHARED_LIST = ('alsa-utils\n'
'bluez\n' 'bluez\n'
#'calamares\n' 'calamares\n'
#'calamares-settings-debian\n' 'calamares-settings-debian\n'
'console-setup\n' 'console-setup\n'
'cups\n' 'cups\n'
'curl\n' 'curl\n'
@ -351,6 +351,8 @@ GENERAL_SHARED_LIST = ('alsa-utils\n'
'inputattach\n' 'inputattach\n'
'inxi\n' 'inxi\n'
'locales\n' 'locales\n'
'libgtk2.0-0\n'
'libgtk2.0-common\n'
'nala\n' 'nala\n'
'neofetch\n' 'neofetch\n'
'network-manager-gnome\n' 'network-manager-gnome\n'

View File

@ -450,7 +450,6 @@ def shared_files():
src_paths = ('/aliases/bash_aliases', src_paths = ('/aliases/bash_aliases',
'/sources/peppermint.list', '/sources/peppermint.list',
'/PepProTools/xDaily', '/PepProTools/xDaily',
'/PepProTools/hub',
'/PepProTools/welcome', '/PepProTools/welcome',
'/PepProTools/kumo', '/PepProTools/kumo',
'/lightdm/lightdm.conf', '/lightdm/lightdm.conf',
@ -463,7 +462,6 @@ def shared_files():
des_paths = ('/etc/skel/.bash_aliases', des_paths = ('/etc/skel/.bash_aliases',
'/etc/apt/sources.list.d', '/etc/apt/sources.list.d',
'/usr/local/bin/xDaily', '/usr/local/bin/xDaily',
'/usr/local/bin/hub',
'/usr/local/bin/welcome', '/usr/local/bin/welcome',
'/usr/local/bin/kumo', '/usr/local/bin/kumo',
'/etc/lightdm/lightdm.conf', '/etc/lightdm/lightdm.conf',