Skip to content

Commit

Permalink
Some docs updates (#1179)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>

* `docs`: fix the heat units typo

* Revert "Export magic constants during server initialization"

This reverts commit 09fbdde.

* Revert "Update docs/src/magic-vars.md"

This reverts commit b3dbfad.

* Revert "`docs`: add `magic constants` descriptions (or at least try)"

This reverts commit f03aebf.

---------

Co-authored-by: Wölfchen <[email protected]>
  • Loading branch information
ovalkonia and w-lfchen authored Oct 11, 2024
1 parent ef32bf2 commit 9a7e699
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/eww/src/config/inbuilt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 { <name>: temperature }
"EWW_TEMPS" [2] => || Ok(DynVal::from(get_temperatures())),

Expand Down
3 changes: 2 additions & 1 deletion crates/eww/src/widgets/widget_definitions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ fn build_gtk_combo_box_text(bargs: &mut BuilderArgs) -> Result<gtk::ComboBoxText

const WIDGET_NAME_EXPANDER: &str = "expander";
/// @widget expander
/// @desc A widget that can expand and collapse, showing/hiding it's children.
/// @desc A widget that can expand and collapse, showing/hiding it's children. Should contain
/// exactly one child.
fn build_gtk_expander(bargs: &mut BuilderArgs) -> Result<gtk::Expander> {
let gtk_widget = gtk::Expander::new(None);

Expand Down
1 change: 1 addition & 0 deletions docs/src/expression_language.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9a7e699

Please sign in to comment.