Combine browser configuration menu options

This commit is contained in:
2Shirt 2021-09-29 20:44:50 -06:00
parent eacab48c1e
commit bd0a03e283
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 25 additions and 21 deletions

View file

@ -118,19 +118,18 @@ BASE_MENUS = {
MenuEntry('Software Bundle', 'auto_install_software_bundle'),
),
'Configure System': (
MenuEntry('Chrome Notifications', 'auto_disable_chrome_notifications'),
MenuEntry('Configure Browsers', 'auto_config_browsers'),
MenuEntry('Open Shell', 'auto_config_open_shell'),
MenuEntry('uBlock Origin', 'auto_enable_ublock_origin'),
MenuEntry('Enable BSoD MiniDumps', 'auto_enable_bsod_minidumps'),
MenuEntry('Enable RegBack', 'auto_enable_regback'),
MenuEntry('Enable System Restore', 'auto_system_restore_enable'),
MenuEntry('Set System Restore Size', 'auto_system_restore_set_size'),
MenuEntry('Create System Restore', 'auto_system_restore_create'),
MenuEntry('Enable Windows Updates', 'auto_windows_updates_enable'),
MenuEntry('User Account Control', 'auto_restore_default_uac'),
MenuEntry('Windows Activation', 'auto_activate_windows'),
MenuEntry('Windows Explorer', 'auto_config_explorer'),
MenuEntry(r'Windows\Temp Fix', 'auto_windows_temp_fix'),
MenuEntry('Create System Restore', 'auto_system_restore_create'),
),
'System Information': (
MenuEntry('AIDA64 Report', 'auto_export_aida64_report'),

View file

@ -505,6 +505,23 @@ def auto_activate_windows():
TRY_PRINT.run('Windows Activation...', activate_with_bios)
def auto_config_browsers():
"""Configure Browsers."""
prompt = ' Press Enter to continue...'
TRY_PRINT.run('Chrome Notifications...', disable_chrome_notifications)
TRY_PRINT.run(
'uBlock Origin...', enable_ublock_origin, msg_good='STARTED',
)
TRY_PRINT.run(
'Set default browser...', set_default_browser, msg_good='STARTED',
)
print(prompt, end='', flush=True)
pause('')
# Move cursor to beginning of the previous line and clear prompt
print(f'\033[F\r{" "*len(prompt)}\r', end='', flush=True)
def auto_config_explorer():
"""Configure Windows Explorer and restart the process."""
TRY_PRINT.run('Windows Explorer...', config_explorer)
@ -515,24 +532,6 @@ def auto_config_open_shell():
TRY_PRINT.run('Open Shell...', reg_write_settings, REG_OPEN_SHELL_SETTINGS)
def auto_disable_chrome_notifications():
"""Disable notifications in Google Chrome."""
TRY_PRINT.run('Chrome Notifications...', disable_chrome_notifications)
def auto_enable_ublock_origin():
"""Enable uBlock Origin in supported browsers."""
prompt = ' Press Enter to continue...'
TRY_PRINT.run(
'uBlock Origin...', enable_ublock_origin, msg_good='STARTED',
)
print(prompt, end='', flush=True)
pause('')
# Move cursor to beginning of the previous line and clear prompt
print(f'\033[F\r{" "*len(prompt)}\r', end='', flush=True)
def auto_export_aida64_report():
"""Export AIDA64 reports."""
TRY_PRINT.run('AIDA64 Report...', export_aida64_report)
@ -956,6 +955,12 @@ def get_storage_status():
return report
def set_default_browser():
"""Open Windows Settings to the default apps section."""
cmd = ['start', '', 'ms-settings:defaultapps']
popen_program(cmd, shell=True)
# Tool Functions
def export_aida64_report():
"""Export AIDA64 report."""