1
Fork 0
mirror of https://github.com/RGBCube/superfreq synced 2025-07-27 17:07:44 +00:00

config: improve watcher; debounce

This commit is contained in:
NotAShelf 2025-05-14 01:38:55 +03:00
parent 262c70fb85
commit 498d179aa8
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF
8 changed files with 186 additions and 110 deletions

View file

@ -414,7 +414,10 @@ pub fn get_cpu_global_info(cpu_cores: &[CpuCoreInfo]) -> CpuGlobalInfo {
None
};
let available_governors = if cpufreq_base_path.join("scaling_available_governors").exists() {
let available_governors = if cpufreq_base_path
.join("scaling_available_governors")
.exists()
{
read_sysfs_file_trimmed(cpufreq_base_path.join("scaling_available_governors")).map_or_else(
|_| vec![],
|s| s.split_whitespace().map(String::from).collect(),