From 559350f3ef6a0263e5ca344c0eb47eb38550a4a2 Mon Sep 17 00:00:00 2001 From: Adnan Hodzic Date: Tue, 2 Aug 2022 09:18:29 +0200 Subject: [PATCH] Add --install_performance option to help menu --- auto_cpufreq/power_helper.py | 6 +++++- bin/auto-cpufreq | 9 +++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/auto_cpufreq/power_helper.py b/auto_cpufreq/power_helper.py index fb7e8e5..bd4330a 100644 --- a/auto_cpufreq/power_helper.py +++ b/auto_cpufreq/power_helper.py @@ -85,6 +85,7 @@ def gnome_power_detect(): print("git clone https://github.com/AdnanHodzic/auto-cpufreq.git") print("cd auto-cpufreq/auto_cpufreq") 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 @@ -109,6 +110,7 @@ def gnome_power_detect_snap(): print("git clone https://github.com/AdnanHodzic/auto-cpufreq.git") print("cd auto-cpufreq/auto_cpufreq") 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) @@ -229,6 +231,8 @@ def gnome_power_rm_reminder_snap(): print("git clone https://github.com/AdnanHodzic/auto-cpufreq.git") print("cd auto-cpufreq/auto_cpufreq") print("python3 power_helper.py --gnome_power_enable") + print("\nReference: https://github.com/AdnanHodzic/auto-cpufreq#configuring-auto-cpufreq") + def valid_options(): @@ -337,7 +341,7 @@ def gnome_power_svc_disable_ext(ctx, power_selection): @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: # * update readme/docs @click.option("--power_selection", hidden=True) diff --git a/bin/auto-cpufreq b/bin/auto-cpufreq index 3832abd..4273550 100755 --- a/bin/auto-cpufreq +++ b/bin/auto-cpufreq @@ -23,7 +23,7 @@ from auto_cpufreq.power_helper import * default=True, 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( "--config", @@ -139,7 +139,7 @@ def main(config, daemon, debug, install, install_performance, live, log, monitor elif log: deprecated_log_msg() elif debug: - # ToDo: add status of GNOME Power Profile servie status + # ToDo: add status of GNOME Power Profile service status config_info_dialog() root_check() cpufreqctl() @@ -176,8 +176,9 @@ def main(config, daemon, debug, install, install_performance, live, log, monitor elif install_performance: if os.getenv("PKG_MARKER") == "SNAP": root_check() - print("This option is only available on non Snap installs\n" - "Please refer to auto-cpufreq power_helper.py script for more info\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" + "Reference: https://github.com/AdnanHodzic/auto-cpufreq#configuring-auto-cpufreq\n") else: root_check() running_daemon()