Commit graph

758 commits

Author SHA1 Message Date
Clement Tsang
358db119bb
refactor: clean up some data collection refresh code, refresh sysinfo lists on loop (#1076)
* refactor: clean up some data collection refresh/init code

* move out battery

* missing setting memory value for proc

* stop segfault on macos

* unit

* oopsie
2023-03-25 02:31:11 -04:00
Clement Tsang
ac0bf7ca96
deps: switch back to crossterm 0.26.1 with fix to double keypress (#1068) 2023-03-15 01:50:52 -04:00
Clement Tsang
c2d66af72f
clippy: appease clippy as of Rust 1.68.0 (#1055)
* clippy: fix derivable_impls clippy warning

This was done using `cargo clippy --fix`

* cargo fmt after autofix
2023-03-11 01:20:46 -05:00
Clement Tsang
82c0c3b0e5
refactor: use internal committed memory calculation for Windows (#1051)
* refactor: use internal committed memory calculation for Windows

* comments
2023-03-08 00:08:02 -05:00
Clement Tsang
10d7226b19
other: deny missing safety docs and add them (#1053) 2023-03-08 00:00:50 -05:00
Clement Tsang
b745684156
refactor: more data collection cleanup (#1047)
* refactor: more memory collection cleanup

* more cleanup

* clean up data_harvester, remove heim sensor flag

Separate out most individual components to separate functions. Also
remove Linux's usage of heim's sensors feature, since I wasn't using it
apparently.

* clean up GPU section

* fix cond

* fix feature flags

* more cleanup

* even more cleanup
2023-03-07 00:18:24 -05:00
Clement Tsang
8489c4bc10
refactor: Clean up memory collection code (#1045) 2023-03-05 02:31:45 -05:00
Justin Martin
3510563638
re-enable zfs feature (#1044) 2023-03-04 20:10:24 -05:00
Clement Tsang
994c11e3b3
refactor: migrate network collection to sysinfo (#1041)
* refactor: migrate network collection to sysinfo

* remove net feature from heim

* comments and changelog
2023-03-04 01:34:52 -05:00
Clement Tsang
caba611036
docs: update changelog and some comments (#1040) 2023-03-03 01:00:33 -05:00
Dmitry Valter
40288c181e
fix: is_list_ignored=false filters for network and temperature (#1037)
Use filter logic from network/sysinfo in temperature and network/heim
harvesters. Previously is_list_ignored=false filter configs would
silently accept every sensor and every interface.
2023-03-03 00:33:47 -05:00
Clement Tsang
8cc763cc1b
refactor: migrate memory collection to sysinfo for all platforms (#1036)
* cleanup

* refactor: remove heim memory code

* add missing updates, remove heim memory feature

* restrict export visibility

* some refactoring, remove smol

* gpu feature
2023-03-03 00:06:19 -05:00
Clement Tsang
c2d94900f3
deps: bump procfs to 0.15.1 (#1038) 2023-03-02 17:40:56 -05:00
Clement Tsang
f26d598410
refactor: migrate CPU from heim to sysinfo for all platforms (#1035)
* refactor: migrate CPU from heim to sysinfo for all platforms

* fix windows and macos imports

* simplify a bit of code

* cleanup
2023-03-02 00:03:54 -05:00
Clement Tsang
e8ae1a265a
other: switch to toml_edit (#1034) 2023-03-01 00:14:47 -05:00
Clement Tsang
44e52d6229
deps: bump nvml to 0.9.0 (#1032) 2023-02-27 19:37:35 -05:00
Clement Tsang
cabc594279
refactor: clean up some options code (#1029)
* remove some dead code

* use macros to help clean up clutter for binary flags

* add test

* group

* fix using gpu feature
2023-02-25 04:24:38 -05:00
Clement Tsang
78b1126fb4
other: move terminal check after the config check (#1027) 2023-02-20 00:57:09 -05:00
Clement Tsang
f1f07945f6
change: show process in tree if any ancestor or descendent matches (#1026)
* refactor: optimize kept list in tree to just store filtered values in a set

* change: show all direct children of a tree process children if the parent matches

* change: show process in tree if any ancestor or descendent matches
2023-02-20 00:15:16 -05:00
Clement Tsang
6d15f01009
other: support hw.temperature-based temps on FreeBSD (#1024)
* other: support hw.temperature-based temps for FreeBSD

* update changelog

* enable sysctl always for freebsd
2023-02-19 18:44:35 -05:00
Clement Tsang
f89b243589
feature: support 3-char hex colours (#1022) 2023-02-18 01:55:26 -05:00
Clement Tsang
edc61d428c
bug: fix selected text bg colour being wrong if only the fg colour was set (#1021)
* rename file to be more generic

* fix selected text BG colour being wrong by default

* update changelog

* add test for bug
2023-02-18 00:51:13 -05:00
Michael Bikovitsky
d956f336a9
feature: Add support for displaying process usernames on Windows (#1016) 2023-02-10 15:01:37 -05:00
spital
021a727f19
other: replace deprecated value_of and is_present in clap
* Upgrade clap to 3.2.2 to allow future fix warnings

* cargo fmt fix

* Replaced deprecated `value_of` and `is_present`, builds with no warnings, clap 3.2.2

* cargo fmt

* updated according to comments. builds fine, cargo test fine

* Match some versions

* Update Cargo.lock

* Fix typo, mb

---------

Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
2023-01-31 19:34:52 -05:00
Clement Tsang
9ad1d8f0b4
other: ignore uninlined_format_args clippy lint for now (#1004) 2023-01-27 18:13:17 -05:00
Clement Tsang
635d173f49
other: explicitly style dd text colours (#995) 2023-01-20 20:53:27 -05:00
Clement Tsang
3aa4aa1c08
bug: fix axis labels not being styled (#994)
Fixes graph axis labels not being styled.
2023-01-20 18:50:20 -05:00
Clement Tsang
4870ff365a
refactor: change name of some stuff, add some comments (#992)
* some quick refactoring first

* add todo for bug report template
2023-01-20 00:08:02 -05:00
Clement Tsang
7f7a328977
other: refresh cpu for sysinfo users if proc is used (#991) 2023-01-20 00:07:52 -05:00
Clement Tsang
22e386a38c
other: re-enable disk usage split, update help menu (#963)
* Revert "other: revert disk usage change for now (#962)"

This reverts commit d3661c2320.

* some cleanup

* update help menu

* update screenshot

* update changelog wording

* Remove redundant newlines

* Use type system to ensure help constants match in size
2023-01-19 05:40:34 -05:00
Clement Tsang
639c93b4c8
other: switch to windows-rs for process killing (#985) 2023-01-18 01:43:08 -05:00
Rareș Constantin
f8db3403af
other: Dynamic battery widget (#975)
* Added dynamic battery widget

For bottom to know that there are no batteries on the system,
I added the battery::Manager to the options.rs file because
here is the first moment bottom verifies battery configuration
by reading the config file, which may or may not contain the
battery field, but for a better UX, it doesn't matter what bottom
finds in the config file now, if it doesn't retrieve battery data,
it just ignores the battery widget all together.
If needed, it can be adjusted so that if the config file contains
the battery field, it will still show the widget.

* CFG guarding for BATTERY module

I guarded the options.rs in two places for battery module that can be missing in the feature list.

Co-authored-by: RaresCon <RaresCon>
Co-authored-by: NitrogenDev <44950964+NitrogenDev@users.noreply.github.com>
2023-01-15 12:06:42 -05:00
Clement Tsang
571ec08291
other: skip battery duration draw if unknown (#974)
* other: skip battery duration draw if unknown

* increase others

* update changelog
2023-01-15 12:06:19 -05:00
Clement Tsang
d3661c2320
other: revert disk usage change for now (#962)
This is a temp change, this commit will be reverted after 0.7.1 comes out.
2023-01-05 23:22:45 -05:00
Clement Tsang
9303c1b52f
bug: further shrink battery time-to text (#960) 2023-01-05 21:36:45 -05:00
Clement Tsang
8f9097b90c
bug: fix CPU 'all' label missing on small sizes (#953)
Fixes the "All" label being missing on small windows.
2023-01-04 01:55:46 -05:00
Clement Tsang
0093a45be9
bug: reduce battery text cutoff in small windows (#952)
Fixes an issue where small windows would cause the battery to-X time to be cut off.
2023-01-04 01:27:15 -05:00
Clement Tsang
7c53f088c3
ci: add build hash to nightly builds for version (#951)
This adds the build hash to the btm -V output for nightly builds, making it easier to troubleshoot when someone might have obtained a nightly build, and what commit it corresponds to.
2023-01-02 15:18:05 -05:00
Clement Tsang
a56e7f6cc9
feature: split usage into usage percentage and value (#950)
Denotes both usage and usage percentage. This also redoes the calculation for percentage to be based on the sum of avail + used, rather than on total, as otherwise we get potentially confusing percentages.
2023-01-01 05:08:04 -05:00
Clement Tsang
d7e9fd6be0
other: run rustfmt (#949) 2023-01-01 04:35:08 -05:00
Clement Tsang
b7bf57481f
docs: update demo to 0.7.0 (#941)
* docs: update demo to 0.7.0

* update again
2022-12-31 20:47:33 -05:00
Clement Tsang
3b5774117f
bug: fix search scrolling with wider Unicode characters. (#938)
This should help make search scrolling more reliable larger Unicode characters like CJK/flag characters.
2022-12-31 05:51:59 -05:00
Clement Tsang
efcf2bde29
other: use custom time chart grid implementation (#937)
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.
2022-12-30 03:06:48 -05:00
Clement Tsang
21a21b86c0
ci: clean all workflow caches to script (#936) 2022-12-30 00:56:27 -05:00
Clement Tsang
32da5f39bb
bug: fix dot marker setting not being considered (#934)
* bug: fixes marker settings being ignored while rendering time charts

* appease clippy
2022-12-27 06:37:47 -05:00
Clement Tsang
07fd2152f4
docs: update changelog + docs for default expansion feature (#928) 2022-12-07 04:28:43 -05:00
Chon Sou
4272dd0c2d
feature: Adding default expanded option to commandline and config (#919)
* [#822] adding default expanded option to commandline and config

* refactoring (#919)

* nullifying default expanded when in basic mode (#919)
2022-12-06 19:34:41 -05:00
Clement Tsang
1920f4b2e1
other: add a redraw event on resize (#926) 2022-12-05 04:34:19 -05:00
Clement Tsang
ac5e2ce4a2
bug: fix incorrect text width calculation (#925)
* bug: fix incorrect text calculation

* actual fix, add tests

* appease clippy

* add link to inspiration
2022-12-05 04:21:37 -05:00
Clement Tsang
d3577bd1ab
other: don't draw on non-updating events (#924) 2022-12-03 01:18:47 -05:00