Skip to content

Commit

Permalink
Add --install_performance option to help menu
Browse files Browse the repository at this point in the history
  • Loading branch information
AdnanHodzic committed Aug 2, 2022
1 parent e1637fa commit 559350f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
6 changes: 5 additions & 1 deletion auto_cpufreq/power_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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():
Expand Down Expand Up @@ -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)
Expand Down
9 changes: 5 additions & 4 deletions bin/auto-cpufreq
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 559350f

Please sign in to comment.