66 Commits

Author SHA1 Message Date
Frederick Zhang
9fe558183b
fix: use default disk.columns when only other disk.* configs exist (#1776)
I configured `[disk.name_filter]` and after upgrading to v0.11.0, the
disk widget became empty since `disk.columns` was parsed as an empty
vector unless I added `disk.columns` to my config as well.
2025-08-08 15:01:48 +00:00
Clement Tsang
2132da2f8b
feature: option to have process tree entries be collapsed by default (#1770)
* Add option to have process tree collapsed by default

* Fix collapse logic

* format

* tweak how it's done

* oops

* slight tweaks to the no-children collapse logic

* update schema

---------

Co-authored-by: ceres <ceres.bezuidenhout@trintel.co.za>
Co-authored-by: Bucket-Bucket-Bucket <107044719+Bucket-Bucket-Bucket@users.noreply.github.com>
2025-08-04 23:29:42 +00:00
Clement Tsang
4d935bdd70
feature: support virtual memory column for processes (#1767)
* quick refactor of bytes/name

* oop

* Add virt mem field

* add value

* add virtual memory columns + tests

* fix

* Changelog
2025-07-30 04:24:21 +00:00
Clement Tsang
98342617a1
refactor: update how we render and handle process kill dialogs (#1701)
* fmt

* temp work

* get yes/no working

* cleanup

* fill out some more buttons

* conditional compilation

* update

* update docs

* wait this just works

* like 80% of the way there

* some stuff around the killing screen

* mouse works

* done!

* clippy

* more stuff

* fix some imports for windows

* android fixes

* oop

* ahh

* hmm
2025-06-08 04:46:31 -04:00
Clement Tsang
69a4b59573
other: fix clippy warnings (#1712) 2025-04-10 23:20:11 +00: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
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
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
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
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
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
Stephen Huan
7c35def686
fix: selected text bg in default-light theme (#1578) 2024-09-03 03:27:03 -04:00
Clement Tsang
a095e67179
change: default config location on macOS considers XDG config var (#1570)
Actually support $XDG_CONFIG_HOME on macOS. Apparently in our docs we also say we do, but we, uh, don't, because dirs doesn't.

Note this is backwards-compatible, in that if a config file exists in the old default locations, we will check those first.
2024-08-22 01:00:55 +00:00
Clement Tsang
5a009987ac
docs: update docs around disable_gpu change. (#1562)
* docs: update changelog

* update docs
2024-08-14 20:27:32 -04:00
shurizzle
6b0a285541
refactor: rename flags.enable_gpu to flags.disable_gpu (false by default) (#1559)
Co-authored-by: shurizzle <me@shurizzle.dev>
2024-08-14 18:22:47 -04:00
Clement Tsang
96ed26d87a
other: add another test to validate default config (#1553)
* update changelog

* add another lib test to make sure valid integration configs are actually valid

* only test these on default config

* clippy

* add extra CI fail check

* fix windows
2024-08-08 04:44:48 -04:00
Clement Tsang
cf47cb9fae
other: add test to make sure default config is valid (#1552) 2024-08-08 01:36:42 +00:00
Clement Tsang
feb0c6912c
bug: fix default_cpu_entry arg not being used and missing from docs (#1543) 2024-08-05 18:55:05 -04:00
Zeb Piasecki
d6c2ef3e22
feat: add option to move avg CPU to another row (#1487)
Adds an `average_cpu_row` option to move the average CPU usage to its own row
when using basic mode.
2024-08-03 01:10:36 -04:00
Clement Tsang
5b68b6ee81
other: add test to catch issues with incorrect long arg names (#1528) 2024-08-01 15:45:24 +00:00
Clement Tsang
03e69b3be0
bug: fix using clap macro incorrectly, causing broken long help name (#1526)
Basically, I did:

```
long = "blah blah blah"
```

but it should have been:

```
long,
long_help = "blah blah blah"
```

The former makes the _long help flag_ the description which... well,
isn't right.
2024-08-01 15:21:09 +00:00
Clement Tsang
a6e1ea3bd8
docs: update docs on filter (#1519)
Updates some outdated docs on filtering, and adds some tests as well. In particular, this also adds a cfg_attr on tests to try and catch unknown fields; we'll be more lenient in prod builds though and allow them.
2024-07-31 06:41:30 +00:00
Clement Tsang
4b14ccb56b
feature: support italic text styling (#1514)
Support italics as a text styling option.
2024-07-31 01:54:26 +00:00
Clement Tsang
c77256eaaf
change: make table headers bold by default (#1513)
* change: make table headers bold by default

* changelog
2024-07-31 00:37:38 +00:00
Clement Tsang
08a7b8b860
feature: support bold text (#1512)
* feature: support bold text

* add changelog

* more testing
2024-07-30 07:43:57 +00:00
Clement Tsang
f091ebdc6a
feature: support simple colour settings for text fields too (#1511)
* feature: support simple colour settings for text fields too

* also add 'color' back to some options

* tests
2024-07-30 07:15:23 +00:00
Clement Tsang
28972a1e64
refactor: refactor styling options (#1499)
Introduce a new configuration system for styling.
2024-07-29 09:03:35 +00:00
Clement Tsang
1ec4ca3f06
refactor: out with arg/config error, and make user messages more consistent (#1494)
* refactor: out with arg/config error, and make user messages more consistent

* finish up

* fix all the tests
2024-07-19 06:51:50 +00:00
Clement Tsang
3602429529
other: add schema test for uncommented default config (#1484)
* other: add schema test for uncommented default time

* ahhh

* forgot to disable this
2024-06-17 00:59:36 -04:00
Clement Tsang
7666a09162
feat: add way to automatically generate new json schemas (#1482) 2024-06-16 19:28:24 -04:00
Clement Tsang
982b7181a6
change: change how disk, temp, and net filters in config are set (#1481)
* change: change how disk, temp, and net filters in config are set

* run rustfmt

* update default config
2024-06-16 02:15:36 -04:00
Clement Tsang
8885910442
refactor: remove lib and move some things around (#1477)
A loooooong time ago (wow, it's been 4 years apparently...), I made the brilliant (/s) decision to use both lib.rs and main.rs because I was trying to add tests in the tests folder that needed private access to some functions in the src - and at the time, the only way I could think of doing so was exposing bottom as a library and a binary.

This isn't necessarily bad, but for my use case, it's pretty unnecessary nowadays (since I've moved all my tests back into the source files) and adds complexity in looking for certain things, so it's high time we move things around and remove lib.rs. I also took the time to clean up some weird code I spotted along the way.
2024-06-05 06:00:21 +00:00
Clement Tsang
7aa379aabf
bug: fix -V not working and causing Cirrus CI to fail (#1478)
* bug: fix -V not working and causing Cirrus CI to fail

* add comment

* update workflows and fix tests
2024-06-05 01:12:00 -04:00
Clement Tsang
ee2e1fee1c
refactor: use struct for args instead of builder interface (#1472)
* start moving args

* tmp

* refactor config

* port over ags

* update changelog
2024-05-27 01:16:37 -04:00
Clement Tsang
398bf5930f
refactor: some string-related code cleanup/refactor (#1463)
* other: organize some utility function files

* deps: remove kstring

* refactor: some naming changes

* refactor: some more small refactoring/naming changes

* simplify to_cell to return a Cow

* enable lints
2024-05-07 02:03:30 -04:00
Clement Tsang
93d6718766
other: update a bunch of argument descriptions and some arg/config names (#1441)
* other: update a bunch of argument descriptions and some arg/config names

* update docs

* changelog
2024-04-10 20:46:35 -04:00
Lee Wonjoon
a083ec00dd
feature: Add option to set a position of legend (#1430)
* Add option to set a position of legend

* some small changes

---------

Co-authored-by: ClementTsang <34804052+ClementTsang@users.noreply.github.com>
2024-04-02 01:06:01 -04:00
Clement Tsang
5cf17f6015
other: flatten process config struct and clean up help text (#1395)
* refactor: flatten process config field

* other: clean up some doc formatting using indoc and breaklines

* fix broken test

* remove default as that breaks things for now

* add test

* more tests
2024-01-21 05:47:13 -05:00
Clement Tsang
975e3d776b
refactor: move some files around in prep for a future options refactor (#1393)
* some formatting

* refactor: move some files around in prep for a bigger config/options refactor
2024-01-18 18:46:00 -05:00
Clement Tsang
be4fa27b84
refactor: convert layout creation tests back to being unit tests (#1392) 2024-01-16 23:47:05 -05:00
Clement Tsang
dd66ae774c
refactor: simplify some config -> constraints code (#1383)
* refactor: simplify some config -> constraints code

* iteratively progress...

* update bcr; this might need testing since I removed some old proc code

* widget side

* fix battery

* fix widget tests with bandaid for now

The issue was that the calculations assume a certain ratio for CPU
legends.

* add some tests

* bump up

* fix proc drawing issues

So with the proc widget in certain places, there would be a panic during
constraint determination.

Looks like back when I wrote this I made some gross assumptions about
certain things. In particular, the problem here was that the search
added an additional "one" height, so that needs to be accounted for
after we removed the "doubling" code.

* tests

* fix tests

* reorganize tests

* clippy

* fix cross tests not working

* fix builds for android
2024-01-15 04:19:18 -05:00
Clement Tsang
bc2c363a49
refactor: clean up arg code more (#1377)
* fix sort function

* Try macros

* Revert "Try macros"

This reverts commit 93c7306f8ae8b906e0a66d1a4d758aad51efe3eb.

* use next_help_heading instead

* test

* Revert "test"

This reverts commit 017a1702b35dd7fd87c449e27a3bdb65bc858f72.

* Reapply "test"

This reverts commit 23c09d3828594d880ecf5e753e1fcdf5fd719e42.

* use foldl instead :)

* a word

* different conditionals

* update docs, change ordering

* more formatting stuff
2024-01-11 00:25:53 -05:00
Clement Tsang
6b62176554
refactor: rearrange/resort args (#1376)
* clean up Cargo.toml

* some small cleanup

* refactor: group together similar args in the help generation and code

This groups together related arguments in both the help text and the
code itself.

* update changelog

* clippy

* builder pattern instead
2024-01-10 19:07:22 -05:00
Clement Tsang
c242b4aff3
refactor: move around some configuration code again (#1371) 2024-01-01 17:39:10 -05:00