diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py index cae89c8..9f28977 100644 --- a/auto_cpufreq/core.py +++ b/auto_cpufreq/core.py @@ -490,8 +490,8 @@ def display_load(): load1m, _, _ = os.getloadavg() print("\nTotal CPU usage:", cpuload, "%") - print("Total system load:", load1m) - print("Average temp. of all cores:", avg_all_core_temp, "°C", "\n") + print("Total system load: {:.2f}".format(load1m)) + print("Average temp. of all cores: {:.2f} °C \n".format(avg_all_core_temp)) # set minimum and maximum CPU frequencies @@ -593,8 +593,8 @@ def set_powersave(): load1m, _, _ = os.getloadavg() print("\nTotal CPU usage:", cpuload, "%") - print("Total system load:", load1m) - print("Average temp. of all cores:", avg_all_core_temp, "°C") + print("Total system load: {:.2f}".format(load1m)) + print("Average temp. of all cores: {:.2f} °C \n".format(avg_all_core_temp)) # conditions for setting turbo in powersave if conf.has_option("battery", "turbo"): @@ -695,8 +695,8 @@ def mon_powersave(): load1m, _, _ = os.getloadavg() print("\nTotal CPU usage:", cpuload, "%") - print("Total system load:", load1m) - print("Average temp. of all cores:", avg_all_core_temp, "°C") + print("Total system load: {:.2f}".format(load1m)) + print("Average temp. of all cores: {:.2f} °C \n".format(avg_all_core_temp)) if psutil.cpu_percent(percpu=False, interval=0.01) >= 30.0 or isclose( max(psutil.cpu_percent(percpu=True, interval=0.01)), 100 @@ -802,8 +802,8 @@ def set_performance(): load1m, _, _ = os.getloadavg() print("\nTotal CPU usage:", cpuload, "%") - print("Total system load:", load1m) - print("Average temp. of all cores:", avg_all_core_temp, "°C") + print("Total system load: {:.2f}".format(load1m)) + print("Average temp. of all cores: {:.2f} °C \n".format(avg_all_core_temp)) if conf.has_option("charger", "turbo"): auto = conf["charger"]["turbo"] @@ -904,8 +904,8 @@ def mon_performance(): load1m, _, _ = os.getloadavg() print("\nTotal CPU usage:", cpuload, "%") - print("Total system load:", load1m) - print("Average temp. of all cores:", avg_all_core_temp, "°C") + print("Total system load: {:.2f}".format(load1m)) + print("Average temp. of all cores: {:.2f} °C \n".format(avg_all_core_temp)) # get system/CPU load load1m, _, _ = os.getloadavg()