Updates some outdated docs on filtering, and adds some tests as well. In particular, this also adds a cfg_attr on tests to try and catch unknown fields; we'll be more lenient in prod builds though and allow them.
* refactor: flatten process config field
* other: clean up some doc formatting using indoc and breaklines
* fix broken test
* remove default as that breaks things for now
* add test
* more tests
* refactor: simplify some config -> constraints code
* iteratively progress...
* update bcr; this might need testing since I removed some old proc code
* widget side
* fix battery
* fix widget tests with bandaid for now
The issue was that the calculations assume a certain ratio for CPU
legends.
* add some tests
* bump up
* fix proc drawing issues
So with the proc widget in certain places, there would be a panic during
constraint determination.
Looks like back when I wrote this I made some gross assumptions about
certain things. In particular, the problem here was that the search
added an additional "one" height, so that needs to be accounted for
after we removed the "doubling" code.
* tests
* fix tests
* reorganize tests
* clippy
* fix cross tests not working
* fix builds for android
* refactor: group together some canvas files
* rename file
* more shuffling around
* fmt
* more shuffling
Going to flatten widgets in another PR.
* some docs
* naming
* fmt
* Add gpu util, power and procs.
Consolidated gpu calls into `data_harvester`.
Changed config flag from `enable_gpu_memory` to `enable_gpu`.
Added GPU utilization to the cpu widget.
Added GPU process memory usage and utilization percentage to the proc widget.
Added key binds for gpu process toggling.
Added GPU power usage to the battery widget.
Added bounds check to battery widget header.
Show battery widget header when `gpu_enable`.
Added feature flag `legacy-functions` to `nvml-wrapper`.
updated config file(s).
updated help text.
updated docs.
* Code Review:
Remove GPU util from cpu widget
Remove GPU power from battery widget
Use reference for gpu widgets_to_harvest
Extract match arm to function for feature gate
* Code Review: add gmem% toggle
* Do not poll gpu temp when filtered
* Code Review Two Changes:
adjust doc wordings
remove extra references
remove extra widget harvest checks
init proc gpu values
use convert_temp_unit for gpu temp
* deps: use clap 4.4.0 to remove is-terminal
* fmt
* appease clippy
* fmt again
* Revert "deps: use clap 4.4.0 to remove is-terminal"
This reverts commit 78aa6ec848.
Pulls in the tui-rs grid logic so I can implement custom braille painting logic. We basically "flatten" the layering logic into a single layer by replacing resetting cells if the colour is different. This avoids the multiple allocations if we used multiple layers as intended with tui-rs.
This gives us chart results similar to the current stable version, but with a flamegraph similar to the current master branch.
* other: don't use manual map for color name mapping
I actually don't know why I was doing it like that before.
This commit removes the phf crate, as it's not needed anymore.
* update test
Adds mouse support to the application, to move between widgets and click on elements.
List of things to added:
- Click to move between widgets
- Click to move between widgets in basic mode
- Click on widget entries
- Ability to disable mouse if you don't like it, I guess
This feature allows any column to be sortable.
This also adds:
- Inverting sort for current column with `I`
- Invoking a sort widget with `s` or `F6`. Close with same key or esc.
And:
- A bugfix in regards the basic menu and battery widget
- A lot of refactoring
- Removal of the old slash-space-to-hide behaviour of CPU widget
- Scrolling onto a specific entry will only show that entry
- Showing average is now default