JakeRoggenbuck / auto-clock-speed

A utility to check stats about your CPU, and auto regulate clock speeds to help with either performance or battery life.
https://autoclockspeed.org
MIT License
33 stars 9 forks source link

Update help menu in interactive mode #364

Closed JakeRoggenbuck closed 1 year ago

JakeRoggenbuck commented 2 years ago

The help function help() in interactive.rs needs to be updates to what it can actually do. To see the things it actually does, look at the later match statement in the file.

JakeRoggenbuck commented 2 years ago
match new {
    "help" => help(),
    "get freq" => int.get.freq(false),
    "get power" => int.get.power(false),
    "get usage" => int.get.usage(false),
    "get turbo" => int.get.turbo(false),
    "get available_governors" => int.get.available_govs(false),
    "get cpus" => int.get.cpus(false),
    "get speeds" => int.get.speeds(false),
    "get temp" => int.get.temp(false),
    "get govs" => int.get.govs(false),
    "get battery_condition" => int.get.bat_cond(false),

    "set gov performance" => {
        let config: Config = get_config();

        int.set
            .gov("performance".to_string(), config, set_settings.clone());
    }

    "set gov powersave" => {
        let config: Config = get_config();

        int.set
            .gov("powersave".to_string(), config, set_settings.clone());
    }

    "exit" => {
        println!("Bye!");
        return;
    }
    _ => println!(
        "{}",
        format!("Command '{}' not found. Use 'help'.", new).red()
    ),
};