Commit graph

57 commits

Author SHA1 Message Date
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
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
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
Niclas
b2f60a1f43
Remove some unnecessary allocations (#480) 2022-07-03 00:00:49 +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
Pedro Burgos
ee07598a03
Fix anyhow's glob imports (#391) 2022-02-03 20:37:00 +01:00
ElKowar
6fec568176
State rework (#335) 2021-11-15 20:06:44 +01:00
Animesh Sahu
80b89dd391
Implement trigger for defpoll variable (#273)
* Implement trigger for defpoll variable

* Rename functions and configuration properties, edit docs to show sample usage, improve nearby fields in docs.
2021-09-11 18:01:41 +02:00
legendofmiracles
634724bf29
Makes code more rusty/idiomatic (#264)
* makes eww code more idiomatic

* makes simplexpr more idiomatic

* makes yuck more idiomatic
2021-09-11 12:43:44 +02:00
Florian Proksch
07a9b97e5b
fix: correct gt and lt parsing 2021-09-05 17:51:30 +02:00
elkowar
3f65733d12
feat(simplexpr): allow json literals in simplexprs 2021-08-25 14:52:14 +02:00
elkowar
f83ad913be
Clean up example bar 2021-08-18 16:21:04 +02:00
elkowar
7abf38cbfc
Include spans in var_refs of simplexpr 2021-08-17 11:53:45 +02:00
elkowar
c20b172662
Fix representation of string-interpolations by adding a dedicated concat AST variant 2021-08-17 11:10:48 +02:00
elkowar
ec8b12d206
Allow digits in identifiers in simplexpr 2021-08-10 14:30:33 +02:00
elkowar
eb3c2646a0
Add did you mean question to wrong variables 2021-08-02 15:54:38 +02:00
elkowar
afd0a47bf2
Remove redundant information 2021-07-31 20:01:42 +02:00
elkowar
ebf9c7e7ef
Unify error messages and remove unused code 2021-07-31 16:01:20 +02:00
elkowar
24c9fee204
Fully implement string interpolation with ${} syntax 2021-07-31 13:44:23 +02:00
elkowar
5cde0228fb
Allow for string-interpolation in simplexpr 2021-07-30 16:33:28 +02:00
elkowar
41093cf0af
Replace lazy_static with once_cell 2021-07-29 15:30:00 +02:00
elkowar
8fea52bda9
Allow for comments in simplexpr 2021-07-28 17:16:01 +02:00
elkowar
99fd51dc12
Improve error messages for unknown variables in evalerror 2021-07-27 17:24:40 +02:00
elkowar
01c7ba6e2a
Add alternative string syntax with single quotes and backticks 2021-07-27 00:11:16 +02:00
elkowar
e698fd315e
Fix multi-point unicode glyphs in yuck lexer 2021-07-26 23:10:01 +02:00
elkowar
de8c79bc7d
Add magic variables again 2021-07-26 22:43:33 +02:00
elkowar
680ab9d633
Add Spanned trait and use it 2021-07-26 20:23:06 +02:00
elkowar
16ebf7683a
Get rid of Option<Span> by replacing it with dummy spans 2021-07-26 19:39:44 +02:00
elkowar
bb741f343d
Include file_id in LexicalError 2021-07-26 19:22:05 +02:00
elkowar
ee933fccf5
Readd some tests and as_vec dynval transformation 2021-07-26 18:48:15 +02:00