Updated: needed to determin 32 or 64 bit
min is a 64 but browser, so it cananot be on the 32 system so, the ccb tools that use min also need to still use luakit Thes changes should correct that for the the archect system Signed-off-by: debianpepper <pdpdebdevuan@protonmail.com>
This commit is contained in:
parent
e96456295d
commit
08edc255ff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -11,6 +11,7 @@ import re
|
|||
from urllib.parse import urljoin
|
||||
from tkinter import filedialog
|
||||
import sqlite3
|
||||
import platform
|
||||
import tkinter as tk
|
||||
import requests
|
||||
import ttkbootstrap as ttk
|
||||
|
@ -43,6 +44,19 @@ pcur.execute(""" CREATE TABLE IF NOT EXISTS kumoapp (id integer PRIMARY
|
|||
KEY AUTOINCREMENT, ssbname text, lnk text);"""
|
||||
)
|
||||
|
||||
def set_browser():
|
||||
"""
|
||||
Determine the system and set the browser type
|
||||
"""
|
||||
architecture = platform.architecture()[0]
|
||||
if '64bit' in architecture:
|
||||
browser_type = "min"
|
||||
else:
|
||||
browser_type = "luakit"
|
||||
return browser_type
|
||||
|
||||
|
||||
|
||||
def download_favicon(url, output_folder=ipath, request_timeout=3):
|
||||
"""
|
||||
This function will try a regex to find and locate the favicon
|
||||
|
@ -115,10 +129,11 @@ def make_desktop_file():
|
|||
get_icon = icon_value.get("1.0", 'end-1c')
|
||||
write_path = dpath + get_name + '.desktop'
|
||||
selected_category_key = categories_reverse[get_local]
|
||||
browser_type = set_browser()
|
||||
app_content = f"""
|
||||
[Desktop Entry]
|
||||
Name={get_name}
|
||||
Exec= min -U {get_url}
|
||||
Exec={browser_type} -U {get_url}
|
||||
Icon={get_icon}
|
||||
Categories={selected_category_key}
|
||||
Type=Application
|
||||
|
@ -168,9 +183,13 @@ def fill_url_address():
|
|||
|
||||
|
||||
def run_url_address():
|
||||
""" Run the ssb with the run button"""
|
||||
"""Run the ssb with the run button"""
|
||||
browser_type = set_browser()
|
||||
run_addrs = runaddr_value.get("1.0", 'end-1c')
|
||||
os.system('min -U ' + run_addrs + ' &')
|
||||
command = (
|
||||
f'{browser_type} -U {run_addrs} &'
|
||||
)
|
||||
os.system(command)
|
||||
|
||||
def select_icon():
|
||||
"""
|
||||
|
|
|
@ -7,16 +7,29 @@
|
|||
* Screen
|
||||
"""
|
||||
import os.path
|
||||
|
||||
import platform
|
||||
|
||||
# This will get the logged in user
|
||||
gusr = os.getlogin()
|
||||
spath = "/home/" + gusr + "/.local/share/pmostools/peptools"
|
||||
|
||||
def set_browser():
|
||||
"""
|
||||
Determine the system and set the browser type
|
||||
"""
|
||||
architecture = platform.architecture()[0]
|
||||
if '64bit' in architecture:
|
||||
browser_type = "min"
|
||||
else:
|
||||
browser_type = "luakit"
|
||||
return browser_type
|
||||
|
||||
|
||||
def suggested_packages():
|
||||
""" Open the suggested packages """
|
||||
os.system('python3 ' + spath + '/suggested.py')
|
||||
|
||||
|
||||
def about():
|
||||
"""Open the about page"""
|
||||
os.system('min --new-window https://peppermintos.com/about/ &'
|
||||
|
@ -24,40 +37,61 @@ def about():
|
|||
|
||||
|
||||
##SSB's###
|
||||
|
||||
def pep_docs():
|
||||
"""Open Pep Docs"""
|
||||
os.system('min --new-window https://peppermint_os.codeberg.page/html/ &'
|
||||
browser_type = set_browser()
|
||||
url = "https://peppermint_os.codeberg.page/html/"
|
||||
command = (
|
||||
f'{browser_type} --new-window {url} &'
|
||||
)
|
||||
os.system(command)
|
||||
|
||||
# Community Section
|
||||
|
||||
|
||||
def mastodon():
|
||||
"""Open Mastodon"""
|
||||
os.system('min --new-window https://fosstodon.org/@peppermintos &'
|
||||
browser_type = set_browser()
|
||||
url ="https://fosstodon.org/@peppermintos"
|
||||
command = (
|
||||
f'{browser_type} --new-window {url} &'
|
||||
)
|
||||
os.system(command)
|
||||
|
||||
|
||||
def code_berg():
|
||||
"""Open Codeberg"""
|
||||
os.system('min --new-window https://codeberg.org/Peppermint_OS & '
|
||||
browser_type = set_browser()
|
||||
url ="https://codeberg.org/Peppermint_OS"
|
||||
command = (
|
||||
f'{browser_type} --new-window {url} &'
|
||||
)
|
||||
os.system(command)
|
||||
|
||||
|
||||
def matrix():
|
||||
"""Open Matrix"""
|
||||
os.system('min --new-window https://matrix.to/#/!JhPtEbNexzFaoOkvGp:matrix.org?via=matrix.org & '
|
||||
browser_type = set_browser()
|
||||
url ="https://matrix.to/#/!JhPtEbNexzFaoOkvGp:matrix.org?via=matrix.org"
|
||||
command = (
|
||||
f'{browser_type} --new-window {url} &'
|
||||
)
|
||||
os.system(command)
|
||||
|
||||
|
||||
def source_forge():
|
||||
"""Open Sourceforge"""
|
||||
os.system('min --new-window https://sourceforge.net/p/peppermintos/pepos/ & '
|
||||
browser_type = set_browser()
|
||||
url ="https://sourceforge.net/p/peppermintos/pepos/"
|
||||
command = (
|
||||
f'{browser_type} --new-window {url} &'
|
||||
)
|
||||
os.system(command)
|
||||
|
||||
|
||||
def build_date():
|
||||
"""Open BuildDate wiki"""
|
||||
os.system('min --new-window https://sourceforge.net/p/peppermintos/pepwiki/BuildDate/ & '
|
||||
browser_type = set_browser()
|
||||
url ="https://sourceforge.net/p/peppermintos/pepwiki/BuildDate/"
|
||||
command = (
|
||||
f'{browser_type} --new-window {url} &'
|
||||
)
|
||||
os.system(command)
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
import os
|
||||
import sqlite3
|
||||
import subprocess
|
||||
import platform
|
||||
import threading
|
||||
import tkinter as tk
|
||||
import ttkbootstrap as ttk
|
||||
|
@ -30,6 +31,19 @@ BUTTON_TEXT = "Submit"
|
|||
STYLE_TYPE = "danger"
|
||||
CURSOR_ICON = "hand2"
|
||||
|
||||
def set_browser():
|
||||
"""
|
||||
Determine the system and set the browser type
|
||||
"""
|
||||
architecture = platform.architecture()[0]
|
||||
if '64bit' in architecture:
|
||||
browser_type = "min"
|
||||
else:
|
||||
browser_type = "luakit"
|
||||
return browser_type
|
||||
|
||||
|
||||
|
||||
def submit_password(password_entry,
|
||||
submit_callback):
|
||||
"""
|
||||
|
@ -284,7 +298,6 @@ def currently_pending_updates(xd_intro):
|
|||
tree.set(type_node, "count", str(data["count"]))
|
||||
|
||||
tree.pack(expand=True, fill=tk.BOTH, padx=5.7, pady=5.7)
|
||||
print("gotyou")
|
||||
|
||||
|
||||
def get_update_records():
|
||||
|
@ -314,17 +327,22 @@ def wbase(window_object):
|
|||
|
||||
def pep_docs():
|
||||
"""Open Pep Docs"""
|
||||
os.system(
|
||||
'min --new-window https://peppermint_os.codeberg.page/html/ &'
|
||||
browser_type = set_browser()
|
||||
url = "https://peppermint_os.codeberg.page/html/"
|
||||
command = (
|
||||
f'{browser_type} --new-window {url} &'
|
||||
)
|
||||
os.system(command)
|
||||
|
||||
|
||||
def source_forge():
|
||||
"""Open Sourceforge"""
|
||||
os.system(
|
||||
'min --new-window https://sourceforge.net/p/peppermintos/pepos/ & '
|
||||
browser_type = set_browser()
|
||||
url ="https://sourceforge.net/p/peppermintos/pepos/"
|
||||
command = (
|
||||
f'{browser_type} --new-window {url} &'
|
||||
)
|
||||
|
||||
os.system(command)
|
||||
|
||||
def manage_updates_tab(main_notebook, output_text, run_task_updates,xd_intro, manage_updates):
|
||||
""" Move to the manage updates tab"""
|
||||
|
|
|
@ -321,6 +321,8 @@ SERVER_LIST = ('zonefstoolspep\n'
|
|||
MINI_LIST = ('nano\n'
|
||||
)
|
||||
|
||||
|
||||
|
||||
KDE_LIST = ('sample1\n'
|
||||
'sample2\n'
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue