From 9a7e69953956b6364c85c5d2a1d76b02aa1421b0 Mon Sep 17 00:00:00 2001 From: ovalkonia <60359793+ovalkonia@users.noreply.github.com> Date: Fri, 11 Oct 2024 14:15:32 +0300 Subject: [PATCH] Some docs updates (#1179) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Export magic constants during server initialization * `docs`: add `magic constants` descriptions (or at least try) * `docs`: add `min` and `max` simplexpr functions entries * `docs`: `expander` should contain single child * Update docs/src/magic-vars.md Co-authored-by: Wölfchen * `docs`: fix the heat units typo * Revert "Export magic constants during server initialization" This reverts commit 09fbdde6c99a4c4c8af39b76496878f99a28d568. * Revert "Update docs/src/magic-vars.md" This reverts commit b3dbfadfb2143cc0d3e2e21c0cf43ed0a96a53cf. * Revert "`docs`: add `magic constants` descriptions (or at least try)" This reverts commit f03aebf0dd2fba10c67c608f72570c230d0eb8ea. --------- Co-authored-by: Wölfchen --- crates/eww/src/config/inbuilt.rs | 2 +- crates/eww/src/widgets/widget_definitions.rs | 3 ++- docs/src/expression_language.md | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/crates/eww/src/config/inbuilt.rs b/crates/eww/src/config/inbuilt.rs index ba299395b..687fb0577 100644 --- a/crates/eww/src/config/inbuilt.rs +++ b/crates/eww/src/config/inbuilt.rs @@ -30,7 +30,7 @@ macro_rules! define_builtin_vars { } define_builtin_vars! { - // @desc EWW_TEMPS - Heat of the components in Celcius + // @desc EWW_TEMPS - Heat of the components in degree Celsius // @prop { : temperature } "EWW_TEMPS" [2] => || Ok(DynVal::from(get_temperatures())), diff --git a/crates/eww/src/widgets/widget_definitions.rs b/crates/eww/src/widgets/widget_definitions.rs index 0fb88f133..394237a0b 100644 --- a/crates/eww/src/widgets/widget_definitions.rs +++ b/crates/eww/src/widgets/widget_definitions.rs @@ -312,7 +312,8 @@ fn build_gtk_combo_box_text(bargs: &mut BuilderArgs) -> Result Result { let gtk_widget = gtk::Expander::new(None); diff --git a/docs/src/expression_language.md b/docs/src/expression_language.md index 15dfc6eda..1c493e015 100644 --- a/docs/src/expression_language.md +++ b/docs/src/expression_language.md @@ -40,6 +40,7 @@ Supported currently are the following features: - some function calls: - `round(number, decimal_digits)`: Round a number to the given amount of decimals - `sin(number)`, `cos(number)`, `tan(number)`, `cot(number)`: Calculate the trigonometric value of a given number in **radians** + - `min(a, b)`, `max(a, b)`: Get the smaller or bigger number out of two given numbers - `degtorad(number)`: Converts a number from degrees to radians - `radtodeg(number)`: Converts a number from radians to degrees - `replace(string, regex, replacement)`: Replace matches of a given regex in a string