* refactor: iteratively detect ASCII and build string when truncating
* more tests
* test going by usize
* Revert "test going by usize"
This reverts commit 4fe71260e7.
* 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
* Fixed uninlined args
First ran this, and fixed a few more similar issues by hand
```
cargo clippy --workspace --fix --benches --tests --bins -- -A clippy::all -W clippy::uninlined_format_args
```
Note that in a few cases, format args were passed by ref - which is actually a tiny perf hit - compiler would not be able to optimize them.
* revert change here
since it contains a non-inlineable variable I'm not a fan of using it partially here
* revert
given the other formats above/below I would prefer keeping it like this
---------
Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
* 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.
* add zfs io counters for linux and freebsd
* ci
* freebsd clippy
* code review: remove dead code for zfs feature gate of freebsd iocounters and squash if statement in zfs_io_counters
* bug: fix core dump if the terminal is closed
The cause was:
- bottom thinks it's panicking if the terminal is closed.
- The panic hook tried to print out to the terminal - but the terminal
was closed! It would unwrap and thus panic even harder.
- To solve this, we just make the panic hook calls not unwrap, since
honestly if they fail it's whatever as far as I understand it.
* update changelog
* update documentation and support either numerical times or human times for time_delta and default_time_value
* update docs
* give more human times on error
The clap matches/config struct was taken in as a reference when building
the App structure. However, we do not need to keep these around after
this, so we can instead take ownership of the match/config and drop it
after to save a bit of memory.
clap v4 apparently changed it so arguments are not sorted by default
like before - this manually sorts the arguments beforehand to achieve
the same effect.
* other: use f32 for process percentage values
This cuts down memory by a tiny bit, and we don't need a full f64 for
percentage values.
* fix for macos and windows
* feature: also check coretemp on Linux when gathering temps
* update changelog
* add comment
* add logic to check thermal zone if there are no hwmon entries
* cleanup
* handle duplicates between hwmon and thermal zone
* Revert "handle duplicates between hwmon and thermal zone"
This reverts commit 402606cc62f27ba196ef2ade6a669ae84aedf0e0.
* cleanup
* back to running thermal zone if no hwmon
* prevent failure cases
* temp logging
* name refactoring
* port dupe name logic to hwmon
* Cleanup, add fallback to sensor name
* more tests
* Fix log
* update changelog
* cleanup and more tests
* ci: add a build check for aarch64-linux-android
* appease clippy
* use 1.67.0 for Android due to NDK issue
* remove sparse since it is default now for 1.70 and causes issues with older versions anyway
* refactor: redo how we do some processes between different OSes
* cleanup
* more cleanup
* windows
* freebsd
* clean up linux more, fix broken FreeBSD import
* some more cleanup to remove some big imports