Commit Graph

984 Commits

Author SHA1 Message Date
ClementTsang 79615aed2f revert the smaller values thing 2025-04-14 02:18:59 -04:00
ClementTsang 55b5eebc2a Merge branch 'main' of https://github.com/ClementTsang/bottom into more_stable_graphs 2025-04-14 02:16:25 -04:00
Clement Tsang 146b8596cf refactor: some refactoring while stable graphs (#1715)
* update grids

* asdfadf

* asdf

* b

* update loggers

* some formatting and refactoring

* docs

* some comments

* more docs
2025-04-14 06:13:20 +00:00
ClementTsang 8defa968e6 Slightly improve stability by using smaller values 2025-04-14 01:10:52 -04:00
ClementTsang a73e21d617 try alternate line algorithm 2025-04-14 01:06:47 -04:00
ClementTsang 6510b36328 some formatting and refactoring 2025-04-14 00:41:35 -04:00
ClementTsang a614cbbea9 update loggers 2025-04-13 04:30:12 -04:00
ClementTsang 55b924a946 b 2025-04-11 23:43:16 -04:00
ClementTsang 5e82688dc7 asdf 2025-04-11 02:58:32 -04:00
ClementTsang 89f6b58ab8 asdfadf 2025-04-10 19:57:13 -04:00
ClementTsang 33692afb14 update grids 2025-04-10 19:57:13 -04:00
Clement Tsang c68b190388 bug: fix incorrect disable mouse click condition on cleanup (#1713)
Looks like a bug slipped through in #1706 so when stopping the program click events would continue. I could just fix the condition but I think it's fine to just unconditionally disable click events on cleanup.
2025-04-10 23:53:55 +00:00
Clement Tsang 69a4b59573 other: fix clippy warnings (#1712) 2025-04-10 23:20:11 +00:00
Ben Brown 3330c1f1e7 fix: Disable mouse capture when disable_click is set (#1706) 2025-03-30 12:28:21 -04:00
Clement Tsang b1f969880e other: remove comment about skipping timeseries in basic (#1700)
Turns out I already did this. Nice.
2025-03-28 03:56:24 +00:00
Ada Ahmed 37a546ab0f other: update amdgpu marketing names and trim excess keywords (#1692) 2025-03-21 20:04:31 -04:00
Clement Tsang 3113c24e37 other: allow for hyphen versions of arguments to be used (#1686)
This PR allows both args like `--autohide-time` _and_ `--autohide_time` to work.
2025-03-06 04:59:50 +00:00
Matthew Toohey f8cfd962f3 fix: prevent graph lines from showing up behind legend (#1683)
* fix: prevent graph lines from showing up behind legend

* use cell_mut instead
2025-02-28 09:00:08 +00:00
Clement Tsang d2177ed022 refactor: don't duplicate AMD GPU temperature retrieval (#1682)
* some file/struct renaming

* refactor: don't get AMD gpu temperatures twice
2025-02-23 06:21:12 +00:00
Clement Tsang f7d070f944 refactor: somewhat migrate to Rust 2024 edition (#1681)
* refactor: try bumping to rust 2024 edition

* now run nightly fmt

* fix some macos changes

* only apply a few of these settings
2025-02-22 02:12:08 +00:00
Clement Tsang 9999a4824a docs: update documentation around how grouping processes and tree mode are incompatible (#1679)
* update default config

* use info, not note
2025-02-21 11:04:08 +00:00
Clement Tsang d63ca07cae refactor: clean up some file structure, process code, and terminal cleanup (#1676)
* move widgets

* reduce allocations needed

* ah

* more possible optimizations around reducing allocs

* some fixes

* I forgot to clear the buffer oops

* missing

* only run terminal cleanup after certain point
2025-02-15 02:32:09 -05:00
Clement Tsang 702775f58d refactor: use nonzero in mem data (#1673)
* refactor: use nonzerou64 for mem data

* clippy

* comment
2025-02-12 05:58:15 +00:00
Justin Martin 22fbd7d630 other: return None when mem_total is zero (#1667) 2025-02-07 19:02:07 -05:00
Clement Tsang ec1a4cb7e5 refactor: move conversion code to utils (#1671) 2025-02-07 01:54:03 +00:00
Clement Tsang a82d8578cf fix/other: fix bug with network y-axis labels and cache height calculations (#1670)
* test

* implement network height calc caching
2025-02-06 20:29:06 -05:00
Clement Tsang 8ac03b5962 other: don't collect time series data in basic mode (#1669)
Ideally I also introduce a way to ensure basic mode widgets straight up
cannot accidentally access ts data, but this works for now.
2025-02-06 19:21:18 -05:00
Clement Tsang d6ad688ab8 refactor: use cow for disk widget io read/write strings (#1664) 2025-02-03 06:48:12 +00:00
Clement Tsang 837e23560f refactor: points rework (v1) (#1663)
* refactor: add new method of storing timeseries data

* mostly finish adding data

* tmp

* migrate over to separate lib

* prepare to migrate over to new timeseries storage

* prepare to migrate frozen state

* migrate frozen state

* name

* migrate data collection

* migrate network

* fix some stuff

* fix a panic from bad pruning

* Fix pruning issues

* migrate RAM

* migrate swap

* migrate cache label

* refactor out to function

* migrate ram points

* migrate swap points

* migrate cache points

* migrate arc

* migrate gpu, remove a bunch of state code around force update

* rename cache, also some comments

* some temp cleanup

* migrate disk

* comments to remind me above fixmes, fix bug around time graph spans

* migrate load avg

* port temps

* style

* fix bug wiwth left edge gap

* partial migration of cpu, reorganize data file structure

* migrate cpu

* some cleanup

* fix bug with cpu widget + clippy

* start some small optimization work

* fix some things for some platforms

* refactor: rename data_collection to collection

* refactor: only process temp type in data eat step

* flatten components folder a bit

* partially migrate to new graph system and fix cpu bug

* driveby migration of process list to reduce allocs + more migration of points drawing

* revert the collection change

Forgot that I cut a new `Data` on each collection so that change was
useless.

* port over network stuff...

* fully migrate network, and fix some log bugs while we're at it

This is something I never noticed, but the log of 0 is inf - so there
were gaps in the lines when using log scaling!

* fix cpu colour in all mode

* clean up some disk table stuff
2025-02-03 06:34:58 +00:00
Clement Tsang 1edd8d81ed deps: bump Cargo.toml and Cargo.lock dependencies (#1659)
* deps: bump dependencies

* update lockfile dependencies
2025-01-18 03:23:06 +00:00
Clement Tsang c970037546 bug: handle terminal cleanup if main.rs panics from an Err (#1660)
* bug: handle terminal cleanup if main.rs panics from an Err

* add comment

* changelog
2025-01-18 02:43:58 +00:00
Clement Tsang 873434b4b7 other: fix non-applicable warning about regex creation in loop (#1661) 2025-01-18 02:30:00 +00:00
Andrey Alekseenko 915c25a50e other: handle systems with only libnvidia-ml.so.1 (#1655)
Recently, NVIDIA CUDA repository packages started shipping only
`libnvidia-ml.so.1` file, without `libnvidia-ml.so`. The upstream
`nvml-wrapper` package has a fix proposed
(https://github.com/Cldfire/nvml-wrapper/pull/63), yet the package is
in search of a maintainer at the moment.

To allow `bottom` to correctly detect NVIDIA GPUs on Ubuntu with
official NVIDIA packages, add a wrapper around `Nvml::init` to be more
persistent in its search for the NVML library.
2025-01-06 23:36:20 -05:00
Clement Tsang dbda1ee56f refactor: more data conversion cleanup (#1653)
* clean up some battery stuff

* dedupe battery from data conversion

* idk why we had a Value type alias

* clean up dupe load avg, and remove memory use percent from memharvest

* hmm

* nvm
2024-12-24 15:54:41 -05:00
Clement Tsang cd6c60c054 refactor: remove battery conversion step (#1652)
* refactor: remove battery conversion step

* also fix a bug with margins in battery

* fixes
2024-12-22 22:54:19 -05:00
Clement Tsang 3ca753f4b9 deps: bump root deps as of 2024-12-20 (#1648)
* deps: bump root deps as of 2024-12-20

* remove deprecated code
2024-12-20 03:17:27 -05:00
Ada Ahmed 479276bd53 feature: Support AMDGPU Data Collection (#1641)
* gpu: support amdgpu tracking

Co-authored-by: lvxnull2 <184518908+lvxnull2@users.noreply.github.com>

* gpu: dependency-free amdgpu parsing

gpu: fix clippy issues

Co-authored-by: lvxnull2 <184518908+lvxnull2@users.noreply.github.com>

* gpu: change memory usage percentage to be scaled to total memory instead of current memory usage

gpu: requested syntax changes

Co-authored-by: lvxnull2 <184518908+lvxnull2@users.noreply.github.com>

---------

Co-authored-by: lvxnull2 <184518908+lvxnull2@users.noreply.github.com>
2024-12-20 02:48:32 -05:00
Clement Tsang 0d182e4b3a feature: support custom widget borders (#1642)
* run a dep bump

* add widget border type

* feature: support custom widget borders

* fmt

* remove none since it looks really bad

* fix bug with title for tables with no title when expanded

* fix jsonschema

* fix some unused stuff
2024-12-05 06:52:55 +00:00
Clement Tsang bc3032cf10 bug: fix incorrect versions in schemas (#1635) 2024-11-29 04:30:23 +00:00
Clement Tsang ae0d350122 refactor: a bunch of cleanup of dead code and misc. stuff (#1634)
* refactor: lines

* shift around some stuff in Cargo.toml

* some docs

* some more cargo stuff

* clean up a bunch of stuff after making things less public

* clippy lints

* a lot more cleanup

* clippy

* fix some errors

* fix for windows
2024-11-28 22:42:17 +00:00
Clement Tsang 182c718d0e bug: fix incorrect colours for gruvbox-light (#1633) 2024-11-28 19:27:15 +00:00
Clement Tsang 991cc3eed8 refactor: clean up some clippy lints from 1.83 (#1632) 2024-11-28 19:16:15 +00:00
Clement Tsang 24cb8a417c refactor: move schema generation to its own binary, go back to lib-bin (#1630)
* refactor: separate schema generation to its own binary, go back to lib-bin setup

Decided it might be nicer to separate the schema generation bit to its
own binary. This does mean that we have to go back to the lib-bin
system, as otherwise passing shared code is _really_ hard.

* handle versioning

* run fmt
2024-11-28 08:05:25 +00:00
Clement Tsang 196d6d18c6 feature: add the ability to configure the disk widget's table columns (#1625)
* a bit of refactoring here...

* some refactoring, add columns

* cleanup

* add disk column feature

* update changelog
2024-11-18 02:28:20 +00:00
Clement Tsang c8cba49463 other: add missing process column comment/schema description (#1623)
* add todo

* rerun schema
2024-11-14 10:34:05 +00:00
Clement Tsang 6d37d5756f refactor: combine process column code (#1622)
* rename some files

* refactor: combine process column code

* rename some and sort the schema columns
2024-11-14 10:24:24 +00:00
Clement Tsang 103c4f6ab4 deps: bump various dependencies (#1621)
Bumps various dependencies, including ratatui
2024-11-14 09:23:07 +00:00
Clement Tsang 02b947dd2d refactor: quick variable/struct/file rename (#1620)
Some renames and file movement. No functional changes.
2024-11-08 04:54:52 +00:00
Clement Tsang ae14685913 refactor: clean up some unused serde code (#1619) 2024-11-08 04:13:07 +00:00
Clement Tsang 16a2fd6a41 deps: bump to ratatui 0.28 (#1618)
* deps: bump ratatui to 0.28, and crossterm to 0.28

* fix warnings
2024-11-03 16:11:00 +00:00