auto-cpufreq: 1.5.3 -> 1.6.1
Co-authored-by: Aamaruvi Yogamani <38222826+Technical27@users.noreply.github.com>
This commit is contained in:
parent
01a7784022
commit
3141185a3b
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
python3Packages.buildPythonPackage rec {
|
python3Packages.buildPythonPackage rec {
|
||||||
pname = "auto-cpufreq";
|
pname = "auto-cpufreq";
|
||||||
version = "1.5.3";
|
version = "1.6.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "AdnanHodzic";
|
owner = "AdnanHodzic";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-NDIdQ4gUN2jG+VWXsv3fdUogZxOOiNtnbekD30+jx6M=";
|
sha256 = "sha256-oz3C1150CPfT0kkx1x7VIX/Rm06dkjyxeDPFCRJaWNc=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = with python3Packages; [ click distro psutil ];
|
propagatedBuildInputs = with python3Packages; [ click distro psutil ];
|
||||||
|
|
|
@ -1,8 +1,17 @@
|
||||||
diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py
|
diff --git a/auto_cpufreq/core.py b/auto_cpufreq/core.py
|
||||||
index 482a544..d142013 100644
|
index a685db8..1ca1ca1 100644
|
||||||
--- a/auto_cpufreq/core.py
|
--- a/auto_cpufreq/core.py
|
||||||
+++ b/auto_cpufreq/core.py
|
+++ b/auto_cpufreq/core.py
|
||||||
@@ -163,31 +163,13 @@ def get_current_gov():
|
@@ -72,7 +72,7 @@ def app_version():
|
||||||
|
print("Git commit:", check_output(["git", "describe", "--always"]).strip().decode())
|
||||||
|
else:
|
||||||
|
print(getoutput("pacman -Qi auto-cpufreq | grep Version"))
|
||||||
|
- else:
|
||||||
|
+ else:
|
||||||
|
# source code (auto-cpufreq-installer)
|
||||||
|
try:
|
||||||
|
print("Git commit:", check_output(["git", "describe", "--always"]).strip().decode())
|
||||||
|
@@ -179,31 +179,13 @@ def get_current_gov():
|
||||||
return print("Currently using:", getoutput("cpufreqctl.auto-cpufreq --governor").strip().split(" ")[0], "governor")
|
return print("Currently using:", getoutput("cpufreqctl.auto-cpufreq --governor").strip().split(" ")[0], "governor")
|
||||||
|
|
||||||
def cpufreqctl():
|
def cpufreqctl():
|
||||||
|
@ -38,8 +47,8 @@ index 482a544..d142013 100644
|
||||||
|
|
||||||
def footer(l=79):
|
def footer(l=79):
|
||||||
print("\n" + "-" * l + "\n")
|
print("\n" + "-" * l + "\n")
|
||||||
@@ -212,74 +194,12 @@ def remove_complete_msg():
|
@@ -233,74 +215,12 @@ def remove_complete_msg():
|
||||||
|
footer()
|
||||||
|
|
||||||
def deploy_daemon():
|
def deploy_daemon():
|
||||||
- print("\n" + "-" * 21 + " Deploying auto-cpufreq as a daemon " + "-" * 22 + "\n")
|
- print("\n" + "-" * 21 + " Deploying auto-cpufreq as a daemon " + "-" * 22 + "\n")
|
||||||
|
@ -60,7 +69,7 @@ index 482a544..d142013 100644
|
||||||
- except:
|
- except:
|
||||||
- print("\nERROR:\nWas unable to turn off bluetooth on boot")
|
- print("\nERROR:\nWas unable to turn off bluetooth on boot")
|
||||||
-
|
-
|
||||||
- auto_cpufreq_log_path.touch(exist_ok=True)
|
- auto_cpufreq_stats_path.touch(exist_ok=True)
|
||||||
-
|
-
|
||||||
- print("\n* Deploy auto-cpufreq install script")
|
- print("\n* Deploy auto-cpufreq install script")
|
||||||
- shutil.copy(SCRIPTS_DIR / "auto-cpufreq-install.sh", "/usr/bin/auto-cpufreq-install")
|
- shutil.copy(SCRIPTS_DIR / "auto-cpufreq-install.sh", "/usr/bin/auto-cpufreq-install")
|
||||||
|
@ -102,12 +111,12 @@ index 482a544..d142013 100644
|
||||||
- # remove auto-cpufreq-remove
|
- # remove auto-cpufreq-remove
|
||||||
- os.remove("/usr/bin/auto-cpufreq-remove")
|
- os.remove("/usr/bin/auto-cpufreq-remove")
|
||||||
-
|
-
|
||||||
- # delete log file
|
- # delete stats file
|
||||||
- if auto_cpufreq_log_path.exists():
|
- if auto_cpufreq_stats_path.exists():
|
||||||
- if auto_cpufreq_log_file is not None:
|
- if auto_cpufreq_stats_file is not None:
|
||||||
- auto_cpufreq_log_file.close()
|
- auto_cpufreq_stats_file.close()
|
||||||
-
|
-
|
||||||
- auto_cpufreq_log_path.unlink()
|
- auto_cpufreq_stats_path.unlink()
|
||||||
-
|
-
|
||||||
- # restore original cpufrectl script
|
- # restore original cpufrectl script
|
||||||
- cpufreqctl_restore()
|
- cpufreqctl_restore()
|
||||||
|
@ -116,6 +125,15 @@ index 482a544..d142013 100644
|
||||||
|
|
||||||
def gov_check():
|
def gov_check():
|
||||||
for gov in get_avail_gov():
|
for gov in get_avail_gov():
|
||||||
|
@@ -331,7 +251,7 @@ def countdown(s):
|
||||||
|
if auto_cpufreq_stats_file is not None:
|
||||||
|
auto_cpufreq_stats_file.seek(0)
|
||||||
|
auto_cpufreq_stats_file.truncate(0)
|
||||||
|
-
|
||||||
|
+
|
||||||
|
# execution timestamp
|
||||||
|
from datetime import datetime
|
||||||
|
now = datetime.now()
|
||||||
diff --git a/scripts/cpufreqctl.sh b/scripts/cpufreqctl.sh
|
diff --git a/scripts/cpufreqctl.sh b/scripts/cpufreqctl.sh
|
||||||
index 63a2b5b..e157efe 100755
|
index 63a2b5b..e157efe 100755
|
||||||
--- a/scripts/cpufreqctl.sh
|
--- a/scripts/cpufreqctl.sh
|
||||||
|
|
Loading…
Reference in New Issue