Add --install_performance option to help menu

This commit is contained in:
Adnan Hodzic 2022-08-02 09:18:29 +02:00
parent e1637fa85e
commit 559350f3ef
2 changed files with 10 additions and 5 deletions

View File

@ -85,6 +85,7 @@ def gnome_power_detect():
print("git clone https://github.com/AdnanHodzic/auto-cpufreq.git") print("git clone https://github.com/AdnanHodzic/auto-cpufreq.git")
print("cd auto-cpufreq/auto_cpufreq") print("cd auto-cpufreq/auto_cpufreq")
print("python3 power_helper.py --gnome_power_disable") print("python3 power_helper.py --gnome_power_disable")
print("\nReference: https://github.com/AdnanHodzic/auto-cpufreq#configuring-auto-cpufreq")
# automatically disable gnome power profile service in case it's running during install # automatically disable gnome power profile service in case it's running during install
@ -109,6 +110,7 @@ def gnome_power_detect_snap():
print("git clone https://github.com/AdnanHodzic/auto-cpufreq.git") print("git clone https://github.com/AdnanHodzic/auto-cpufreq.git")
print("cd auto-cpufreq/auto_cpufreq") print("cd auto-cpufreq/auto_cpufreq")
print("python3 power_helper.py --gnome_power_disable") print("python3 power_helper.py --gnome_power_disable")
print("\nReference: https://github.com/AdnanHodzic/auto-cpufreq#configuring-auto-cpufreq")
# stops gnome >= 40 power profiles (live) # stops gnome >= 40 power profiles (live)
@ -229,6 +231,8 @@ def gnome_power_rm_reminder_snap():
print("git clone https://github.com/AdnanHodzic/auto-cpufreq.git") print("git clone https://github.com/AdnanHodzic/auto-cpufreq.git")
print("cd auto-cpufreq/auto_cpufreq") print("cd auto-cpufreq/auto_cpufreq")
print("python3 power_helper.py --gnome_power_enable") print("python3 power_helper.py --gnome_power_enable")
print("\nReference: https://github.com/AdnanHodzic/auto-cpufreq#configuring-auto-cpufreq")
def valid_options(): def valid_options():
@ -337,7 +341,7 @@ def gnome_power_svc_disable_ext(ctx, power_selection):
@click.command() @click.command()
@click.option("--gnome_power_disable", help="Disable GNOME Power profiles service (default: balanced)", type=click.Choice(['balanced', 'performance'], case_sensitive=False)) @click.option("--gnome_power_disable", help="Disable GNOME Power profiles service (default: balanced), reference:\n https://bit.ly/3bjVZW1", type=click.Choice(['balanced', 'performance'], case_sensitive=False))
# ToDo: # ToDo:
# * update readme/docs # * update readme/docs
@click.option("--power_selection", hidden=True) @click.option("--power_selection", hidden=True)

View File

@ -23,7 +23,7 @@ from auto_cpufreq.power_helper import *
default=True, default=True,
help="Install/remove daemon for (permanent) automatic CPU optimizations", help="Install/remove daemon for (permanent) automatic CPU optimizations",
) )
@click.option("--install_performance", is_flag=True, hidden=True) @click.option("--install_performance", is_flag=True, help="Install daemon in \"performance\" mode, reference:\n https://bit.ly/3bjVZW1")
@click.option("--stats", is_flag=True, help="View live stats of CPU optimizations made by daemon") @click.option("--stats", is_flag=True, help="View live stats of CPU optimizations made by daemon")
@click.option( @click.option(
"--config", "--config",
@ -139,7 +139,7 @@ def main(config, daemon, debug, install, install_performance, live, log, monitor
elif log: elif log:
deprecated_log_msg() deprecated_log_msg()
elif debug: elif debug:
# ToDo: add status of GNOME Power Profile servie status # ToDo: add status of GNOME Power Profile service status
config_info_dialog() config_info_dialog()
root_check() root_check()
cpufreqctl() cpufreqctl()
@ -176,8 +176,9 @@ def main(config, daemon, debug, install, install_performance, live, log, monitor
elif install_performance: elif install_performance:
if os.getenv("PKG_MARKER") == "SNAP": if os.getenv("PKG_MARKER") == "SNAP":
root_check() root_check()
print("This option is only available on non Snap installs\n" print("\nThis option is only available on non Snap installs.\n\n"
"Please refer to auto-cpufreq power_helper.py script for more info\n") "Please refer to auto-cpufreq power_helper.py script for more info\n"
"Reference: https://github.com/AdnanHodzic/auto-cpufreq#configuring-auto-cpufreq\n")
else: else:
root_check() root_check()
running_daemon() running_daemon()