Commit graph

702 commits

Author SHA1 Message Date
Clement Tsang
db07246f67
other: don't use manual map for color name mapping (#908)
* 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
2022-11-21 03:34:33 -05:00
database64128
71bc6c940e
feature: per-core process cpu usage percentage (#899) 2022-11-21 03:12:47 -05:00
ClementTsang
dd4b19866d
other: update Debian extended description 2022-11-20 03:22:22 -05:00
Clement Tsang
abff6e4a7a
bug: fix is_nan being incorrectly used to check for division by zero (#905) 2022-11-20 03:05:45 -05:00
Clement Tsang
63df220a38
other: clean up some strings (#904)
* other: clean up some strings

* formatting
2022-11-20 02:21:20 -05:00
Clement Tsang
6a0bf10760
other: some cleanup in proc widget (#903) 2022-11-20 01:13:24 -05:00
Clement Tsang
fd1badaf36
other: small linux process cleanup (#902) 2022-11-19 23:21:50 -05:00
Clement Tsang
b7ac83e926
other: shrink the timed data vector in addition to clearing (#900)
Should prevent the times series vector from possibly growing indefinitely.
2022-11-19 15:09:53 -05:00
Clement Tsang
f52b66a844
other: deduplicate sorts, always sort proc by PID first (#898)
* other: deduplicate sorts, sort proc by PID by default

* add proc test

* remove sort in Windows

* fix tree

* fix test

* Remove mut

* Add comment on sorting processes
2022-11-17 12:10:36 -05:00
Clement Tsang
a07fa305fb
bug: redirect stderr on FreeBSD to avoid drawing on UI (#897) 2022-11-17 03:18:05 -05:00
Clement Tsang
b2c301b1fe
deps: update sysctl to 0.5.2, procfs to 0.14.1 (#894) 2022-11-13 17:43:55 -05:00
Clement Tsang
17ca30c023
other: remove flume (#893)
In hindsight, pulling in flume is probably overkill and doesn't really
help much.
2022-11-13 01:59:45 -05:00
Clement Tsang
50768907ec
feature: add custom retention periods for data (#892)
* feature: add custom retention periods for data

* docs: update changelog

* docs: update docs
2022-11-13 01:51:10 -05:00
Clement Tsang
9dc6d0c0d5
other: remove the mouse throttler except for scroll events (#886)
The throttler is only really needed for scrolls (e.g. free scroll wheels
in Logitech mice), I don't really see it being needed in any other
contexts. Moves/drag is another one I guess but we outright ignore those
events right now.
2022-11-11 02:27:18 -05:00
Clement Tsang
99fc5fc2c8
refactor: run cargo +nightly fmt with group_imports (#885)
* refactor: add some disabled unstable fmt options

* run cargo +nightly fmt with group_imports

* separate out the cfg-specific imports for clarity
2022-11-10 01:22:19 -05:00
Clement Tsang
f5ec9191f2
other: try using flume for channel (#884) 2022-11-10 01:08:06 -05:00
Clement Tsang
938c4ccd52
feature: search paste support (#881)
* feature: add pasting to search

Supports pasting events to the search bar (e.g. shift-insert, ctrl-shift-v).

* update docs

* clippy

* comment

* Update process.md

* remove keyboard event throttle

* fix issues with cjk/flag characters
2022-11-10 00:40:04 -05:00
Clement Tsang
8101e6fa56
deps: Update tui to 0.19.0 and crossterm to 0.25.0 (#878)
* deps: update tui to 0.19 and crossterm to 0.25

* fix error

* handle breaking changes
2022-11-08 00:56:39 -05:00
Clement Tsang
7ae8e66a3a
ci: add cache clearing to PR merges (#874)
* ci: add cache clearing to PR merges

* some renaming

* small change to force cache

* add manual run option
2022-11-06 03:44:02 -05:00
ClementTsang
7f7d0cebf4
bug: fix spacing for disk table widget headers when sorting 2022-11-06 02:26:16 -05:00
Clement Tsang
36837ae8ac
feature: basic sortable disk (#870) 2022-11-06 01:34:32 -05:00
Clement Tsang
4d9f5093b2
feature: basic sortable temp (#868)
* feature: basic sortable temp

* add shortcuts

* fix missing shortcut names in header

* update changelog

* update docs
2022-11-05 19:32:14 -04:00
Clement Tsang
e6e1e9d688
deps: update nvml to 0.8.0 (#869) 2022-11-05 02:12:31 -04:00
Clement Tsang
76c3bc4254
refactor: clippy and small cleanup/comments (#865)
* refactor: small cleanup and comments in some code

* clippy

* more clippy

* fixes for macos/freebsd
2022-11-04 04:17:22 -04:00
Diana
b8c73d3a0b
More human friendly temperature sensor naming (#807)
* More human friendly temperature sensor names

This makes the names more human friendly, and possible to distinguish from each other

* Keep hwmon sensor name for GPUs

* Keep hwmon sensor name for non-GPUs too

* fix device path
2022-11-02 00:43:58 -04:00
Clement Tsang
064d740c6d
refactor: move data passing for table to another step (#863)
* refactor: remove redundant scroll direction enum

This was made redundant from the table refactor.

* add some todos/docs

* refactor: temp hack to pass in data on process
2022-11-02 00:36:55 -04:00
lroobrou
ee2f6c7a72
feature: Implement PgUp and PgDown in the help dialog. (#841) 2022-10-20 00:34:00 -04:00
Clement Tsang
b879c36588
refactor: move some state code around (#839) 2022-10-16 03:10:30 -04:00
Justin Martin
dd003101a0
enable gpu mem cli and update docs for arc/gpu mem (#836) 2022-10-16 00:08:38 -04:00
ClementTsang
d99f41f17e Revert "refactor: remove heim network usage (#833)"
This reverts commit 913562e7e6.
2022-10-15 18:42:55 -04:00
Clement Tsang
913562e7e6
refactor: remove heim network usage (#833) 2022-10-15 18:24:35 -04:00
Clement Tsang
a949740c94
other: make gpu memory collection configurable (#835)
Follow-up to #794, this makes GPU memory collection toggleable.
2022-10-15 16:50:21 -04:00
Justin Martin
bd35bbdc9c
feature: add gpu ram collector for nvidia feature flag (#794)
* add gpu ram collector for nvidia feature flag

* add row for TX in basic layout

* size gpu point_vec

* use vec for mem basic widget drawing

* remove to_owned

* code review: change mem tuple to struct with cfg fields, rename mem_basic ratio and use vec macro for layout

* build on freebsd
2022-10-15 15:08:48 -04:00
Clement Tsang
41970d9c64
other: add quick test for building clap app (#834) 2022-10-15 07:27:56 -04:00
Clement Tsang
8b72a33f40
refactor: move point definition to tui_rs widget (#832) 2022-10-13 15:40:19 -04:00
Clement Tsang
b6a75db1b4
refactor: switch to pipe gauge implementation for basic cpu + mem (#829)
* refactor: switch to pipe gauge implementation for basic cpu + mem

* fix incorrect new basic cpu chunking scheme, revert to old one
2022-10-13 10:17:26 -04:00
Clement Tsang
436dadb683
refactor: switch to associated type for SortsRow (#828) 2022-10-12 19:02:54 -04:00
Clement Tsang
2a740f48f7
refactor: tables V2 (#749)
* refactor: move to new data table implementation

* more work towards refactor

* move disk and temp over, fix longstanding bug with disk and temp if removing the last value and selected

* work towards porting over CPU

work towards porting over CPU

fix typo

partially port over cpu, fix some potentially inefficient concat_string calls

more work towards cpu widget migration

some refactoring

* sortable data

sortable data

more refactoring

some sort refactoring

more refactoringgggg

column refactoring

renaming and reorganizing

more refactoring regarding column logic

add sort arrows again

* move over sort menu

* port over process

port over process

precommit

temp

temp two, remember to squash

work

fix broken ltr calculation and CPU hiding

add back row styling

temp

fix a bunch of issues, get proc working

more fixes around click

fix frozen issues

* fix dd process killing

* revert some of the persistent config changes from #257

* fix colouring for trees

* fix missing entries in tree

* keep columns if there is no data

* add and remove tests

* Fix ellipsis
2022-10-12 16:25:38 -04:00
Clement Tsang
1e5f0ea2d9
bug: add bindings to grab ppid in some cases on macos (#825) 2022-10-11 19:49:39 -04:00
Clement Tsang
a965e53c6c
fix wrong unit being used for memory in sysinfo data (#824)
* fix wrong unit being used for memory in sysinfo data

* update sysinfo to 0.26.4 for unsupported reasons w/ ntapi
2022-10-07 19:15:11 -04:00
Clement Tsang
7fec637360
bug: fix missing temp path locations to check on Linux (#816)
* bug: fix missing temp path locations to check on Linux

* remember to divide by a thousand in thermal_zone
2022-09-23 00:48:58 -04:00
Clement Tsang
e80e07a716
refactor: minor cleanup of linux disk code (#813)
Since we no longer use heim for Linux disk checking, we can remove the
async reliance and update some file names/comments to be more
appropriate to the current state of the code. We also do some small
cleanup.
2022-09-18 05:13:27 -04:00
Clement Tsang
cc048de3b0
refactor: replace heim temp conversion code (#811) 2022-09-17 23:43:40 -04:00
Diana
c3e4a95d04
Replace heim with sysfs and dont wake devices (#805)
* Replace heim with sysfs and dont wake devices

This commit replaces heim sensor reading with manual sysfs sensor reading, and skips reading sensors for any device that is in ACPI D3cold

This has the notable downside of still keeping a device awake, which I hope to solve in a later commit

* Update docs

They were referring to files i ultimately decided against using in this implementation, and so were no longer relevant to document.

* has_temp check should be before reading hwmon_name

* should_read_temp doesn't have to be mutable

* Fix sensor for zenpower kernel module
2022-09-16 05:06:17 -04:00
Clement Tsang
c6c7fb3a30
deps: update sysinfo to 0.26.2 (#806)
* deps: update sysinfo to 0.26.2

This dependency update has some nice things in store for us:
- MacOS M1 temperature support
- Bevy of bug fixes

* update documentation

* some fixes
2022-09-16 04:42:24 -04:00
Clement Tsang
46a2a3a52b
other: Clarify help menu (#800)
* other: clarify that numbers are for help menu

* bug: fix incorrect overscroll check, should be min
2022-09-03 04:04:03 -04:00
Justin Martin
6e0bc96093
feature: Add zfs feature flag for arc memory (#784)
* freebsd clippy

* add arc support

* Code Review: moved runtime cfg checks to compile time and formatting

* remove compile platform checks

* add zfs feature flag to get_arc_data
2022-08-22 02:47:22 -04:00
ClementTsang
658b8c720f
refactor: minor tweak to update_position code 2022-08-15 00:50:27 -04:00
ViridiCanis
f5e2b7242a
feature: clamp scrolling (#775)
* clamp scrolling when trying to go beyond the top or bottom

* add more 'do nothing' cases to `update_position`

* adjust tests to clamping scrolling

* fixup! add more 'do nothing' cases to `update_position`

* fixup! clamp scrolling when trying to go beyond the top or bottom

* fixup! fixup! clamp scrolling when trying to go beyond the top or bottom
2022-08-15 00:45:27 -04:00
Clement Tsang
3016a3d6a2
refactor: change max_scroll_index usage to better reflect name (#783)
Tweaks `max_scroll_index` usage in the help menu to better reflect its name of being a max index, not a max index bound.

For example, before, the index could not be equal to or more than `max_scroll_index`, but the name would have implied that it should be less than or equal to it.
2022-08-14 18:21:48 -04:00