diff --git a/bin/auto-cpufreq b/bin/auto-cpufreq index e94ecba..804aa7a 100755 --- a/bin/auto-cpufreq +++ b/bin/auto-cpufreq @@ -15,14 +15,15 @@ from auto_cpufreq.core import * # cli @click.command() -@click.option("--monitor", is_flag=True, help="Monitor and see suggestions for CPU optimizations") -@click.option("--live", is_flag=True, help="Monitor and make (temp.) suggested CPU optimizations") -@click.option("--install/--remove", default=True, help="Install/remove daemon for (permanent) automatic CPU optimizations") -@click.option("--stats", is_flag=True, help="View live stats of CPU optimizations made by daemon") -@click.option("--log", is_flag=True, help="Deprecated flag replaced by --stats") @click.option("--daemon", is_flag=True, hidden=True) @click.option("--debug", is_flag=True, help="Show debug info (include when submitting bugs)") -def main(monitor, live, install, stats, log, daemon, debug): +@click.option("--install/--remove", default=True, help="Install/remove daemon for (permanent) automatic CPU optimizations") +@click.option("--live", is_flag=True, help="Monitor and make (temp.) suggested CPU optimizations") +@click.option("--log", is_flag=True, help="Deprecated flag replaced by --stats") +@click.option("--monitor", is_flag=True, help="Monitor and see suggestions for CPU optimizations") +@click.option("--stats", is_flag=True, help="View live stats of CPU optimizations made by daemon") +@click.option("--version", is_flag=True, help="Show currently installed version") +def main(daemon, debug, install, live, log, monitor, stats, version): if len(sys.argv) == 1: print("\n" + "-" * 32 + " auto-cpufreq " + "-" * 33 + "\n") print("Automatic CPU speed & power optimizer for Linux") @@ -110,6 +111,11 @@ def main(monitor, live, install, stats, log, daemon, debug): get_current_gov() get_turbo() footer() + elif version: + footer() + distro_info() + app_version() + footer() elif install: if os.getenv('PKG_MARKER') == "SNAP": root_check()