Fix documentation of magic variables

This commit is contained in:
elkowar 2021-08-18 17:14:58 +02:00
parent c079f19c25
commit 7ffebf6903
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F

View file

@ -22,13 +22,13 @@ macro_rules! builtin_vars {
pub fn get_inbuilt_vars() -> HashMap<VarName, ScriptVarDefinition> { pub fn get_inbuilt_vars() -> HashMap<VarName, ScriptVarDefinition> {
builtin_vars! {Duration::new(2, 0), builtin_vars! {Duration::new(2, 0),
// @desc EWW_TEMPS - Heat of the components in Celcius\nExample: `{{(CPU_TEMPS.core_1 + CPU_TEMPS.core_2) / 2}}` // @desc EWW_TEMPS - Heat of the components in Celcius\nExample: `{(CPU_TEMPS.core_1 + CPU_TEMPS.core_2) / 2}`
"EWW_TEMPS" => || Ok(DynVal::from(cores())), "EWW_TEMPS" => || Ok(DynVal::from(cores())),
// @desc EWW_RAM - The current RAM + Swap usage // @desc EWW_RAM - The current RAM + Swap usage
"EWW_RAM" => || Ok(DynVal::from(format!("{:.2}", ram()))), "EWW_RAM" => || Ok(DynVal::from(format!("{:.2}", ram()))),
// @desc EWW_DISK - Information on on all mounted partitions (Might report inaccurately on some filesystems, like btrfs)\nExample: `{{EWW_DISK["/"]}}` // @desc EWW_DISK - Information on on all mounted partitions (Might report inaccurately on some filesystems, like btrfs)\nExample: `{EWW_DISK["/"]}`
"EWW_DISK" => || Ok(DynVal::from(disk())), "EWW_DISK" => || Ok(DynVal::from(disk())),
// @desc EWW_BATTERY - Battery capacity in procent of the main battery // @desc EWW_BATTERY - Battery capacity in procent of the main battery