Commit graph

239 commits

Author SHA1 Message Date
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
f5ec9191f2
other: try using flume for channel (#884) 2022-11-10 01:08:06 -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
29bc0b67ba
ci: rename deployment folder to scripts (#873) 2022-11-06 03:19:52 -05:00
Clement Tsang
e6e1e9d688
deps: update nvml to 0.8.0 (#869) 2022-11-05 02:12:31 -04:00
ClementTsang
342d0da729
other: exclude more files in Cargo.toml 2022-11-05 01:00:33 -04:00
Clement Tsang
ec21306f55
deps: update sysinfo to 0.26.7 (#867) 2022-11-04 19:38:14 -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
ClementTsang
dfd21f57dc
other: bump to 0.6.9 for nightly to avoid confusion for now 2022-09-25 17:25:44 -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
a427a9d2f2
other: add zfs to deploy feature set (#808) 2022-09-14 05:50:34 -04:00
Clement Tsang
72189185b6
other: sort Cargo.toml (#802) 2022-09-07 23:51:08 -04:00
Clement Tsang
14808b3a2e
ci: completion/manpage generation script spring cleaning (#795)
* ci: spring cleaning of completions autogen

This commit changes a few things/cleans up stuff:
- Completion and manpage generation now drops the files off in
  `./target/tmp/bottom` rather than arbitrarily in the build directory.
  This was originally done because I was lazy and just needed it to work
  in CI, but it's kinda gross if you want to build the manpages in your
  own directory.
- CI was updated to handle this.
- Only run if the `BTM_GENERATE` env var is actually non-empty.

* docs: update for manpage/completion gen

* ci: auto delete autogen comp/manpage dir

* ci: fix incorrect mv for autogen

The mv was too late, should be earlier in the workflow.

* ci: specify shell in autogen delete

* docs: more updates to manpage/comp docs

* ci: unify env vars

* ci: skip autogen on build-msi
2022-08-30 18:25:16 -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
Wesley Moore
577fda96fc
Implement support for FreeBSD (#766)
* WIP FreeBSD support

* Implement get_cpu_data_list for FreeBSD

* Implement disks for FreeBSD

It doesn't work though as sysinfo doesn't make the device name available.

* Use libxo to read process cpu info on FreeBSD

* Populate get_io_usage with libxo too

Actual I/O stats still aren't populated though as there's not an
easy source for them.

* Share more processes code between macos and freebsd

* Extract function for deserializing libxo output on FreeBSD

* Implement filtering of disks in FreeBSD

* Clean up memory data collection

* Update module docs
2022-07-23 20:44:29 -04:00
Clement Tsang
2a183c642b
other: exclude some files in Cargo.toml (#759)
Excludes unnecessary files from being included in `Cargo.toml`. This mostly consists of files like mkdocs and asset files for the README.
2022-06-28 20:39:43 -04:00
Clement Tsang
c6f5d5488a
docs: re-enable lib docs for development purposes (#750)
Enables lib docs, primarily intended for dev use. Also change some existing documentation based on warnings (mainly broken/bare links).
2022-06-14 18:31:32 -04:00
Clement Tsang
96d5b9b87d
deployment: add aarch64/armv7 gnu .deb generation (#739)
Adds .deb generation for aarch64 and armv7 gnu targets in the nightly and deploy workflows.
2022-05-28 16:14:25 -04:00
ClementTsang
ed17264832 refactor: more work towards unifying process code
A bunch of work towards also refactoring how the process widget
gathers and converts data.
2022-05-15 21:02:33 -04:00
ClementTsang
7ee6f6a737 refactor: begin migration of process widget 2022-05-15 21:02:28 -04:00
Clement Tsang
4ceaf8d008
deps: migrate to starship-battery (#724)
Migrates the `battery` dependency to the more actively maintained
`starship-battery` fork, found at https://github.com/starship/rust-battery.
See https://github.com/svartalf/rust-battery/pull/92 for more information.
2022-05-06 17:16:57 -04:00
ClementTsang
715af44efc ci: create deploy feature; test in CI
This encompasses features that we want on deployment.
2022-05-01 17:30:20 -04:00
ClementTsang
2401e583fb refactor: consolidate time graph components
This consolidates all the time graph drawing to one main location, as well
as some small improvements. This is helpful in that I don't have to
reimplement the same thing across three locations if I have to make one
change that in theory should affect them all. In particular, the CPU
graph, memory graph, and network graph are all now using the same,
generic implementation for drawing, which we call (for now) a component.

Note this only affects drawing - it accepts some parameters affecting style
and labels, as well as data points, and draw similarly to how it used to
before. Widget-specific actions, or things affecting widget state,
should all be handled by the widget-specific code instead. For example,
our current implementation of x-axis autohide is still controlled by the
widget, not the component, even if some of the code is shared. Components
are, again, only responsible for drawing (at least for now). For that
matter, the graph component does not have mutable access to any form of
state outside of tui-rs' `Frame`. Note this *might* change in the
future, where we might give the component state.

Note that while functionally, the graph behaviour for now is basically
the same, a few changes were made internally other than the move to
components. The big change is that rather than using tui-rs' `Chart`
for the underlying drawing, we now use a tweaked custom `TimeChart`
tui-rs widget, which also handles all interpolation steps and some extra
customization. Personally, I don't like having to deviate from the
library's implementation, but this gives us more flexibility and allows
greater control. For example, this allows me to move away from the old
hacks required to do interpolation (where I had to mutate the existing
list to avoid having to reallocate an extra vector just to insert one
extra interpolated point). I can also finally allow customizable
legends (which will be added in the future).
2022-04-28 23:36:53 -04:00
Clement Tsang
476a4ad910
deps: update dependencies (#713)
Updates various dependencies in both Cargo.toml and Cargo.lock.
2022-04-27 19:23:34 -04:00
Clement Tsang
f2b8b4e842
other: add manpage file to cargo deb config, move back to build script (#693)
Adds the asset for the manpage to cargo deb config. Also moves the generated manpage file to a .1.gz file. Also, moves back to a build script since that was causing some issues for the automatic Cargo.toml fields detection for manpage and completion generation.

To prevent compilation from happening every time, and only in CI, we use an env var to avoid generation steps.
2022-03-11 06:45:05 -05:00
Clement Tsang
8087f0b636
ci: add manpage generation, migrate build script (#692)
Adds manpage generation to the build process, as well as following the xtask concept of adding additional build scripts that only need to run on deploy/nightly as opposed to `build.rs`. Note this doesn't follow the recommended method of using workplaces because I don't really want to shift the entire repo structure just for this.

More on xtask: https://github.com/matklad/cargo-xtask
2022-03-10 05:15:48 -05:00
Clement Tsang
92ec359936
deps: update regex to 1.5.5 due to CVE (#691)
Prompted by the following CVE: https://blog.rust-lang.org/2022/03/08/cve-2022-24713.html

Addresses it by following the recommended fix of updating to 1.5.5.
2022-03-08 15:16:56 -05:00
Clement Tsang
01f6bddab6
deps: update clap to 3.x (#690)
Updates bottom to use clap 3.x, along with some small refactoring changes.
2022-03-07 22:53:02 -05:00
Clement Tsang
2eb865247e
deps: update dirs to 4.x (#682)
Updates the dirs dependency to 4.0.0. This is a breaking change but should not affect bottom.
2022-02-25 05:21:46 -05:00
Clement Tsang
5f042aef94
deps: update procfs and testing deps (#681) 2022-02-25 05:02:15 -05:00
Clement Tsang
c4c9130b4a
ci: enable strip on release builds with Cargo.toml (#679)
Removes the manual strip used in favour of the now native functionality in Cargo.
2022-02-25 02:18:22 -05:00
Clement Tsang
c2bfcec40e
deps: update sysinfo to 0.23.4 (#678) 2022-02-24 23:12:37 -05:00
shurizzle
c0feff3c01 Add support for nvidia GPUs 2022-02-13 00:07:44 +01:00
Clement Tsang
8587af6936
uptick: 0.6.8 (#670)
Uptick to 0.6.8.
2022-02-01 21:01:32 -05:00
Clement Tsang
d7dc710ddb
uptick: 0.6.7 (#667)
Uptick to 0.6.7, with appropriate updates to the README and changelog.
2022-01-31 16:40:50 -05:00
Clement Tsang
6c989785fb
bug: fix issues caused by having a width that is too small (#665)
Due to a missing check, you could resize the window to a width that was too small, and it would trigger an endless while-loop for any table while trying to redistribute remaining space. This has been rectified with an explicit check, as well as a smarter method of redistributing remaining space borrowed from the rewrite.

This also adds explicit width checks for widgets that have borders; if the width is <2, before, it would panic.

Note that the rewrite I have kinda fixes all these issues already, so I don't want to invest too hard into this, but this should be fine as a patch for now.

Also note that minimal heights don't seem to be causing any issues, it just seems to be minimal widths.
2022-01-27 19:16:27 -05:00
Clement Tsang
fbd95126b0
Merge pull request #658 from GuillaumeGomez/update-sysinfo
Update sysinfo version
2022-01-20 11:20:55 -08:00
Guillaume Gomez
e195b056b0 Update sysinfo version 2022-01-20 13:00:15 +01:00
Clement Tsang
1237a35663
docs: update app descriptions (#659)
Update app descriptions across the board to be more consistent.
2022-01-19 23:49:11 -05:00
Clement Tsang
c92cfc644d
bug/ci: fix debian file generation breaking completions (#645)
Fixes completion file generation being broken while the .deb file is made, due to using an incorrect path.
2021-12-27 16:49:15 -05:00
Clement Tsang
cf08f935dc
deps: update time to 0.3.5 (#643)
Updates time to 0.3.5: https://github.com/time-rs/time/blob/main/CHANGELOG.md#035-2021-11-12
2021-12-23 17:31:41 -05:00
Clement Tsang
5526fe738d
uptick: 0.6.6 (#638) 2021-12-22 14:18:50 -05:00
Clement Tsang
065ffdbc78
uptick: 0.6.5 (#628) 2021-12-19 13:04:10 -05:00
Clement Tsang
ea0c7b49b7
deps: bump deps, remove chrono (#600)
Bumps up some dependencies and removes chrono, switching to the time crate instead.

One of side-effects of this change is that local time seems to not work (?)... so all logs are now in UTC. Oh well, this doesn't affect general user behaviour so I'm fine with it.
2021-10-17 21:33:07 -04:00
Clement Tsang
e20057b97c
ci: move winget/msi and deb gen to separate steps (#585)
Moves debian and winget/msi generation to a separate job, so it can run in parallel to the other jobs.
2021-09-23 19:13:13 -04:00
Clement Tsang
c7626057c9
uptick: 0.6.4 (#576) 2021-09-12 14:02:11 -04:00