Update: Corrected icons and suggested theme

Signed-off-by: debianpepper <pdpdebdevuan@protonmail.com>
This commit is contained in:
debianpepper 2024-06-02 21:42:02 +09:00
parent 619de2090d
commit 83734c036f
9 changed files with 42 additions and 38 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -4,7 +4,7 @@ GenericName=hblock
Comment=A GUI for the xDaily Update Tool
Categories=XFCE;GTK;Settings;X-XFCE-SettingsDialog;
Type=Application
Exec=xfce4-terminal -H -e "sh -c 'hblock'"
Exec=xfce4-terminal -H -e "sh -c '/usr/local/bin/hblock'"
Icon=hblock
Terminal=false
NoDisplay=false

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@ -10,22 +10,23 @@ import subprocess
import tkinter as tk
import ttkbootstrap as ttk
pwin = ttk.Window(themename="darkly")
pwin = ttk.Window(themename="peppermint")
pwin.title("Suggested Packages")
pwin.resizable(False, False)
WINDOW_HEIGHT = 470
WINDOW_WIDTH = 470
pwin.geometry('475x470')
pwin.tk.call('wm', 'iconphoto', pwin, tk.PhotoImage(
file='/usr/share/pixmaps/peppermint-old.png'))
notebook = ttk.Notebook(pwin)
# Add some tabs to the notebook
tab1 = ttk.Frame(notebook)
tab2 = ttk.Frame(notebook)
notebook.add(tab1, text="Tab 1")
notebook.add(tab2, text="Tab 2")
def center_screen():
""" gets the coordinates of the center of the screen """
screen_width = pwin.winfo_screenwidth()
screen_height = pwin.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))
pwin.geometry("{}x{}+{}+{}".format(WINDOW_WIDTH,
WINDOW_HEIGHT, x_cordinate, y_cordinate))
def check_packages():
""" Check if software is installed"""
@ -39,10 +40,12 @@ def check_packages():
fire_wall['state'] = tk.DISABLED
if os.path.exists('/usr/bin/flatpak'):
flatpak['state'] = tk.DISABLED
if os.path.exists('/usr/bin/timeshift'):
backup_tool['state'] = tk.DISABLED
# if os.path.exists('/usr/bin/timeshift'):
# backup_tool['state'] = tk.DISABLED
if os.path.exists('/usr/bin/gnome-software'):
store['state'] = tk.DISABLED
if os.path.exists('/usr/bin/keepassxc'):
store['state'] = tk.DISABLED
def check_web_browsers():
@ -190,7 +193,7 @@ def check_base_snaps():
if os.path.exists("/etc/devuan_version"):
flatpak = ttk.Button(software_frame,
text="Flatpak Package Platform",
cursor="hand2", style="dark",
cursor="hand2", style="danger",
command=install_flatpak
)
flatpak.grid(row=4, column=0, ipadx=5, ipady=5, padx=5, pady=5,
@ -198,7 +201,7 @@ def check_base_snaps():
)
store = ttk.Button(software_frame,
text="Gnome Software Store",
cursor="hand2", style="dark",
cursor="hand2", style="danger",
command=install_store
)
store.grid(row=5, column=0, ipadx=5, ipady=5, padx=5, pady=5,
@ -206,7 +209,7 @@ def check_base_snaps():
)
backup_tool = ttk.Button(software_frame,
text="TimeShift: Backup Tool",
cursor="hand2", style="dark",
cursor="hand2", style="danger",
command=install_keepass
)
backup_tool.grid(row=7, column=0, ipadx=5, ipady=5, padx=5, pady=5,
@ -214,7 +217,7 @@ def check_base_snaps():
)
pwd_tool = ttk.Button(software_frame,
text="KeePassXC: Password Tool",
cursor="hand2", style="dark",
cursor="hand2", style="danger",
command=install_timeshift
)
pwd_tool.grid(row=6, column=0, ipadx=5, ipady=5, padx=5, pady=5,
@ -224,7 +227,7 @@ def check_base_snaps():
elif os.path.exists("/etc/debian_version"):
snap = ttk.Button(software_frame,
text="Snap Package Platform",
cursor="hand2", style="dark",
cursor="hand2", style="danger",
command=install_snap
)
snap.grid(row=4, column=0, ipadx=5, ipady=5, padx=5, pady=5,
@ -232,7 +235,7 @@ def check_base_snaps():
)
flatpak = ttk.Button(software_frame,
text="Flatpak Package Platform",
cursor="hand2", style="dark",
cursor="hand2", style="danger",
command=install_flatpak
)
flatpak.grid(row=5, column=0, ipadx=5, ipady=5, padx=5, pady=5,
@ -240,7 +243,7 @@ def check_base_snaps():
)
store = ttk.Button(software_frame,
text="Gnome Software Store",
cursor="hand2", style="dark",
cursor="hand2", style="danger",
command=install_store
)
store.grid(row=6, column=0, ipadx=5, ipady=5, padx=5, pady=5,
@ -248,7 +251,7 @@ def check_base_snaps():
)
backup_tool = ttk.Button(software_frame,
text="TimeShift: Backup Tool",
cursor="hand2", style="dark",
cursor="hand2", style="danger",
command=install_timeshift
)
backup_tool.grid(row=7, column=0, ipadx=5, ipady=5, padx=5, pady=5,
@ -261,7 +264,7 @@ def check_base_snaps():
# Frame that managed the Welcome To Peppermint Section
fsw = ttk.Frame(pwin, width=200)
fsw.grid(row=2, column=0, columnspan=4)
software_frame = ttk.Labelframe(fsw, bootstyle="warning",
software_frame = ttk.Labelframe(fsw, bootstyle="dark",
text="Suggested Software"
)
software_frame.grid(row=5, column=0, columnspan=2, ipadx=0, ipady=0,
@ -269,19 +272,19 @@ software_frame.grid(row=5, column=0, columnspan=2, ipadx=0, ipady=0,
)
# Buttons for the suggested software
pdf_viewer = ttk.Button(software_frame, text="Atril: a document viewer",
cursor="hand2", style="dark", command=install_atril
cursor="hand2", style="danger", command=install_atril
)
pdf_viewer.grid(row=0, column=0, ipadx=5, ipady=5, padx=5, pady=5,
sticky='ew'
)
media_player = ttk.Button(software_frame, text="Parole: Media Player",
cursor="hand2", style="dark", command=install_parole
cursor="hand2", style="danger", command=install_parole
)
media_player.grid(row=2, column=0, ipadx=5, ipady=5, padx=5, pady=5,
sticky='ew'
)
fire_wall = ttk.Button(software_frame, text="gufw: GNU Firewall",
cursor="hand2", style="dark", command=install_gufw
cursor="hand2", style="danger", command=install_gufw
)
fire_wall.grid(row=3, column=0, ipadx=5, ipady=5, padx=5, pady=5,
sticky='ew'
@ -291,43 +294,43 @@ fs = ttk.Frame(pwin)
fs.grid(row=2, column=5, columnspan=2, ipadx=0, ipady=0, padx=10, pady=10)
# Frame Title
soc = ttk.Labelframe(fs, bootstyle="warning", text="Suggested Web Browsers")
soc = ttk.Labelframe(fs, bootstyle="dark", text="Suggested Web Browsers")
soc.grid(row=5, column=0, columnspan=2, ipadx=0, ipady=0, padx=10, pady=10)
# Web Browser Buttons
fire_fox = ttk.Button(soc, text="Firefox ESR Browser", cursor="hand2",
style="dark", command=install_firefox
style="danger", command=install_firefox
)
fire_fox.grid(row=0, column=0, ipadx=5, ipady=5, padx=5, pady=5, sticky='ew')
kde_web = ttk.Button(soc, text="Konqueror KDE Browser", cursor="hand2",
style="dark", command=install_konqueror
style="danger", command=install_konqueror
)
kde_web.grid(row=1, column=0, ipadx=5, ipady=5, padx=5, pady=5, sticky='ew')
gnome_web = ttk.Button(soc, text="Gnome Web(Epiphany)", cursor="hand2",
style="dark", command=install_epiphany
style="danger", command=install_epiphany
)
gnome_web.grid(row=2, column=0, ipadx=5, ipady=5, padx=5, pady=5, sticky='ew')
tor_web = ttk.Button(soc, text="Tor Browser: Privacy", cursor="hand2",
style="dark", command=install_tor
style="danger", command=install_tor
)
tor_web.grid(row=3, column=0, ipadx=5, ipady=5, padx=5, pady=5, sticky='ew')
qute_web = ttk.Button(soc, text="Qutebrowser: Vim-like ", cursor="hand2",
style="dark", command=install_qute
style="danger", command=install_qute
)
qute_web.grid(row=4, column=0, ipadx=5, ipady=5, padx=5, pady=5, sticky='ew')
chromium_web = ttk.Button(soc, text="Chromium Browser", cursor="hand2",
style="dark-", command=install_chromium
style="danger", command=install_chromium
)
chromium_web.grid(row=6, column=0, ipadx=5, ipady=5, padx=5, pady=5,
sticky='ew'
)
falkon_web = ttk.Button(soc, text="Falkon Qt Browser", cursor="hand2",
style="dark", command=install_falkon
style="danger", command=install_falkon
)
falkon_web.grid(row=7, column=0, ipadx=5, ipady=5, padx=5, pady=5, sticky='ew')
@ -336,7 +339,6 @@ lblpmtitle = ttk.Label(pwin, style="F62817.TLabel",
' repositories'
).place(x=5, y=440)
check_base_snaps()
check_packages()
#check_packages()
check_web_browsers()
center_screen()
pwin.mainloop()

View File

@ -514,6 +514,7 @@ def shared_files():
'/PepProTools/welcome',
'/PepProTools/kumo',
'/PepProTools/xdaily-gui',
'/PepProTools/suggested',
'/lightdm/lightdm.conf',
'/lightdm/lightdm-gtk-greeter.conf',
'/plymouth/plymouthd.conf',
@ -527,6 +528,7 @@ def shared_files():
'/usr/local/bin/welcome',
'/usr/local/bin/kumo',
'/usr/local/bin/xdaily-gui',
'/usr/local/bin/suggested',
'/etc/lightdm/lightdm.conf',
'/etc/lightdm/lightdm-gtk-greeter.conf',
'/etc/plymouth/plymouthd.conf',