Lucas Baumann
98c220126d
Fix crash on invalid formattime ( #1317 )
...
* catch failure to format to format time instead of panicking
* update chrono
* use new API
2025-05-18 15:39:46 +02:00
Martin Bogdanov
2c6523a372
Add floor() and ceil() ( #1315 )
...
* add floor() and ceil() functions to simplexpr, akin to round()
* document addition of floor() and ceil()
* remove unnecessary second argument for floor() and ceil()
* Update documentation
---------
Co-authored-by: Martin Bogdanov <github () martinbogdanov.com>
2025-05-11 15:08:43 +02:00
Lorenzo Bodini
593a4f4666
add log
to expressions ( #1271 )
...
* feat: add `log` to expressions
* changelog: add `log`
2025-01-14 20:11:56 +01:00
Wölfchen
6ee166707f
feat: add raw-output
for jq
( #1199 )
...
* feat: add raw-output arg to jq
Co-authored-by: Roman Hargrave <roman@hargrave.info>
* test: add some test cases for jq raw output
* refactor: improve run_jaq_function
* docs: document changes
---------
Co-authored-by: Roman Hargrave <roman@hargrave.info>
2024-12-27 23:49:28 +01:00
ovalkonia
c3b28d8fe5
powi
/powf
simplexpr functions (#1255 )
...
* Add `powi`/`powf` expressions
* Update docs
2024-12-27 00:29:26 +01:00
Wölfchen
50ec181fc7
feat: support empty string for safe access operator ( #1176 )
...
* chore: apply pr #629
Co-authored-by: Roland Fredenhagen <dev@modprog.de>
* style: early return
* feat: err on empty json string
* docs: update docs
* test: update test in accordance with decision
* chore: attribution
* docs: improve wording
* docs: add breaking change notice to changelog
* fix(changelog): fix pr link
---------
Co-authored-by: Roland Fredenhagen <dev@modprog.de>
2024-10-12 07:49:50 +02:00
Wölfchen
1d3a186092
fix: make formattime follow system locale ( #1177 )
...
closes #869
Co-authored-by: CrumblyLiquid <crumblyliquid@gmail.com>
2024-08-28 10:29:52 +02:00
Wölfchen
57a5d9963a
chore: update a few dependencies
2024-08-24 12:26:24 +02:00
ovalkonia
4d55e9ad63
Add min
and max
simplexpr functions ( #1123 )
...
* Add 'min' and 'max' function calls to simplexpr
* Add changelog entry for 'min' and 'max' simplexpr functions
2024-07-05 12:57:48 +02:00
Jacob
f1ec00a1c9
add get_env function to yuck ( #779 )
...
* added basic get_env function to yuck
* added get_env to changelog
* added get_env to docs
* changed key to string in doc
* changed suggested code
* credit myself in CHANGELOG.md
2024-03-20 12:45:08 +01:00
Wölfchen
4ce42455a4
fix: fix jq ( #1044 )
...
* fix: fix jq
* feat: add basic jq test case
2024-03-16 13:33:12 +01:00
elkowar
efea88598c
Update lalrpop
2024-02-17 14:46:20 +01:00
elkowar
4385782be4
Update jaq
2024-02-17 14:42:39 +01:00
elkowar
42f3410b5b
Remove nightly options from rustfmt.toml
2024-02-17 14:14:46 +01:00
elkowar
8f103e5a3d
Switch to using workspace dependencies
2024-02-17 14:12:48 +01:00
elkowar
9ca98448cc
Switch to stable rust
2024-02-17 13:21:05 +01:00
elkowar
60ab81ac13
Yeet try_blocks 😢
2024-02-17 13:21:05 +01:00
elkowar
0eed19332b
Yeet trace_macros, extract_if, slice_concat_trait, never_type
2024-02-17 13:21:05 +01:00
elkowar
e93f345210
Yeet use of patterns feature
2024-02-17 13:21:05 +01:00
elkowar
82a429a569
Yeet box patterns
2024-02-17 13:21:05 +01:00
WilfSilver
65d622c81f
Add window arguments ( #431 )
...
* Allow window definitions to have parameters
* Implement SimplExpr for all other window definition options
* Take gtk scaling into account when setting struts
* Cleanup
* Rename window_argumentss to instance_id_to_args
* Update docs to emphasis window arguments being constant
* Replace eww windows with active-windows and list-windows
* Fix extracting duration from string
* Format + reduce warnings
---------
Co-authored-by: elkowar <5300871+elkowar@users.noreply.github.com>
2023-12-20 21:04:38 +01:00
elkowar
4450ef55fa
Add substring function
2023-08-18 10:46:12 +02:00
end-4
9d0b667dea
Add trigonometric functions ( #823 )
2023-08-16 13:40:24 +02:00
elkowar
4a9455b63f
Remove unnecessary once_cell feature
2023-07-29 14:57:01 +02:00
elkowar
b31e397e97
Cleanup EWW_TIME API and code
2023-06-09 17:21:21 +02:00
Eren Önen
4d63f6deec
add EWW_TIME
magic variable ( #792 )
2023-06-09 17:17:41 +02:00
elkowar
88cd3a29dc
Provide better error and docs for duration type
2023-03-26 12:40:16 +02:00
éclairevoyant
fba770255d
remove box_syntax ( #711 )
...
Rust removed support for box_syntax in a recent nightly release :'(
2023-03-20 12:40:36 +01:00
elkowar
d2c7bde29d
Fix outdated formatting config
2023-02-25 16:51:08 +01:00
ElKowar
7290b9bb8d
Add jq function ( #695 )
2023-02-25 16:27:32 +01:00
Roland Fredenhagen
6a64a28629
Add support for null safe indexing e.g. for arrays ( #631 )
...
* Add support for null safe indexing e.g. for arrays
This follows the JavaScript syntax:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining#syntax
* add docs
* Add test for safe access index to non indexable
Co-authored-by: Josiah Hilden <jhilden13@gmail.com>
Co-authored-by: Josiah Hilden <jhilden13@gmail.com>
Co-authored-by: ElKowar <5300871+elkowar@users.noreply.github.com>
2023-01-05 20:21:29 +01:00
Roland Fredenhagen
3ae34602eb
Make some operators lazily evaluated ( #627 )
...
* Make some operators lazily evaluated
Fixes #624
* Add to CHANGELOG.md
2023-01-05 20:00:40 +01:00
Niclas
678e4dbc6b
Remove levenshtein crate in favor of strsim ( #635 )
...
strsim is already used by other dependencies
Signed-off-by: buffet <niclas@countingsort.com>
Signed-off-by: buffet <niclas@countingsort.com>
2022-12-07 16:14:13 +01:00
Niclas
991bb8d078
Clean up Cargo.toml's ( #607 )
2022-10-29 14:01:48 +02:00
ElKowar
f37f3ca3d8
Fix some clippy lints and run cargo fmt ( #603 )
2022-10-24 19:41:16 +02:00
elkowar
f0d4f40dcf
Fix panic on trailing backslash in string ( fixes #551 )
2022-10-01 17:24:34 +02:00
Josiah Hilden
37fc231761
Safe Access Operator ( #577 )
...
Co-authored-by: elkowar <5300871+elkowar@users.noreply.github.com>
2022-10-01 17:03:54 +02:00
ElKowar
2c3b3ff260
Cleanup AstError and Error representation in general ( #549 )
2022-09-03 18:17:21 +02:00
elkowar
9da37b8bd0
Add lexer test for empty string interpolation
2022-08-09 12:41:02 +02:00
pentamassiv
d8bb8c4142
Updated dependencies ( #449 )
...
* Updated gtk dependencies
* Added badge for status of dependencies
* Updated remaining deps for eww and other crates
* Removed obsolete imports
* Fixed problems with PR and bumped deps
* Updated x11rb
2022-07-27 18:25:08 +02:00
Niclas
b2f60a1f43
Remove some unnecessary allocations ( #480 )
2022-07-03 00:00:49 +02:00
elkowar
e810f2a67a
Add version to workspace dependencies
2022-05-09 18:58:55 +02:00
elkowar
6f574e547a
Add a description and license to all Cargo.toml files
2022-05-09 18:56:32 +02:00
elkowar
d1b222fa7f
Allow for floating point numbers in durations ( fixes #447 )
2022-04-29 14:20:14 +02:00
ElKowar
6b7fa5d55c
Implement loop widget ( #350 )
2022-04-23 12:54:48 +02:00
elkowar
776dc787e7
Add matches function to simplexpr
2022-04-19 13:49:28 +02:00
MartinJM
0f9847c518
Add several functions for simple expressions ( #407 )
...
Co-authored-by: elkowar <5300871+elkowar@users.noreply.github.com>
Co-authored-by: MartinJM <>
2022-04-19 13:29:17 +02:00
elkowar
aa54487c47
Update to latest nightly
2022-04-13 15:19:39 +02:00
viandox
b100704bc7
fixes #424 allow tabs in simplexpr ( #426 )
2022-04-13 14:54:02 +02:00
viandox
3fc24a9c72
Add more operators ( #401 )
2022-02-15 10:12:35 +01:00