Updated: Fixed browsers in the xDaily gui
Thanks! to Manual for the catch Signed-off-by: debianpepper <pdpdebdevuan@protonmail.com>
This commit is contained in:
parent
534bf77914
commit
ff104ff89a
Binary file not shown.
|
@ -31,17 +31,33 @@ 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
|
||||
gusr = os.getlogin()
|
||||
|
||||
def determine_browser(run_addrs):
|
||||
""" Determine what browser should be used by kumo"""
|
||||
|
||||
lwpath = "/home/" + gusr + "/.local/share/pmostools/lw_profile"
|
||||
ffpath = "/home/" + gusr + "/.local/share/pmostools/ff_profile"
|
||||
if os.path.exists(lwpath) and os.path.isdir(lwpath):
|
||||
profile_path = os.path.expanduser(
|
||||
f"/home/{gusr}/.local/share/pmostools/lw_profile/"
|
||||
)
|
||||
command = (
|
||||
f'librewolf -P kumo --profile "{profile_path}" {run_addrs} &'
|
||||
)
|
||||
print("Found the LW, running LibreWolf")
|
||||
elif os.path.exists(ffpath) and os.path.isdir(ffpath):
|
||||
profile_path = os.path.expanduser(
|
||||
f"/home/{gusr}/.local/share/pmostools/ff_profile/"
|
||||
)
|
||||
command = (
|
||||
f'firefox -P firefox_kumo --profile "{profile_path}" {run_addrs} &'
|
||||
)
|
||||
print("Found the FF, running Firefox")
|
||||
else:
|
||||
command = f'luakit -U {run_addrs} &'
|
||||
print("This is a 32bit Flagship with no browser")
|
||||
return command
|
||||
|
||||
|
||||
def submit_password(password_entry,
|
||||
|
@ -327,22 +343,23 @@ def wbase(window_object):
|
|||
|
||||
def pep_docs():
|
||||
"""Open Pep Docs"""
|
||||
browser_type = set_browser()
|
||||
url = "https://peppermint_os.codeberg.page/html/"
|
||||
command = (
|
||||
f'{browser_type} --new-window {url} &'
|
||||
)
|
||||
run_addrs = "https://peppermint_os.codeberg.page/html/"
|
||||
command = determine_browser(run_addrs)
|
||||
if command:
|
||||
os.system(command)
|
||||
else:
|
||||
print("There no suitebable browser installed!")
|
||||
|
||||
|
||||
def source_forge():
|
||||
"""Open Sourceforge"""
|
||||
browser_type = set_browser()
|
||||
url ="https://sourceforge.net/p/peppermintos/pepos/"
|
||||
command = (
|
||||
f'{browser_type} --new-window {url} &'
|
||||
)
|
||||
run_addrs = "https://sourceforge.net/p/peppermintos/pepos/"
|
||||
command = determine_browser(run_addrs)
|
||||
if command:
|
||||
os.system(command)
|
||||
else:
|
||||
print("There no suitebable browser installed!")
|
||||
|
||||
|
||||
def manage_updates_tab(main_notebook, output_text, run_task_updates,xd_intro, manage_updates):
|
||||
""" Move to the manage updates tab"""
|
||||
|
|
Loading…
Reference in New Issue