* 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>
* Implement trigger for defpoll variable
* Rename functions and configuration properties, edit docs to show sample usage, improve nearby fields in docs.
factor out some x specific logic cleanly
factor out more code into backend specific sections
Minor refactor to enum parsing
fix build on wayland
make default of wm-ignore depend on type and reserve, and add documentation
* add windowtype attribute to window tag. set _NET_WM_WINDOW_TYPE property for x11
* up
* remove strum and strum_macros dependencies
* Update configuration.md
* Update window_definition.rs
* Update window_definition.rs
should work now
Co-authored-by: Midnight Exigent <6959267-midnightexigent@users.noreply.gitlab.com>
* basic idea
* generates docs
* hardcoded the gen script
* trying to hide magic vars
* eww-state is good now
* structure for cpu var is now there
* renamed cpu to diskstat, bc lib supports it after all
* not going to implement disk IO. go back to this commit, to see a rough idea
* removed it
* formatting
* stopped data race
* Update src/config/system_stats/ram.rs
Co-authored-by: ElKowar <5300871+elkowar@users.noreply.github.com>
* Update src/config/system_stats/disk.rs
Co-authored-by: ElKowar <5300871+elkowar@users.noreply.github.com>
* Explains macos better
* Update battery.rs
* Function for each OS when getting battery, a bit cleaner
* reworked battery a little
* all in one big file
* facepalm
* cleaner gen script and one huge file for the system stat stuff
* merge conflicts
* github interface for resolving merge conflicts sucks, this fixes it
* Apply suggestions from code review
Co-authored-by: ElKowar <5300871+elkowar@users.noreply.github.com>
* Update src/config/inbuilt.rs
Co-authored-by: ElKowar <5300871+elkowar@users.noreply.github.com>
* Apply suggestions from code review
Co-authored-by: ElKowar <5300871+elkowar@users.noreply.github.com>
* code suggestions
* component temperature is a json struct
* newlines in magic vars descriptions
* disks is now json, numbers are not wrapped in strings, and more idiomatic code
* Update gen-docs.ts
Co-authored-by: mlvzk <mlvzk@protonmail.com>
* removes a unneeded heading
* more doc updates and EWW_CPU_USAGE is now json
* calculates battery total avg and it's a json struct
Co-authored-by: ElKowar <5300871+elkowar@users.noreply.github.com>
Co-authored-by: mlvzk <mlvzk@protonmail.com>