Closed ovalkonia closed 18 hours ago
Pretty self-explanatory, adds min and max simplexpr functions. It might be useful sometimes, so why not!
min
max
Resolves https://github.com/elkowar/eww/issues/1122
The usage is the same as with other simplexpr function calls. The syntax would be min(a, b) and max(a, b), where a and b must both be convertible into f64. Here is a configuration used in the showcase below:
min(a, b)
max(a, b)
a
b
f64
(defwidget ftest [] (box :halign "center" :spacing "50" :space-evenly "false" "min(-9.591, 15.3) = ${min(-9.591, 15.3)}" "max(5, 4.7) = ${max(5, 4.7)}")) (defwindow example :monitor "0" :geometry (geometry :x "0" :y "0" :width "100%" :height "35px" :anchor "top center") :exclusive "true" (ftest))
N/A
Please make sure you can check all the boxes that apply to this PR.
docs/content/main
cargo fmt
Description
Pretty self-explanatory, adds
min
andmax
simplexpr functions. It might be useful sometimes, so why not!Resolves https://github.com/elkowar/eww/issues/1122
Usage
The usage is the same as with other simplexpr function calls. The syntax would be
min(a, b)
andmax(a, b)
, wherea
andb
must both be convertible intof64
. Here is a configuration used in the showcase below:Showcase
Additional Notes
N/A
Checklist
Please make sure you can check all the boxes that apply to this PR.
docs/content/main
directory has been adjusted to reflect my changes.cargo fmt
to automatically format all code before committing