* add no key setting
* do it here instead of in main loop
* add a warning
* docs: update a bunch of docs with features
* linux-only test
* oop
* skip field check for other os
* oop
* easier way of doing it
* use dead code
* oop
* huh guess I don't need it
* ci: build and check Windows ARM
* forgot to update these
* ???
* is it the image or smth
* nope not that
* Update build_releases.yml
* Update ci.yml
* Update build_releases.yml
* fix build
* ???
* ????
* ????????
* okay that works, now just set the output file
* driveby use rustix
* refactor some code aeround
* bug: fix colon at end of process name for now
* clippy
* comments
* changelog
* some other changes + test
* extra test
* feature: add support for threads in linux
* bump version too
* only enable for linux for now
* thread some things around
* update changelog
* add highlighting support
* fmt and run schema
* how did this get added
* hmmm cfg in if seems to not work
* fix updated fields
* fixes
* revert uptime rename
* some cleanup
* fix doc
* oop
* deps: bump sysinfo
* remove sleep on startup
* missing collection set
* some logic around updating the battery list to match how it is now
* more refactoring
* oops
* forgot to initialize battery manager
* fix list updating logic + battery manager logic
* comment
* initialize should refresh list to true
* ah
* this works a bit nicer
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.
* docs: update things to reference 0.11.0 in prep for release
Things still missing:
- Update schema
- Release notes
- Any doc site updates?
- Any GIF updates?
- Take a pass over README?
* update schema with 0.11
* update schema with virt
* update
* update date
* an attempt and failure to update the gif
* bump freebsd
* bump
* I swear
* okay so no freebsd 15, got it
* 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>
* bug: fix parsing issue around certain disk names
Turns out that in /proc/mount disk names may have weird escape
characters - these need to be changed when parsing it.
* update changelog
* back to the slow
* Add test
The current desktop file caused an error and a hint from `desktop-file-validate` 0.28.
This commit addresses those issues:
- The "Version" field must be empty or a desktop entry specification version (e.g., 1.0, 1.5),
not the tool's version.
- The "Categories" field should only contain one main category to avoid warnings.
ref: https://specifications.freedesktop.org/desktop-entry-spec/1.5/recognized-keys.html
* deps: bump sysinfo, fix cpu
* fix things for at least Linux
* bump some other stuff
* more things
* windows
* more stuff
* display
* ahhhh it's not stable
* redundant f32
* fix freebsd
* 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
* refactor: move components to a 'drawing' folder
* Revert "refactor: move components to a 'drawing' folder"
This reverts commit a1316bdf3aa4437bed2ca786896c2b387ccf5f0e.
* move stuff out of constants because it sucks
* move more things!
* cleanup
* some restructuring
* refactor percent time graph to common impl
* wow thanks copilot
Allow using the left arrow to collapse a tree branch in the process widget, or a right arrow to expand it.
---------
Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
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.
* 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
This commit contains the following changes:
1. Corrects the source of the package in the Nix instructions: `bottom` isn't coming from `nix-community`, but Nixpkgs itself.
2. Updates the Nix install instructions to use the new Nix CLI.
3. The original link was pointing to a home-manager module for bottom. We now include instructions on how to enable said module.
* 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
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.
* 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
* 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
* 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
* 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
* refactor: ignore warning for deprecated panic hook from Rust 1.82.0
* refactor: bump 'msrv' to 1.81 and update deprecated code
* some more cleanup
* even more cleanup
I had changed how this was parsed in-code but I forgot to update the default configs. This also adds some e2e tests to hopefully catch this all for real in the future, since the schema ones don't catch this stuff and the constants test doesn't actually run the binary for a proper e2e test.
As per [the changelog](d20dc49c95/CHANGELOG.md (L90)), `--color` was replaced by `--theme`. This updates the screenshot comment in the README to reflect this change.
Ideally we minimize our usage of Cirrus CI, especially for typical PR CI workflows, since it's a bit cludgy to work with. This method is also more extendable to things like OpenBSD.
Fine for deploys I guess since that's not super frequent and at this point I have that working fairly well when automated + I don't usually have to wait for it.
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.
* other: show N/A for Nvidia GPUs if we detect one but can't get the temperature
* refactor: driveby refactor of filter system and code for temp
* missed one
* 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
* bug: fix occasionally wrong runtime reported by sysinfo
Seems like on other platforms, sysinfo will sometimes report a run time
that starts from UNIX epoch - this gives a non-sensical value of 19000+
days, and it at least looks a little more reasonable to just return 0 in
this case. I guess we can also make it return N/A in the future but this
is a quick fix for now.
* update changelog
* ci: try adding auto cancellation back to cirrus tasks
* tweak timeout
* some renaming
* modernizing
* Revert "modernizing"
This reverts commit d66b3aa0e999140ced08e523214751f7572d4306.
* hmmm
* bleh back to false
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.
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.
I was mostly just using the time crate for local log debugging and just to avoid converting seconds to h/m/s.
This PR makes it so we are only using it for local log debugging.
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.
* 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
- There is currently no indication under which [table](https://toml.io/en/v1.0.0#table) do "flags" go in the config file.
- I think having that being explicitly spelled out & having an example saves quite a bit of people's time. Would for me 🙃
* some consts
* change: use sysinfo's swap calculation for windows
I'll add an additional field for committed in a separate PR which shows
the previous value.
bottom doesn't have an MSRV, but if we can still build on older versions
of Rust then I'm all for it. The updated clap versions didn't bring
anything interesting so there's no real issue for me to downgrade IMO.
* ci: migrate macOS ARM builds to use GHA
M1 macOS runners are now available on GHA, so we can use it instead of
CirrusCI for builds/CI.
* bump freebsd
* ci: bump choco action to v3.0.0 and replace release delete action with gh
* back to action since it isn't a git repo
* let's test if gh works fine if I pull repo
* ci: update upload-artifact to v4.3.0 and download-artifact to v4.1.1
* fix rpm/deb
* add exception for quay; idk what I'll do once node support is gone
* fix broken script
* fix download
* migrate 2-17 to cirrus to avoid node deprecation warnings
* prevent cirrus cancellation
* update cache to work with linux
* simplify cache
* update some comments
* add timeouts
* ci: update cirrus-ci FreeBSD versions
Looks like the newest available FreeBSD images are 13-2 and 14-0, and
the previously used ones aren't available anymore.
* comment
* 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
* 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
* 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
* 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
Make sure that bcachefs mounts are also displayed in the disks widget.
bcachefs is a file system that will be included in the upcoming Linux
v6.7 kernel. Briefly tested this and it works on my system.
* refactor: group together some canvas files
* rename file
* more shuffling around
* fmt
* more shuffling
Going to flatten widgets in another PR.
* some docs
* naming
* fmt
* other: master -> main
I'm so used to using `main` branch now that it's actually kinda annoying
to use `master` for just this repo... so might as well rename it now.
* overzealous change
* wording
* some wording
* allow auto-cancel for tests if not main
* refactor: iteratively detect ASCII and build string when truncating
* more tests
* test going by usize
* Revert "test going by usize"
This reverts commit 4fe71260e70696a0bb5907c97a2ca049fc23214c.
* Add gpu util, power and procs.
Consolidated gpu calls into `data_harvester`.
Changed config flag from `enable_gpu_memory` to `enable_gpu`.
Added GPU utilization to the cpu widget.
Added GPU process memory usage and utilization percentage to the proc widget.
Added key binds for gpu process toggling.
Added GPU power usage to the battery widget.
Added bounds check to battery widget header.
Show battery widget header when `gpu_enable`.
Added feature flag `legacy-functions` to `nvml-wrapper`.
updated config file(s).
updated help text.
updated docs.
* Code Review:
Remove GPU util from cpu widget
Remove GPU power from battery widget
Use reference for gpu widgets_to_harvest
Extract match arm to function for feature gate
* Code Review: add gmem% toggle
* Do not poll gpu temp when filtered
* Code Review Two Changes:
adjust doc wordings
remove extra references
remove extra widget harvest checks
init proc gpu values
use convert_temp_unit for gpu temp
* docs: bump mkdocs-related dependencies to latest
bumps mkdocs-material to 9.4.8, mkdocs to 1.5.3, mkdocs-material-extensions to 1.3
* fix some link warnings
* Fixed uninlined args
First ran this, and fixed a few more similar issues by hand
```
cargo clippy --workspace --fix --benches --tests --bins -- -A clippy::all -W clippy::uninlined_format_args
```
Note that in a few cases, format args were passed by ref - which is actually a tiny perf hit - compiler would not be able to optimize them.
* revert change here
since it contains a non-inlineable variable I'm not a fan of using it partially here
* revert
given the other formats above/below I would prefer keeping it like this
---------
Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
* Chore: Run an spell cheker, and gramar cheker
* small revert
---------
Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
* ci: test if building with musl on Rust > 1.71 works again
* use cross instead?
* specify cross version to fix build issue
* Update build_releases.yml
* deps: use clap 4.4.0 to remove is-terminal
* fmt
* appease clippy
* fmt again
* Revert "deps: use clap 4.4.0 to remove is-terminal"
This reverts commit 78aa6ec8481d38357adc09e262aa5df87796b6c7.
* add zfs io counters for linux and freebsd
* ci
* freebsd clippy
* code review: remove dead code for zfs feature gate of freebsd iocounters and squash if statement in zfs_io_counters
* bug: fix core dump if the terminal is closed
The cause was:
- bottom thinks it's panicking if the terminal is closed.
- The panic hook tried to print out to the terminal - but the terminal
was closed! It would unwrap and thus panic even harder.
- To solve this, we just make the panic hook calls not unwrap, since
honestly if they fail it's whatever as far as I understand it.
* update changelog
* update documentation and support either numerical times or human times for time_delta and default_time_value
* update docs
* give more human times on error
Some build script formatting fixes and cleanup of some code. In
particular, I found some of the nightly version handling code to look
pretty gross so I separated out the parts into functions to clean it up
a bit.
The clap matches/config struct was taken in as a reference when building
the App structure. However, we do not need to keep these around after
this, so we can instead take ownership of the match/config and drop it
after to save a bit of memory.
clap v4 apparently changed it so arguments are not sorted by default
like before - this manually sorts the arguments beforehand to achieve
the same effect.
* other: use f32 for process percentage values
This cuts down memory by a tiny bit, and we don't need a full f64 for
percentage values.
* fix for macos and windows
* feature: also check coretemp on Linux when gathering temps
* update changelog
* add comment
* add logic to check thermal zone if there are no hwmon entries
* cleanup
* handle duplicates between hwmon and thermal zone
* Revert "handle duplicates between hwmon and thermal zone"
This reverts commit 402606cc62f27ba196ef2ade6a669ae84aedf0e0.
* cleanup
* back to running thermal zone if no hwmon
* prevent failure cases
* temp logging
* name refactoring
* port dupe name logic to hwmon
* Cleanup, add fallback to sensor name
* more tests
* Fix log
* update changelog
* cleanup and more tests
* ci: add a build check for aarch64-linux-android
* appease clippy
* use 1.67.0 for Android due to NDK issue
* remove sparse since it is default now for 1.70 and causes issues with older versions anyway
* refactor: redo how we do some processes between different OSes
* cleanup
* more cleanup
* windows
* freebsd
* clean up linux more, fix broken FreeBSD import
* some more cleanup to remove some big imports
* other: enforce unused_imports lint again
I think there shouldn't be any issues with enforcing this now...
* set up cfg block so the logging feature doesn't break clippy
* some cleanup + comments
* bug: when getting Linux temps, don't bail ASAP if they fail
This meant that if hwmon failed, it would never try and get temperatures
from thermal or GPU. The same is true for thermal failing leading to GPU
never running.
* update docs
This just simplifies the logic around ctrl-c and termination logic and
event loop logic to something simpler and without the need for timeouts
and/or atomics.
Instead, we just make termination an event sent by ctrl-c and use the
same receiver for event handling to react to it and break the loop.
This just makes it so that even if the logger is enabled, if it fails to
initialize (e.g. read-only directory), bottom will still continue to
start up, and just print a warning that the logger encountered an issue.
* feature: show running time of processes
* fix clippy
* add time searching
* update changelog
* use safer duration for linux in case of 0
* some cleanup
* quick hack to deal with some Windows processes returning unix epoch time as start time
---------
Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
* feature: add customizable process columns
* Add some tests and actual logic
* more tests
* update changelog
* update config field
* even more tests
* update documentation
* more testing
* deps: remove const_format dependency
I was importing it for just one use case, but I could just define the
const string manually and not pull it in at all.
* update husky entry
Seems like I broke this when migrating from tui-rs to ratatui. This just
uses explicit enum variants to set my side borders and a test to try and
make sure this doesn't happen again.
* other: add first draw immediately after initialization
Previously, I would only do the first draw after an event triggered, so
this just makes it so that I *always* draw once first. Some widgets look
a bit weird with no data, but this is fine I guess if we want to gain a
bit of responsiveness.
* other: potentially shorten first time to get data
* other: move event loop thread init earlier in app initialization
* First implementation of cache memory data collection, mostly copied from RAM and swap implementations
* First implementation of cache memory display, copied from RAM and swap implementations. placed cache as second in the list as it is more similar to the RAM than any other item in the list
* expanded comment to explain method.
* rustfmt
* all cache-related code excluded on windows, in the process refactored src/data_conversion.rs convert_mem_label() to convert a single label instead of all at once
* better factoring-out of cache memory logic to allow individual disabling
* added --enable_cache_memory flag, disabled cache memory collection by default
* renamed CCH to CHE
not sure how i messed that up
* changelog updated
* Added command line flag documentation
* updated config file documentation
* specified that buffer and cache memory display does not work on windows
* resolved merge conflicts
* added documentation to cache memory data collection
* capitalized Windows
* implemented missing canvas styling logic
* fixed misplaced no-windows flag
* reduced colour collisions, as cache colour was the same as the first GPU colour
* made FIFTH_COLOUR constant windows-only
* Revert "made FIFTH_COLOUR constant windows-only"
This reverts commit 72698f1dd7e2de7dbda843708ece6a3dba66f94f.
* made FIFTH_COLOUR constant non-windows-only
* minor fix for basic mode row count
* Update src/app/data_harvester/memory/sysinfo.rs
Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
* Update src/canvas/widgets/mem_basic.rs
Co-authored-by: Clement Tsang <34804052+ClementTsang@users.noreply.github.com>
* updated default_config.toml
* formatting
---------
Co-authored-by: ClementTsang <34804052+ClementTsang@users.noreply.github.com>
* deps: bump once_cell and related dependencies
Now that we've removed heim, I can bump up other dependencies that
relied on newer versions of once_cell.
* Add some dhat code
* dhat gitignore
Migrates existing heim-based disk data collection code off of it to either sysinfo or vendored code based on heim/sysinfo/other sources. This also allows us to remove heim completely from bottom.
---
* refactor: fix some refresh code
* remove async from the freebsd code
* some file/implementation organization
Turns out sysinfo lacks a lot of data I need. I can still use it for the
Windows disk usage implementation, but I'm probably going to manually
implement macos/linux usage and all io usage stats.
* more restructuring
* Some other fixes
* remove futures
* ready for some big changes?
* big changes
* linux io + reads
* use lossy conversion for mount point
* add windows refresh
* so long heim, and thanks for all the fish
* fix filter behaviour, remove string allocation when reading lines
* rename unix -> system for more accurate file struct representation
* fix freebsd
* port generic unix partition code
* add bindings and fix errors
* finish macOS bindings for I/O
* disable conform check, this seems to... make disk I/O work on macOS?????
* fix linux
* add safety comments
* more comments
* update changelog
* changelog
* We're going full 0.9.0 for this
* update lock
* fix some typing
* bleh
* some file management
* hoist out get_disk_usage
* fix some stuff for Windows
* typing and remove dead code allow lint
* unify typing
* fix
* fix 2
* macOS fix
* Add bindings file for windows
* add windows implementation
* fix macos
* deps: update some minor dependency versions
Bump some dependency versions as of April 7, 2023. Note I skipped any
updates tied to futures as that's getting removed along with heim in the
near future (heh).
* fix rename on Windows from K32GetPerformanceInfo -> GetPerformanceInfo
* refactor: unify on using bytes for the memory unit when harvesting
* some ordering stuff that doesn't mean much
* some comments
* more fixes
* refactor: rename
* comments v2
* some more cleanup
* remove uninlined_format_args allow
* refactor: clean up some data collection refresh/init code
* move out battery
* missing setting memory value for proc
* stop segfault on macos
* unit
* oopsie
* 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
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.
* 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
Since I have a macOS M1 laptop to test on now, I think it's a good time
to bump it to be officially supported, especially since it's going
to be the main macOS platform for the foreseeable feature.
* 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>
* Revert "other: revert disk usage change for now (#962)"
This reverts commit d3661c23200a66c7dc01f4e534d8d7e97dc188d2.
* some cleanup
* update help menu
* update screenshot
* update changelog wording
* Remove redundant newlines
* Use type system to ensure help constants match in size
It is removing `-yu`, because it updates the system before downloading the package.
ArchLinux is updated constantly and can crash the system, so it's better just to install the package.
* 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>
* ci: switch deb nightly builds back to the same string as normal
Easier to stay consistent, I guess.
* disable cache for cargo deb
* reenable cache
* nvm
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.
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.
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.
* other: group all dataset draws in a time chart
We used to draw each data set separately as a new canvas. Now, in one
canvas, we draw all datasets.
Note that this changes how dataset lines are drawn - rather than
drawing one on top of another, it now draws kinda all at once. This
effect is *kinda* a bit better IMO, but it might also look a bit
more cluttered.
* other: optimize truncate_text
Flamegraphs showed that this area seems to be a bit heavy at times with
some inefficient use of iterators and collection. This change should
hopefully optimize this a bit by reducing some collections or
reallocations.
There can also be some further optimizations with less allocations from
callers.
* Reduce some redundant draws
* 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
* 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
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.
* 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
* 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
This automatically triggers and grabs the build artifacts for systems that are only supported on Cirrus CI (as of now, FreeBSD and M1 macOS).
* ci: add cirrus build trigger script
* ci: modify build scripts to include cirrus build
* fix some stuff
* update docs
* more fixes
* add OS to fingerprint cache
* simplify cirrus test script
* cleanup and add start of build script
* add nightly cron job to CCI build, add artifact
* add docs
* avoid test task if cron
Since it is a more limited platform for the public free tier,
particularly for macOS VMs, it seems better to combine the testing
scripts rather than using a matrix.
* ci: update rust-cache to 2.0.1
* ci: update dtolnay/rust-toolchain to ba37adf
* ci: update skip-duplicate-actions to v5.2.0
* ci: update ClementTsang/cargo-action to v0.0.3
* ci: update to macos-12
* ci: update ghaction-chocolatey to 2.1.0
* ci: update upload-artifact to v3.1.0
* ci: change from actions-rs to rustsec for audit-check
* ci: stop using actions-rs for builds
* ci: update cirrus to use tlsv1.2 when curling
* ci: disable macOS ARM workflows on GHA since its built on Cirrus
* 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
* 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
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.
* 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
* 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
* 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
* 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
* 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
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.
* add ctrl-u/ctrl-d to process table
* add help text for ctrl-u/ctrl-d
* add ctrl-u/ctrl-d to help dialog
* store height of help menu, fix overscroll with half page down on help menu
Co-authored-by: ClementTsang <34804052+ClementTsang@users.noreply.github.com>
The markdown Python lib seems to be causing some issues with certain
extensions. Bumping mkdocs to 1.3.1 seems to resolve this issue (the
alternative is pinning markdown to < 8.4.0).
* 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
Since codecov is just used as a basic overview of test metrics,
I just set the threshold to something somewhat high.
Also removed codecov from README as it's not really representative of
much.
action-rs' action seems to not be really maintained anymore and
throws some redundant warnings that kinda clog up outputs. As
such, I feel like moving to a more active action is probably worth it.
This is a pretty small change, but at least _for now_, unifies all
`mod.rs` use cases to the 2018 style for consistency.
I personally don't mind going back to it on a case-by-case basis in the
future if it results in cleaner code, though.
Make a note of release sizes in the nightly/deploy scripts. This is mostly just in case I need to refer to it in the future (mainly for nightly, as the actual generated files are overwritten daily).
This serves as somewhat of an intermediary refactor to unify some scrollable table code - in particular, in regards to drawing. This is almost a parallel refactor as #710, which did something similar for time graphs. However, this one has a bit more work in regards to the concepts of component state, in particular, for width calculation caching and scroll position management.
Bugs squashed:
- Incorrect column sizing for flex cases
- Case where the sort menu bounds were still existing despite being
hidden
- Proc widget not actually taking into account the calculated row widths
in some cases during data conversion.
Disk and temp tables now share the same drawing logic, as well as
consolidating the "text table" states into one single state, as opposed
to two separate states (one for scroll and one for width calculations).
BTW I know this is kinda an ugly design - creating a giant struct to
call a function - hopefully that's temporary, I want to do a bigger
refactor to consolidate more stuff together and therefore avoid this
problem, but baby steps, right?
Disables incremental compilation and debug symbols in CI and other related workflows, since they're not used there at all. Also forces --locked as needed.
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).
This is a simple bug fix that changes the behaviour of a scroll select
(and column select) to only update if the updated position is _within_
the bounds of the list (0 to the max index, inclusive). Prior to this,
all the implementations but the disk implementation would just bound the
change. This was both inconsistent with the disk scroll state, but also
jarring since this meant a user could click on seemingly empty space but
it would somehow click on the very last entry.
This change also unifies the scroll calculation function between all the
scroll select functions. Ideally we get rid of the intermediary
functions but that might require more refactoring than I want for this
fairly simple bug fix.
The column select scroll calculation was also changed to fit this
behaviour, but it does not use the same logic as the other scroll
states. What could be done in the future is a generic implementation for
direction (or maybe just "increment vs. decrement") to share it all.
When I was newer to Rust, I got the weird impression that you couldn't
add functionality to a struct outside of the defining file without using
a trait.
That's obviously not true, so it's high time I got rid of it and just
made it part of the impl of the class itself, rather than declaring a
trait and then exporting/importing it.
Experiment with llvm-cov over tarpaulin.
Tarpaulin is supposed to be switching to something similar to how this works in the future as well, so I might switch back then if I switch now.
This changes various as_ref() calls as needed in order for bottom to successfully build in Rust beta 1.61, as they were causing type inference issues. These calls were either removed or changed to an alternative that does build (e.g. as_slice()).
Functionally, there should be no change.
For context, see:
- https://github.com/ClementTsang/bottom/issues/708
- https://github.com/rust-lang/rust/issues/96074
It's caused two reports now because it's being mixed up with https://crates.io/crates/btm - going to remove it for now as it's likely the source of confusion.
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.
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
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.
Adds an indicator in the form of `$version (stable)` to make it easier to see which is the most recent stable version.
This is done via CI and mike:
1. Set the previous title to just `$version`. We can get this value by `mike list stable` and grepping for valid version tags (otherwise this might have issues with `$version (stable)`).
2. Deploy `$new_version` and alias to stable.
3. Update the `$new_version` to have a new title of `$new_version (stable)`.
Adds page up/down scrolling support to respectively scroll up/down by a full page.
Note that this is mostly just to get the feature out for those interested, and is admittedly a bit rushed - I will be rewriting all logic involving event handling as part of state refactor anyways, so this will also get changed in the work done there, and therefore, I kinda just sped through this.
Addresses a potential case where processing would fail if there were missing values from the CPU line of `/proc/stat`, and allows it to successfully return.
There were some weird interactions that I'm not sure about (like if you do bottom.pages.dev/asdf/ it infinitely redirects...?), so I'll revert for now.
This was causing issues with the choco workflow in another repo since
the name was incorrect; I've decided to also rename the template for
consistency.
Removes homebrew deploy files, since I am no longer maintaining it on my own. I had already disabled it from the deploy process a while ago, but forgot to delete these files.
Fixes the process_command flag/config not properly toggling off the name column and on the command column on initialization. This would cause sorting of that column to bug out.
Due to how matrices work with if/skipping, it seems like this ugly hack is the only way to skip CI based on the files updated without clogging the PR pipeline.
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.
In a similar vein to #590, we only create a release after the entire pipeline is completed and succeeds. Also fixes some incorrect job names and adds some "/'s" after directory names in the nightly pipeline.
Changes the nightly build workflow to delete/create a new release *only* if the entire build process passes. This avoids a potential case of a nightly build failing but having overwritten the old one, which has happened before.
After this change lands, similar changes will probably be made to the deployment script for releases.
Adds a `ProductCode`, `Scope`, and `Commands` field to the template, as well as additional changes to the deploy process to determine + fill in the `ProductCode` automatically.
Swap to manually calculating the mem total and usage via procfs. The usage calculation is now:
total - (free + cached + buffers + slab_reclaimable - shmem)
This follows the same usage calculation as htop. See the PR for more details.
Fixes the accuracy of the memory widget for Linux and macOS, and uses binary prefixes instead to be more accurate.
Regarding the first part, it turns out that the way I was calculating memory usage was *slightly* incorrect for a few reasons:
- Regarding macOS, it seems like the way I was determining usage (`usage = total - available`) is not the most accurate. The better way of doing this is apparently `usage = wire + active`, where `wire` is memory always marked to stay in RAM, and `active` is memory currently in RAM. This seems to be much closer to other applications now.
- Regarding Linux, this was somewhat due to two issues - one was that I should have used heim's own built-in function call to get how much memory was *used*, and the other is that when heim reads info from `meminfo`, it reads it in *kilobytes* - however, the values are actually in *kibibytes*. As such, to get the value in kibibytes, you want to actually take it in kilobytes.
While I've filed an issue for the library, for now, I'll just manually bandaid over this. See https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s2-proc-meminfo for more info.
Both changes take more advantage of platform-specific methods, and as such, the change unfortunately adds some ugly platform-specific code blocks.
Side note, Windows Task Manager apparently (?) uses binary prefixes for the values behind the scenes, but displays decimal prefixes. As such, now that we've switched to binary prefixes, it'll "seem" like the two aren't matching anymore since the units won't match, despite the values matching.
Adds the missing hide_time and battery config option to the default config and corresponding documentation.
Should probably automate the generation of this somehow tbh, though this might change when I add in-app config (soon™)
Seems like we have a few too many tests that aren't really needed for just asserting CI is passing.
The goal for CI (IMO) is just to ensure things still build on the various supported platforms after changes are made. However, there were a few tested scenarios like Windows GNU or musl which I feel weren't really too important in this regard, and added extra time to an already long CI process.
Commented out the following tests since there aren't any architecture-specific features that require running these in addition to other already-existing tests:
- Windows GNU
- Linux musl (both x86 and x86_64)
Of course, should we add changes that directly affect these architectures, then we should add the tests back.
Small refactor to remove the beef dependency for now.
This is likely just a tempoary change, I wanted to remove it just for clarity's sake among dependencies, and will probably add it back in the future.
For now I'll just stick to std's beef.
This is just a temp change, I wanted to remove it just for clarity's
sake among dependencies, and will probably add it back in the future.
For now I'll just stick to std's beef.
A large migration of documentation over to mkdocs, and some rewrites. Some stuff (install information, basic supported systems, contributors, thanks) are still staying in README.md, and CONTRIBUTING.md is essentially duplicated right now. However, stuff like configuration and key/mouse bindings are now moved to mkdocs.
Some parts are still a bit WIP - it is definitely not done (documentation never seems to be...). However, it should be "good enough" for now, and I'm much happier working with the documentation in this form than trying to scroll through a giant endless README.md file. It also works much better for adding new documentation.
Refactor to split up data collection by OS and/or the backing library. The goal is to make it easier to work with and add new OS support, as opposed to how it was prior where we stored OS-independent implementations all in the same file.
Since we're moving all 16.04 ubuntu builds to 18.04, I thought this would be a good idea in case anyone needed it.
Not sure if we should have just made ALL Linux builds use the older Linux container... for now I'll just make one extra build.
Lowers the timer for multi-digit inputs in dd.
I'm going to eventually completely rewrite the input part for the entire application though, but this will do for now.
Did not update crossterm (and tui-rs) since it seems to have resulted in a massive CPU usage increase. Also fix minor clippy error with a duplicated to_string call.
Fixes basic mode having broken click hitboxes (they were 1 unit too long in both directions). I'm pretty sure normal mode does too, but it's less noticeable due to bounding boxes.
This PR accomplishes two things:
1. This PR aims to add mount_filter to the config file. This allows a user to filter their disk widget entries by the mount name as well; this was particularly a problem in trying to address #431.
2. A slight rework of how the filter system works due to the need of being able to manage two potentially conflicting filter sources, since the disk widget will now potentially filter on both the disk name and the mount name.
In regards to the second point, the new behaviour is as such:
1. Is the entry allowed through any filter? That is, does it match an entry in a filter where is_list_ignored is false? If so, we always keep this entry.
2. Is the entry denied through any filter? That is, does it match an entry in a filter where is_list_ignored is true? If so, we always deny this entry.
3. Anything else is allowed.
This main (breaking) change is really the third point. This would mean that temp_filter and net_filter, when set to allow listed entries with is_list_ignored = false, are kinda... useless, as a whitelist in the scenario of being the only filter is kinda pointless. But hopefully this shouldn't be a problem...?
A bit of a followup to #449, this adds decimal places for values over 1GB in regards to disk usage. This affects the disk widget (for the read/write per second) and process widgets (total read, total write, read/write per second).
Removes/tweaks some really light colours that might cause issues with a white background. For example, yellow on white didn't look so great, so I adjusted the memory/rx colours for this mode.
This change adds a decimal + single digit to memory usage values over the 1 GiB threshold. Otherwise, there is no visible change.
(Note to self: implement the per-column width system soon, this change causes some values to potentially look a bit weird in mem-non-percent mode as it is if the value is really large, like 530.2GiB pushing right up against the column width, but it's currently tied to mem-percent mode. Ugh.)
Also revert a change made by accident where I switched to a decimal prefix system (GB) for memory values. This has been reverted back to a binary prefix (GiB).
For the process widget, we now sum the resource usage of the child processes on the parent entry when collapsing in tree mode.
Note that if you search to filter, and collapse, it will not sum the pruned values (values that cannot be seen). This is partly because I'm a bit lazy, and partly because I think this behaviour makes sense.
For example, let's say I search for a process with 4 child processes "AA, AB, BA, BB", with CPU usage 0.1, 0.2, 0.3, 0.4 respectively. Assume the parent process has 0 usage.
- Without filter, it sums to 1.0
- With a filter on A, it would sum to just 0.3
- With a filter on AA, it would sum to 0.1
I think this is fine because I'm treating this as summing any child that is still *visible* somehow. Summing unseen values would probably be weird as it would look like it's not adding up.
Further note that if you had, say, a child "CC" with a usage of, say, 2.0, and its parent of "AB", and you searched for CC in our above example, you would get a sum of 2.2. This is because AB is still visible by the fact that CC was the searched process, and AB must still exist (albeit faded out) in the tree hierarchy, and as such will still be displayed.
In particular, use non-binary prefixes for disk and memory usage in a process. Ideally everything is configurable by the user, but this is fine for now IMO until I can get around to doing in-app config.
Rewrite of the y-axis labeling and scaling for the network widget, along with more customization. This still has one step to be optimized (cache results so we don't have to recalculate the legend each time), but will be done in another PR for sake of this one being too large already.
Furthermore, this change adds linear interpolation at the 0 point in the case a data point shoots too far back - this seems to have lead to ugly gaps to the left of graphs in some cases, because the left hand limit was not big enough for the data point. We address this by grabbing values just outside the time range and linearly interpolating at the leftmost limit. This affects all graph widgets (CPU, mem, network).
This can be optimized, and will hopefully be prior to release in a separate change.
Adds users into the process widget (for Unix-based systems). This shows only in non-grouped modes, similar to state. Search is also supported.
In addition, a quick fix to prevent users from being in grouped mode when they tried to enter tree mode while grouped.
Two issues were highlighted as a result of using either Void Linux with disk encryption, or just disk encryption on Linux in general:
Two fixes:
1. Fixes a failed `usage()` call in the `get_disk_usage` function from failing the entire result. Now it only returns an entry with N/A results. This occurred in some distros and disk encryption setups, for example, the one for Void Linux here: https://docs.voidlinux.org/installation/guides/fde.html.
2. Fixes a potential mapping issue with disk encryption on Linux in general. Since the disk might map to `/dev/mapper/whatever`, but the I/O harvester was using another name, the mappings would not match. As such, we now also check if a symlink exists; if it does, then we take it and work out the correct path. This also fixes the disk name being wrong.
For consistency, we now don't automatically jump to the top of the list when using a sort shortcut. This behaviour already occurred with the sort menu and sorting by mouse clicks, so this is just now more consistent (and IMO less annoying, you can also always jump to the top via gg).
So it seems that tui-rs doesn't like rendering my CPU bars if the height is exactly 1. It needs at least 2. I have no idea why, this is probably something weird with how I render.
This, of course, breaks when there is only one row to report (i.e. with a dual core setup in #397).
The workaround switches the gap between the CPU and mem/net parts to 0, and increases the CPU's draw height by 1, only when the height is otherwise 1 (so the draw height is now at least 2). This does have the side effect of including an extra line to the side borders, but I think it's fine.
When running without elevated permissions under macOS, sysinfo cannot
query states of processes by root user, which results in 0.0% CPU usage
for all this kind of processes (and state = Unknown).
Here we use `ps`, which has SUID, as a fallback to query CPU usages.
This can be potentially applied to other properties if needed in the
future (we'll need a proper struct and parser).
Fixes a bug where you could make the sorting arrow disappear in the mem column if you did:
1. Go to proc widget
2. Switch to memory values from %
3. Press `m`
Adds a new option in the config file to filter out network interfaces. Also add the option to filter by whole words.
Interface follows that of the existing ones:
```toml
[net_filter]
is_list_ignored = false
list = ["virbr0.*"]
regex = true
case_sensitive = false
whole_word = false
```
Firstly, note this currently won't affect basic mode. There is code changes due to it, but instead, we'll just display `0.0B/0.0B` instead. I'm personally not really sure if we want to get rid of it in basic mode, since it'll leave an ugly gap in that mode.
Anyways, this change is mainly for the normal mode. All this does is hide the legend entry and chart if the total SWAP drops to 0 KB. It also has a small change to do a unit check on the memory used, as well as slightly adjusting the calculation we use.
Refactors to use only heim for Linux builds. This is now much easier to do since the 0.1 version of heim works fine for ARM. This is ideal since having to rely on two separate sources of data isn't the greatest if we can avoid it.
Sysinfo is still required for macOS and Windows, though. Temperature sensors do not work for those from heim, and for some reason, networks also don't work on Windows with heim...?
My personal CPU core calculation is also currently Linux-only, and as such, I'll still rely on sysinfo for Windows and macOS for now.
This isn't really a big optimization or anything btw. Just something I wanted to try.
* feature: added signal selection for killing in unix
* feature: set default signal to 15 (TERM)
* feature: selecting kill signal number with number keys
* feature: mouse selection of kill signals
* fix: restore working previous kill dialog for win
* bug: more fixes for killing on windows
* feature: made two digit number selection only work in time window
* feature: replaced grid with scrollable list for kill signal selection
* fix: handling scrolling myself
* chore: replaced tui list with span
so we actually know for sure where the buttons are
* feature: always display cancel button in kill signal selection
* chore: simplified as suggested in review
* fix: made scrolling in kill list more intuitive
* fix: differentiating macos from linux signals
* fix: fixed reversed kill confirmation movement
* chore: fixed unused warnings for windows
* feature: added G and gg keybindings for kill signal list
Making some small changes that would hopefully improve performance a bit.
- Remove redundant string generations for CPU data conversion
- Switch to fnv for PID hashmap and hashsets
- Use buffered reading to avoid having to store too many lines as strings
Fixes some performance regressions and forgotten cleanup.
Changes to attempt to improve performance to match 0.4.x:
- Remove `trace!` and `--debug` for now. These were a significant hog. Removing this dropped initial memory usage by about half.
- Add additional cleaning step for `pid_mapping` during process harvesting. This should hopefully improve memory usage as time goes on.
- Slightly change how we do sorting to hopefully be a bit more optimal? This was just an easy change to make that I spotted.
- Fix broken cleaning child thread task.
- Fix bug with choco and homebrew using incorrect bash syntax causing broken downloads. Why this didn't fail, idk.
- Add tag entry for manual runs to make it easier to deploy/re-run
- Fixed some typos
- Fixed incorrect string in choco python script
Adds a new flag, --mem_as_value (and its corresponding config option, mem_as_value = true), which defaults to showing process memory values by their amount rather than percentage.
Removes the random automatically generated colours for the CPU metrics. This was not supported in all terminal emulators, and would cause some of them to break (namely macOS Terminal).
Instead we'll default to colours we can be more certain will work and loop through them as required. Users can still override these colours with their own.
This was the cause of some process names getting cut off and looking weird for Linux (and Linux only, I'm not directly responsible for the other OSes).
This also adds spaces in between command line flags. Before, they were usually separated by either spaces (which looked fine) or null terminators (which meant it looked like something was broken).
Adds persistent search settings across runs, by saving to the config file. Each process widget keeps track of it's *own* behaviour. The previous flags/options are now for *global* behaviour.
The following new behaviour is:
- Relevant flags: `--case_sensitive`, `--whole_word`, and `--regex`, will *override* the current widget's default behaviour.
- Relevant options: `case_sensitive`, `whole_word`, and `regex`, will also *override* the current widget's default behaviour.
As per before, if you set, say, `--case_sensitive`and `case_sensitive=true`, the flag always overrides.
Documentation updates will be done in #248.
Refactors tui-rs usage to the new 0.11.0 release. This release also fixes the highlighting bug from #249, and now, expanding a widget no longer overrides the widget title colour.
This commit also introduces #255, but that seems to be easy to bandaid so hopefully it will get fixed soon?
Initial refactorings and additions to support in-app config.
- Refactor our current options logic to support in-app configs. That is, we can write to a config file with our changes now.
- The default action when creating a new config file is to leave it blank. (TBD and for now, not sure on this one)
- Previously, we would set everything in a config file on startup; now we need to read from the config TOML struct whenever.
- `C` keybind is now occupied for configs.
- `no_write` option to never write to a config file.
Fix for an index out-of-bounds by resizing to a smaller terminal just after the program got the terminal size, but right before the terminal started drawing.
Update how we position and generate column widths to look less terrible. This also adds truncation w/ ellipsis to the columns, and for processes, the state will automatically shrink to a short form (just a character) if there isn't enough space.
Adds mouse support to the application, to move between widgets and click on elements.
List of things to added:
- Click to move between widgets
- Click to move between widgets in basic mode
- Click on widget entries
- Ability to disable mouse if you don't like it, I guess
Fixes a bug caused by incorrectly reading the `/proc/{pid}/stats` file. Due to splitting by whitespace, the string parsing was read incorrectly if the process also contained spaces.
Reverts tui upgrade, there are some bugs and issues - namely, issues with rendering text.
We can revert this commit when those bugs are dealt with (should be fine after 0.10.1, tested building from the repo).
This feature allows any column to be sortable.
This also adds:
- Inverting sort for current column with `I`
- Invoking a sort widget with `s` or `F6`. Close with same key or esc.
And:
- A bugfix in regards the basic menu and battery widget
- A lot of refactoring
This also slightly improves how we generate the widths/heights to be
less... terrible.
Note this is not done, unfortunately. This requires tui-rs' wrapped
paragraph height PR to land and release so I can properly calculate the
height offsets.
See https://github.com/fdehau/tui-rs/pull/349 for details.
Update dependencies to most recent versions if applicable. Refactor to deal with breaking changes. Drop MSRV due to dependency issues, just support stable and later.
This PR adds the ability to toggle between the process name and process path. Currently, this uses `P` as the modifier key.
Currently, the longer command names are dealt with by forcefully changing the width of the columns, but this can be handled in a more graceful manner IMO.
Cause was checking the wrong indices for values. I thought I
had taken in a vector of strings that were just byte values,
but they actually contained the labels... oops.
- Removal of the old slash-space-to-hide behaviour of CPU widget
- Scrolling onto a specific entry will only show that entry
- Showing average is now default
Update tui-rs version, which means some changes:
- Legends are controllable; updated network legend with an optional flag to use the old one
- Stops the issue with legend hiding too early
- Added option to allow removing the table gap
- Use stateful tables
- Move to tui-rs' linear interpolation
This is not 100% finished and will be refined in the future, as I plan to
do a bit of an overhaul on how the process widget is going to look and
functionality. In particular, tabbed is currently kinda just slapped
together (I just combine all the states together as one big string).
However, it is enough to work and show state normally...
The total memory values may be zero when bottom is run on an unsupported
(or not-fully-supported) platform.
The previous behavior resulted in a NaN value for the memory datapoints,
which was passed through to tui-rs which ultimately panicked when
attempting to graph the memory widget.
* Uptick some crates, update README dependencies
* Cleanup before modularity feature.
* Fix missing reset zoom on reset
* Fixed reset... not resetting search or data displayed
* Cleaned up options a tiny bit to make more sense.
* Cleaned up some TODOs and the like.
* specify only build master branch.
* Initial fix, but pending a rewrite.
* Initial fix, but pending a rewrite.
* Merged two separate iterations into one for cpu legend.
* Refactor average cpu, fix bug with legend and cursor.
* Remove debug statement.
* Remove redundant functions from main
* Update pull request template.
* Format temperature line.
* Update README for chocolatey.
* Add note about basic mode and htop's inspiration.
* Fixes search with small mode by changing the prompt based on size.
* Minor fixes for search
- Remove ignore unused var lint
- Add a bit more spacing to deal with large unicode
- Add on-right movement on type
* Add contributor's list and bug/req section
* Check for div by zero
* Fix for dd in terms of sizing.
* Added (temporary) fix for help box. Scrolling is the ideal solution but will leave that for another time.
* Fix typo and run rustfmt.
* Also add rustfmt check to travis... this might be temporary.
* Add a bit on default config files being created in the debian extended description.
* Add rustup component add to travis.
* Disable rustfmt for now, seems to play weird on windows builds.
* Remove unneccesary deprecate ignore.
This adds minimal mode widgets to the program. This is not done, still
gotta play around with rearranging it to look nice.
Also going to have to change search bar to always take a constant 3.
May remove borders.
This adds minimal mode widgets to the program. This is not done, still
gotta play around with rearranging it to look nice.
Also going to have to change search bar to always take a constant 3.
May remove borders.
* Optimized imports as per clion
* Updated rustfmt to remove nightly-only features (for now)
* rustfmt
* [skip travis] Update .gitignore to ignore .idea
* Some more suggestions based on clion. Mostly removing brackets.
* Update PR template to be a bit more specific
* Update README to state what version of rust I dev on in contributions
* Update rustfmt to remove another unstable line
Added different colours to search options if selected; added F1-3 keys as an alternative for searching. Both are available, but on macOS F1-3 will be suggested instead.
description:Found something wrong or broken? If it hasn't already been filed/solved, report it!
labels:["bug"]
body:
- type:checkboxes
id:acknowledgements
attributes:
label:Checklist
options:
- label:>
I've looked through the [troubleshooting docs](https://clementtsang.github.io/bottom/nightly/troubleshooting),
[the known problems list](https://clementtsang.github.io/bottom/nightly/support/official/#known-problems), and
[existing open issues](https://github.com/ClementTsang/bottom/issues?q=is%3Aopen+is%3Aissue) for similar
issues.
required:true
- type:input
id:operating_system
attributes:
label:What operating system and version are you using?
description:>
Please provide the operating system(s) and version(s) that are experiencing the problem.
Note that issues on operating systems that [are not officially supported](https://github.com/ClementTsang/bottom#support)
may not be prioritized/resolved.
placeholder:Arch Linux 6.6.2
- type:dropdown
id:architecture
attributes:
label:What architecture are you using?
description:>
Please select the architecture(s) that are experiencing the problem.
Note that systems that [are not officially supported](https://github.com/ClementTsang/bottom#support)
may not be prioritized/resolved.
multiple:true
options:
- x86_64/AMD64
- arm64
- x86
- arm32
- Other (please specify in the Additional Information area at the end)
- type:textarea
id:terminal
attributes:
label:What terminal(s) are you running bottom on that are experiencing the problem?
description:>
Please provide what terminal(s) you are running `bottom` on (e.g. Konsole, kitty, urxvt)
that are experiencing the issue, as well as their version and any relevant settings (e.g. terminal theme).
placeholder:kitty 0.25.2
- type:dropdown
id:filesystem
validations:
required:false
attributes:
label:(Optional) What filesystem(s) are you using?
description:>
If you know, please select what filesystem(s) you are using on the system that is experiencing the problem. This
can be especially helpful if the issue is related to either the disk or memory widgets.
multiple:true
options:
- ext4
- NTFS
- exFAT
- FAT
- ZFS
- Btrfs
- APFS
- Other (please specify in the Additional Information area at the end)"
- type:input
id:version
validations:
required:true
attributes:
label:What version of bottom are you running?
description:>
Please specify which version of `bottom` you're running that is causing problems. You can find this with
`btm -V`. If you are using a nightly/non-release version, please also specify that.
It would also be helpful if you are not running [the latest version](https://github.com/ClementTsang/bottom/releases/latest)
to try that as well to see if the issue has already been resolved.
placeholder:0.11.1
- type:textarea
id:install
validations:
required:true
attributes:
label:How did you install bottom?
description:>
Please describe how you installed `bottom`. If you manually compiled it, please also mention your _Rust version_.
**Note:if you installed `bottom` from cargo, please ensure that you installed the right crate (https://crates.io/crates/bottom).**
placeholder:Installed bottom through the Arch official repos.
# TODO: After some point also add in a `btm check` invocation
- type:textarea
id:description
validations:
required:true
attributes:
label:Describe the issue
description:>
Give a description of the issue. If possible, provide screenshots/videos.
placeholder:|
Example:
bottom is failing to output information for a mounted encrypted partition on basic mode. It should be able to report this information, but I'm not seeing the entry at all.
- type:textarea
id:expected
validations:
required:true
attributes:
label:What is the expected behaviour?
description:>
Describe the behaviour you expected.
placeholder:|
Example:
I expect to be able to see information about the encrypted partition on basic mode.
- type:textarea
id:actual
validations:
required:true
attributes:
label:What is the actual behaviour?
description:>
Describe the behaviour you actually see. If possible, provide screenshots/videos.
placeholder:|
Example:
I am unable to see information about my encrypted partition.
- type:textarea
id:reproduce
validations:
required:true
attributes:
label:How can we reproduce this?
description:>
Provide detailed steps on _how_ to reproduce your problem, to the best of your ability. Be as detailed as
possible. Include any config files or flags used. If possible, provide screenshots/videos of the issue.
Remember - if maintainers cannot reproduce the issue, it will be very hard to fix!
placeholder:|
Example:
1. Mount a LUKS encrypted partition.
2. Run `btm --basic`
3. Observe there is no partition shown.
- type:textarea
id:additional
attributes:
label:Additional information
description:Provide any additional information you think may be relevant or helpful.
placeholder:It works fine if I just run it normally without the `--basic` flag.
Got a question about using bottom? Need help troubleshooting something? Or maybe just talk about something related to bottom? Feel free to open a discussion!
description:For issues, questions, or requests regarding packaging or distribution.
labels:["packaging"]
body:
- type:markdown
attributes:
value:>
If this is an issue about supporting a new package/installation method for a platform you use, please
consider maintaining it yourself/with others and submitting a PR or issue with a link to it - they'll be
very much appreciated and likely added to the README quickly. [The documentation on packaging/distribution](https://clementtsang.github.io/bottom/nightly/contribution/packaging-and-distribution/)
may be helpful in setting things up. If there are some issues with bottom itself causing problems with
packaging, feel free to open an appropriate issue.
If this is an issue regarding a specific existing distribution channel, feel free to report issues here if they
are related to the following sources:
*[crates.io](https://crates.io/crates/bottom)
*[Binary releases/packages released on GitHub](https://github.com/ClementTsang/bottom/releases)
For any other distribution channel, please first try to contact the package maintainers where appropriate
to get help regarding distribution-specific issues (e.g. the package has issues installing, the package
is outdated, etc.) before reaching out here. While I am happy to help where possible, I do not
personally use many of the various ways people distribute bottom. As such, I might lack the
platform-specific context, knowledge, or tools to be able to help you at all regarding the
distribution method, and the best I can do is just point you to the package maintainer.
- type:checkboxes
id:acknowledgements
attributes:
label:Checklist
options:
- label:>
I have read and understood the above text.
required:true
- type:textarea
id:description
validations:
required:true
attributes:
label:Describe the issue
description:>
What is the packaging-related issue? Please be clear and concise.
placeholder:|
Example:Would it be possible to add shell completion generation as a separate build artifact?
_A description of the change, what it does, and why it was made. If relevant (such as any change that modifies the UI), **please provide screenshots** of the changes:_
## Issue
_If applicable, what issue does this address?_
Closes: #
## Testing
_If relevant, please state how this was tested. All changes **must** be tested to work:_
_If this is a code change, please also indicate which platforms were tested:_
- [ ] _Windows_
- [ ] _macOS_
- [ ] _Linux_
## Checklist
_If relevant, ensure the following have been met:_
- [ ] _Areas your change affects have been linted using rustfmt (`cargo fmt`)_
- [ ] _The change has been tested and doesn't appear to cause any unintended breakage_
- [ ] _Documentation has been added/updated if needed (`README.md`, help menu, doc pages, etc.)_
- [ ] _The pull request passes the provided CI pipeline_
- [ ] _There are no merge conflicts_
- [ ] _If relevant, new tests were added (don't worry too much about coverage)_
All notable changes to this project will be documented in this file. The format is based on
[Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
Versioning for this project is based on [Semantic Versioning](https://semver.org/spec/v2.0.0.html). More specifically:
**Pre 1.0.0 (current)**:
- Patch versions should aim to only contain bug fixes or non-breaking features/changes.
- Minor versions may break things.
**Post 1.0.0**:
- Patch versions should only contain bug fixes.
- Minor versions should only contain forward-compatible features/changes.
- Major versions may break things.
That said, these are more guidelines rather than hardset rules, though the project will generally try to follow them.
---
## [0.12.0] - Unreleased
### Features
- [#1793](https://github.com/ClementTsang/bottom/pull/1793): Add support for threads in Linux.
- [#1719](https://github.com/ClementTsang/bottom/pull/1719): Support ignoring all keypresses.
### Bug Fixes
- [#1800](https://github.com/ClementTsang/bottom/pull/1800): Fix colon at end of process name in Linux.
- [#1804](https://github.com/ClementTsang/bottom/pull/1804): Draw average CPU last again.
## [0.11.1] - 2025-08-15
### Bug Fixes
- [#1776](https://github.com/ClementTsang/bottom/pull/1776): Fix `disk.columns` being incorrectly interpreted as blank.
- [#1787](https://github.com/ClementTsang/bottom/pull/1787): Fix issue with battery widget time and small widths.
### Other
- [#1779](https://github.com/ClementTsang/bottom/pull/1779), [#1788](https://github.com/ClementTsang/bottom/pull/1788): Speed up time between startup and displaying data.
## [0.11.0] - 2025-08-05
### Features
- [#1625](https://github.com/ClementTsang/bottom/pull/1625): Add the ability to configure the disk widget's table columns.
- [#1641](https://github.com/ClementTsang/bottom/pull/1641) + [#1692](https://github.com/ClementTsang/bottom/pull/1692): Support AMD GPU data collection on Linux.
- [#1642](https://github.com/ClementTsang/bottom/pull/1642): Support changing the widget borders.
- [#1717](https://github.com/ClementTsang/bottom/pull/1717): Support delete key (fn + delete on macOS) to kill processes.
- [#1306](https://github.com/ClementTsang/bottom/pull/1306): Support using left/right key to collapse/expand process trees respectively.
- [#1767](https://github.com/ClementTsang/bottom/pull/1767): Add a virtual memory column for processes.
- [#1770](https://github.com/ClementTsang/bottom/pull/1770) (originally [#1627](https://github.com/ClementTsang/bottom/pull/1627)): Add option to have process tree entries be collapsed by default.
### Bug Fixes
- [#1551](https://github.com/ClementTsang/bottom/pull/1551): Fix missing parent section names in default config.
- [#1552](https://github.com/ClementTsang/bottom/pull/1552): Fix typo in default config.
- [#1565](https://github.com/ClementTsang/bottom/pull/1565): Fix issue where CPU usage in basic mode looks weird if core count isn't divisible by four.
- [#1578](https://github.com/ClementTsang/bottom/pull/1578): Fix missing selected text background colour in `default-light` theme.
- [#1593](https://github.com/ClementTsang/bottom/pull/1593): Fix using `"none"` for chart legend position in configs.
- [#1594](https://github.com/ClementTsang/bottom/pull/1594): Fix incorrect default config definitions for chart legends.
- [#1596](https://github.com/ClementTsang/bottom/pull/1596): Fix support for nilfs2 file system.
- [#1660](https://github.com/ClementTsang/bottom/pull/1660): Fix properly cleaning up the terminal if the program is terminated due to an `Err` bubbling to the top.
- [#1663](https://github.com/ClementTsang/bottom/pull/1663): Fix network graphs using log scaling having broken lines when a point was 0.
- [#1667](https://github.com/ClementTsang/bottom/pull/1667): Fix for ARC/SWAP not being hidden in basic mode after refactor.
- [#1683](https://github.com/ClementTsang/bottom/pull/1683): Fix graph lines potentially showing up behind legends.
- [#1701](https://github.com/ClementTsang/bottom/pull/1701): Fix process kill dialog occasionally causing panics.
- [#1755](https://github.com/ClementTsang/bottom/pull/1755): Fix missing stats/incorrect mount name for certain entries in the disk widget.
- [#1759](https://github.com/ClementTsang/bottom/pull/1759): Fix increment for data tables if the change is greater than the number of entries left.
### Changes
- [#1559](https://github.com/ClementTsang/bottom/pull/1559): Rename `--enable_gpu` to `--disable_gpu`, and make GPU features enabled by default.
- [#1570](https://github.com/ClementTsang/bottom/pull/1570): Consider `$XDG_CONFIG_HOME` on macOS when looking for a default config path in a backwards-compatible fashion.
- [#1686](https://github.com/ClementTsang/bottom/pull/1686): Allow hyphenated arguments to work as well (e.g. `--autohide-time`).
- [#1701](https://github.com/ClementTsang/bottom/pull/1701): Redesign process kill dialog.
- [#1706](https://github.com/ClementTsang/bottom/pull/1706): Disable mouse capture when `disable_click` is set.
- [#1769](https://github.com/ClementTsang/bottom/pull/1769): Change how we calculate swap usage in Windows.
### Other
- [#1655](https://github.com/ClementTsang/bottom/pull/1655): Better handle NVIDIA GPUs on Linux with only libnvidia-ml.so.1.
- [#1658](https://github.com/ClementTsang/bottom/pull/1658): Make it possible to override completion/manpage generation output directory via env.
- [#1663](https://github.com/ClementTsang/bottom/pull/1663): Rework how data is stored internally, reducing memory usage a bit.
- [#1487](https://github.com/ClementTsang/bottom/pull/1487): Add option to move the AVG CPU bar to another row in basic mode.
### Bug Fixes
- [#1541](https://github.com/ClementTsang/bottom/pull/1541): Fix some process details not updating for macOS and Windows.
- [#1542](https://github.com/ClementTsang/bottom/pull/1542): Fix confusing process run times being reported on macOS.
- [#1543](https://github.com/ClementTsang/bottom/pull/1543): Fix the `--default_cpu_entry` argument not being checked.
## [0.10.1] - 2024-08-01
### Bug Fixes
- [#1526](https://github.com/ClementTsang/bottom/pull/1526): Fix `--help` description being incorrectly set for a flag, breaking the output.
## [0.10.0] - 2024-08-01
### Features
- [#1276](https://github.com/ClementTsang/bottom/pull/1276): Add GPU process info.
- [#1353](https://github.com/ClementTsang/bottom/pull/1353): Support selecting the average CPU graph as a default.
- [#1373](https://github.com/ClementTsang/bottom/pull/1373): Add support for bcachefs in disk widget.
- [#1430](https://github.com/ClementTsang/bottom/pull/1430): Support controlling the graph legend position for memory and network graph widgets.
- [#1512](https://github.com/ClementTsang/bottom/pull/1512): Support bold text styling options.
- [#1514](https://github.com/ClementTsang/bottom/pull/1514): Support italic text styling options.
### Changes
- [#1276](https://github.com/ClementTsang/bottom/pull/1276): NVIDIA GPU functionality is now tied behind the `--enable_gpu` flag. This will likely be changed in the future.
- [#1344](https://github.com/ClementTsang/bottom/pull/1344): Change the `group` command line-argument to `group_processes` for consistency with the config file option.
- [#1376](https://github.com/ClementTsang/bottom/pull/1376): Group together related command-line arguments in `-h` and `--help`.
- [#1411](https://github.com/ClementTsang/bottom/pull/1411): Add `time` as a default column.
- [#1436](https://github.com/ClementTsang/bottom/pull/1436): Use actual "swap" value for Windows.
- [#1441](https://github.com/ClementTsang/bottom/pull/1441): The following arguments have changed names:
- `--left_legend/-l` is now `--cpu_left_legend`.
- [#1441](https://github.com/ClementTsang/bottom/pull/1441): The following config fields have changed names:
- `expanded_on_startup` is now `expanded`.
- `left_legend` is now `cpu_left_legend`.
- [#1458](https://github.com/ClementTsang/bottom/pull/1458): Fix a bug with `--hide_table_gap` with the battery widget.
- [#1472](https://github.com/ClementTsang/bottom/pull/1472): The following arguments have changed names:
- `--mem_as_value` is now `process_memory_as_value`.
- [#1472](https://github.com/ClementTsang/bottom/pull/1472): The following config fields have changed names:
- `mem_as_value` is now `process_memory_as_value`.
- [#1481](https://github.com/ClementTsang/bottom/pull/1481): The following config fields have changed names:
- `disk_filter` is now `disk.name_filter`.
- `mount_filter` is now `disk.mount_filter`.
- `temp_filter` is now `temperature.sensor_filter`
- `net_filter` is now `network.interface_filter`
- [#1499](https://github.com/ClementTsang/bottom/pull/1499): Redesign how styling is configured.
- [#1499](https://github.com/ClementTsang/bottom/pull/1499): The following arguments have changed names:
- `--colors` is now `--theme`
- [#1513](https://github.com/ClementTsang/bottom/pull/1513): Table headers are now bold by default.
- [#1515](https://github.com/ClementTsang/bottom/pull/1515): Show the config path in the error message if unable to read/create a config.
- [#1682](https://github.com/ClementTsang/bottom/pull/1682): On Linux, temperature sensor labels now always have their first letter capitalized (e.g. "k10temp: tctl" -> "k10temp: Tctl").
### Bug Fixes
- [#1314](https://github.com/ClementTsang/bottom/pull/1314): Fix fat32 mounts not showing up in macOS.
- [#1355](https://github.com/ClementTsang/bottom/pull/1355): Reduce chances of non-D0 devices waking up due to temperature checks on Linux.
- [#1410](https://github.com/ClementTsang/bottom/pull/1410): Fix uptime calculation for Linux.
- [#1500](https://github.com/ClementTsang/bottom/issues/1500): Fix builds for Rust 1.80.
## [0.9.6] - 2023-08-26
### Other
- [#1286](https://github.com/ClementTsang/bottom/pull/1286): Pin serde to 1.0.188 to help with potential `cargo install` issues. Note this version should be fine and not pull in binaries.
## [0.9.5] - 2023-08-26
### Other
- [#1278](https://github.com/ClementTsang/bottom/pull/1278): Pin serde to 1.0.171.
## [0.9.4] - 2023-08-05
### Features
- [#1248](https://github.com/ClementTsang/bottom/pull/1248): Add I/O counters from ZFS for Linux and FreeBSD.
### Changes
- [#1236](https://github.com/ClementTsang/bottom/pull/1236): Hide the battery tab selector if there is only one battery detected.
- [#1251](https://github.com/ClementTsang/bottom/pull/1251): Make the charge meter take the entire width of the battery widget.
### Bug Fixes
- [#1230](https://github.com/ClementTsang/bottom/pull/1230): Fix core dump if the terminal is closed while bottom is open.
- [#1245](https://github.com/ClementTsang/bottom/pull/1245): Fix killing processes in Windows leaving a handle open.
- [#1264](https://github.com/ClementTsang/bottom/pull/1264): Fix ARC usage showing max system memory instead of max ARC size.
## [0.9.3] - 2023-06-25
### Features
- [#1221](https://github.com/ClementTsang/bottom/pull/1221): Support human times for `rate`.
### Bug Fixes
- [#1216](https://github.com/ClementTsang/bottom/pull/1216): Fix arguments not being sorted alphabetically.
- [#1219](https://github.com/ClementTsang/bottom/pull/1219): Fix overflow/underflow in graph timespan zoom.
- [#1220](https://github.com/ClementTsang/bottom/pull/1220): Update documentation for features supporting human times.
## [0.9.2] - 2023-06-11
### Features
- [#1172](https://github.com/ClementTsang/bottom/pull/1172): Support human times for `time_delta` and `default_time_value`.
- [#1187](https://github.com/ClementTsang/bottom/pull/1187): Use better names for duplicate temp sensors found by `/sys/class/thermal`.
- [#1188](https://github.com/ClementTsang/bottom/pull/1188): Also check `/sys/devices/platform/coretemp.*` for temp sensors.
### Bug Fixes
- [#1186](https://github.com/ClementTsang/bottom/pull/1186): Fix for temperature sensor data gathering on Linux immediately halting if any method failed.
- [#1191](https://github.com/ClementTsang/bottom/pull/1191): Fix ntfs3 mounts not being counted as a physical drive type.
- [#1195](https://github.com/ClementTsang/bottom/pull/1195): Fix battery health being incorrectly reported on M1 macOS.
- [#1188](https://github.com/ClementTsang/bottom/pull/1188): Don't fail fast with temperature sensor name generation on Linux.
### Other
- [#1199](https://github.com/ClementTsang/bottom/pull/1199): bottom should build on `aarch64-linux-android` with features disabled.
## [0.9.1] - 2023-05-14
### Bug Fixes
- [#1148](https://github.com/ClementTsang/bottom/pull/1148): Fix Gruvbox colour string being invalid when cache usage is enabled.
## [0.9.0] - 2023-05-10
### Features
- [#1016](https://github.com/ClementTsang/bottom/pull/1016): Add support for displaying process usernames on Windows.
- [#1022](https://github.com/ClementTsang/bottom/pull/1022): Support three-character hex colour strings for styling.
- [#1024](https://github.com/ClementTsang/bottom/pull/1024): Support FreeBSD temperature sensors based on `hw.temperature`.
- [#1063](https://github.com/ClementTsang/bottom/pull/1063): Add buffer and cache memory tracking.
- [#1106](https://github.com/ClementTsang/bottom/pull/1106): Add current battery charging state.
- [#1115](https://github.com/ClementTsang/bottom/pull/1115): Add customizable process columns to config file.
- [#801](https://github.com/ClementTsang/bottom/pull/801): Add optional process time column and querying.
### Changes
- [#1025](https://github.com/ClementTsang/bottom/pull/1025): Officially support M1 macOS.
- [#1035](https://github.com/ClementTsang/bottom/pull/1035): Migrate away from heim for CPU information.
- [#1036](https://github.com/ClementTsang/bottom/pull/1036): Migrate away from heim for memory information; bottom will now try to use `MemAvailable` on Linux to determine used memory.
- [#1041](https://github.com/ClementTsang/bottom/pull/1041): Migrate away from heim for network information.
- [#1064](https://github.com/ClementTsang/bottom/pull/1064): Migrate away from heim for storage information.
- [#812](https://github.com/ClementTsang/bottom/issues/812): Fully remove heim from bottom.
- [#1075](https://github.com/ClementTsang/bottom/issues/1075): Update how drives are named in Windows.
- [#1106](https://github.com/ClementTsang/bottom/pull/1106): Rename battery consumption field to rate.
### Bug Fixes
- [#1021](https://github.com/ClementTsang/bottom/pull/1021): Fix selected text background colour being wrong if only the foreground colour was set.
- [#1037](https://github.com/ClementTsang/bottom/pull/1037): Fix `is_list_ignored` accepting all results if set to `false`.
- [#1064](https://github.com/ClementTsang/bottom/pull/1064): Disk name/mount filter now doesn't always show all entries if one filter wasn't set.
- [#1064](https://github.com/ClementTsang/bottom/pull/1064): macOS disk I/O is potentially working now.
- [#597](https://github.com/ClementTsang/bottom/issues/597): Resolve RUSTSEC-2021-0119 by removing heim.
### Other
- [#1100](https://github.com/ClementTsang/bottom/pull/1100): Speed up first draw and first data collection.
- [#1107](https://github.com/ClementTsang/bottom/pull/1107): Update to clap v4.
- [#1111](https://github.com/ClementTsang/bottom/pull/1111): Update to regex [1.8.0](https://github.com/rust-lang/regex/blob/93316a3b1adc43cc12fab6c73a59f646658cd984/CHANGELOG.md#180-2023-04-20), supporting more escapable characters and named captures.
## [0.8.0] - 2023-01-22
### Features
- [#950](https://github.com/ClementTsang/bottom/pull/950): Split usage into both usage percentage and usage value.
### Changes
- [#974](https://github.com/ClementTsang/bottom/pull/974): Hide battery duration section if the value is unknown. Also update shortened text.
- [#975](https://github.com/ClementTsang/bottom/pull/975): Automatically hide the battery widget if no batteries are found but `--battery` is enabled.
### Bug Fixes
- [#950](https://github.com/ClementTsang/bottom/pull/950): Update help menu for disk and temperature widgets with sorting support.
- [#994](https://github.com/ClementTsang/bottom/pull/994): Fix time graph labels not being styled.
### Other
- [#969](https://github.com/ClementTsang/bottom/pull/969): Follow Debian conventions for naming generated `.deb` binaries.
## [0.7.1] - 2023-01-06
### Bug Fixes
- [#950](https://github.com/ClementTsang/bottom/pull/950): Fix invalid sorting order for disk usage percentage.
- [#952](https://github.com/ClementTsang/bottom/pull/952), [#960](https://github.com/ClementTsang/bottom/pull/960): Partially fix battery text getting cut off in small windows.
- [#953](https://github.com/ClementTsang/bottom/pull/953): Fix CPU widget's 'all' label being missing on small sizes.
### Other
- [#951](https://github.com/ClementTsang/bottom/pull/951): Nightly builds now have their version number (`btm -V`) tagged with the commit hash.
## [0.7.0] - 2022-12-31
### Features
- [#676](https://github.com/ClementTsang/bottom/pull/676): Add support for NVIDIA GPU temperature sensors.
- [#760](https://github.com/ClementTsang/bottom/pull/760): Add a check for whether bottom is being run in a terminal.
- [#794](https://github.com/ClementTsang/bottom/pull/794): Add GPU memory support for NVIDIA GPUs.
- [#806](https://github.com/ClementTsang/bottom/pull/806): Update sysinfo to support M1 macOS temperature sensors.
- [#836](https://github.com/ClementTsang/bottom/pull/836): Add CLI options for GPU memory.
- [#841](https://github.com/ClementTsang/bottom/pull/841): Add page up/page down support for the help screen.
- [#868](https://github.com/ClementTsang/bottom/pull/868): Make temperature widget sortable.
- [#870](https://github.com/ClementTsang/bottom/pull/870): Make disk widget sortable.
- [#881](https://github.com/ClementTsang/bottom/pull/881): Add pasting to the search bar.
- [#892](https://github.com/ClementTsang/bottom/pull/892): Add custom retention periods for data.
- [#899](https://github.com/ClementTsang/bottom/pull/899), [#910](https://github.com/ClementTsang/bottom/pull/910), [#912](https://github.com/ClementTsang/bottom/pull/912): Add non-normalized CPU usage to processes.
- [#919](https://github.com/ClementTsang/bottom/pull/919): Add an option to expand the default widget on startup.
### Changes
- [#690](https://github.com/ClementTsang/bottom/pull/690): Add some colour to `-h`/`--help` as part of updating to clap 3.0.
- [#726](https://github.com/ClementTsang/bottom/pull/726): Add ARM musl binary build tasks.
- [#807](https://github.com/ClementTsang/bottom/pull/807): Add more human friendly temperature sensor names for Linux.
- [#916](https://github.com/ClementTsang/bottom/pull/916), [#937](https://github.com/ClementTsang/bottom/pull/937): Improve CPU usage by optimizing draw logic of charts and tables.
### Bug Fixes
- [#711](https://github.com/ClementTsang/bottom/pull/711): Fix building in Rust beta 1.61 due to `as_ref()` calls causing type inference issues.
- [#717](https://github.com/ClementTsang/bottom/pull/717): Fix clicking on empty space in tables selecting the very last entry of a list in some cases.
- [#720](https://github.com/ClementTsang/bottom/pull/720): Fix panic if battery feature was disabled during compilation.
- [#805](https://github.com/ClementTsang/bottom/pull/805): Fix bottom keeping devices awake in certain scenarios.
- [#825](https://github.com/ClementTsang/bottom/pull/825): Use alternative method of getting parent PID in some cases on macOS devices to avoid needing root access.
- [#916](https://github.com/ClementTsang/bottom/pull/916): Fix possible gaps with widget layout spacing.
- [#938](https://github.com/ClementTsang/bottom/pull/938): Fix search scrolling with wider Unicode characters.
## [0.6.8] - 2022-02-01
### Bug Fixes
- [#655](https://github.com/ClementTsang/bottom/pull/669): Fix a bug where the number of CPUs is never refreshed.
## [0.6.7] - 2022-01-31
### Features
- [#646](https://github.com/ClementTsang/bottom/pull/646): Add `PgUp`/`PgDown` keybind support to scroll up and down a page in a table.
### Bug Fixes
- [#655](https://github.com/ClementTsang/bottom/pull/665): Fix bug where the program would stall in an infinite loop if the width of the terminal was too small.
- [#627](https://github.com/ClementTsang/bottom/pull/627): Fix `process_command` breaking process widget sorting.
### Internal Changes
- [#608](https://github.com/ClementTsang/bottom/pull/608): Add codecov integration to pipeline.
## [0.6.4] - 2021-09-12
### Changes
- [#557](https://github.com/ClementTsang/bottom/pull/557): Add '/s' to network usage legend to better indicate that it's a per-second change.
### Bug Fixes
- [#575](https://github.com/ClementTsang/bottom/pull/575): Updates the procfs library to not crash on kernel version >255.
### Internal Changes
- [#551](https://github.com/ClementTsang/bottom/pull/551): Disable AUR package generation in release pipeline since it's now in community.
- [#570](https://github.com/ClementTsang/bottom/pull/570): Make battery features optional in compilation.
## [0.6.3] - 2021-07-18
### Changes
- [#547](https://github.com/ClementTsang/bottom/pull/547): Switch Linux memory usage calculation to match htop.
### Bug Fixes
- [#536](https://github.com/ClementTsang/bottom/pull/536): Prevent tests from creating a config file.
- [#542](https://github.com/ClementTsang/bottom/pull/542): Fix missing config options in the default generated config file.
- [#545](https://github.com/ClementTsang/bottom/pull/545): Fix inaccurate memory usage/totals in macOS and Linux, switch unit to binary prefix.
## [0.6.2] - 2021-06-26
### Features
- [#518](https://github.com/ClementTsang/bottom/pull/518): Add `F9` key as an alternative process kill key.
### Bug Fixes
- [#504](https://github.com/ClementTsang/bottom/pull/504): Fix two bugs causing the battery widget colours and mouse events to be broken.
- [#525](https://github.com/ClementTsang/bottom/pull/525): Fix Windows process CPU usage not being divided by the number of cores.
### Internal Changes
- [#506](https://github.com/ClementTsang/bottom/pull/506): Migrate a large portion of documentation over to mkdocs.
## [0.6.1] - 2021-05-11
### Bug Fixes
- [#473](https://github.com/ClementTsang/bottom/pull/473): Fix missing string creation for memory usage in collapsed entries.
## [0.6.0] - 2021-05-09
### Features
- [#263](https://github.com/ClementTsang/bottom/pull/263): Add the option for fine-grained kill signals on Unix-like systems.
- [#333](https://github.com/ClementTsang/bottom/pull/333): Add an "out of" indicator that can be enabled using `--show_table_scroll_position` (and its corresponding config option) to help keep track of scrolled position.
- [#379](https://github.com/ClementTsang/bottom/pull/379): Add `--process_command` flag and corresponding config option to default to showing a process' command.
- [#381](https://github.com/ClementTsang/bottom/pull/381): Add a filter in the config file for network interfaces.
- [#392](https://github.com/ClementTsang/bottom/pull/392): Add CPU load averages (1, 5, 15) for Unix-based systems.
- [#406](https://github.com/ClementTsang/bottom/pull/406): Add the Nord colour scheme, as well as a light variant.
- [#409](https://github.com/ClementTsang/bottom/pull/409): Add `Ctrl-w` and `Ctrl-h` shortcuts in search, to delete a word and delete a character respectively.
- [#413](https://github.com/ClementTsang/bottom/pull/413): Add mouse support for sorting process columns.
- [#425](https://github.com/ClementTsang/bottom/pull/425): Add user into the process widget for Unix-based systems.
- [#437](https://github.com/ClementTsang/bottom/pull/437): Redo dynamic network y-axis, add linear scaling, unit type, and prefix options.
- [#445](https://github.com/ClementTsang/bottom/pull/445): Add collapsing in tree mode sums usage to parent.
### Changes
- [#372](https://github.com/ClementTsang/bottom/pull/372): Hide the SWAP graph and legend in normal mode if SWAP is 0.
- [#390](https://github.com/ClementTsang/bottom/pull/390): macOS shouldn't need elevated privileges to see CPU usage on all processes now.
- [#391](https://github.com/ClementTsang/bottom/pull/391): Show degree symbol on Celsius and Fahrenheit.
- [#418](https://github.com/ClementTsang/bottom/pull/418): Removed automatically jumping to the top of the list for process sort shortcuts. The standard behaviour is to now stay in place.
- [#420](https://github.com/ClementTsang/bottom/pull/420): Updated tui-rs, allowing for prettier looking tables!
- [#437](https://github.com/ClementTsang/bottom/pull/437): Add linear interpolation step in drawing step to pr event missing entries on the right side of charts.
- [#443](https://github.com/ClementTsang/bottom/pull/443): Make process widget consistent with disk widget in using decimal prefixes (kilo, mega, etc.) for writes/reads.
- [#449](https://github.com/ClementTsang/bottom/pull/449): Add decimal place to actual memory usage in process widget for values greater or equal to 1GiB.
- [#450](https://github.com/ClementTsang/bottom/pull/450): Tweak `default-light` colour scheme to look less terrible on white terminals.
- [#451](https://github.com/ClementTsang/bottom/pull/451): Add decimal place to disk values larger than 1GB for total read/write in process widgets, and read/write per second in process widgets and disk widgets.
- [#455](https://github.com/ClementTsang/bottom/pull/455): Add a mount point filter for the disk widget. Also tweaked how the filter system works - see the PR for details.
### Bug Fixes
- [#416](https://github.com/ClementTsang/bottom/pull/416): Fix grouped vs ungrouped modes in the processes widget having inconsistent spacing.
- [#417](https://github.com/ClementTsang/bottom/pull/417): Fix the sort menu and sort shortcuts not syncing up.
- [#423](https://github.com/ClementTsang/bottom/pull/423): Fix disk encryption causing the disk widget to fail or not properly map I/O statistics.
- [#425](https://github.com/ClementTsang/bottom/pull/425): Fixed a bug allowing grouped mode in tree mode if already in grouped mode.
- [#467](https://github.com/ClementTsang/bottom/pull/467): Switched CPU usage data source to fix a bug on Windows where occasionally CPU usage would be stuck at 0%.
## [0.5.7] - 2021-01-30
### Bug Fixes
- [#373](https://github.com/ClementTsang/bottom/pull/373): Fix incorrect colours being used the CPU widget in basic mode.
- [#386](https://github.com/ClementTsang/bottom/pull/386): Fix `hide_table_gap` not working in the battery widget.
- [#389](https://github.com/ClementTsang/bottom/pull/389): Fix the sorting arrow disappearing in proc widget under some cases.
- [#398](https://github.com/ClementTsang/bottom/pull/398): Fix basic mode failing to report CPUs if there are less than 4 entries to report.
## [0.5.6] - 2020-12-17
### Bug Fixes
- [#361](https://github.com/ClementTsang/bottom/pull/361): Fix temperature sensors not working on non-Linux platforms.
## [0.5.5] - 2020-12-14
### Bug Fixes
- [#349](https://github.com/ClementTsang/bottom/pull/349): Fix CPU graph colours not matching the legend in the "all" state.
## [0.5.4] - 2020-12-10
### Changes
- [#344](https://github.com/ClementTsang/bottom/pull/344): Removed the `--debug` option for now.
### Bug Fixes
- [#344](https://github.com/ClementTsang/bottom/pull/344): Fix a performance regression causing high memory and CPU usage over time.
- [#345](https://github.com/ClementTsang/bottom/pull/345): Fix process states not showing.
## [0.5.3] - 2020-11-26
### Bug Fixes
- [#331](https://github.com/ClementTsang/bottom/pull/331): Fix custom battery colour levels being inverted.
## [0.5.2] - 2020-11-25
### Bug Fixes
- [#327](https://github.com/ClementTsang/bottom/pull/327): Fix `hide_avg_cpu` being inverted in config files.
## [0.5.1] - 2020-11-22
### Bug Fixes
- [6ef1d66](https://github.com/ClementTsang/bottom/commit/6ef1d66b2bca49452572a2cabb87d338dcf56e7b): Remove nord as a valid colour for now.
- [99d0402](https://github.com/ClementTsang/bottom/commit/99d04029f0ebfc73d36adb06ea58ad68f090017c): Fix config detection for built-in colours.
## [0.5.0] - 2020-11-20
### Features
- [#206](https://github.com/ClementTsang/bottom/pull/206): Adaptive network graphs --- prior to this update, graphs were stuck at a range from 0B to 1GiB. Now, they adjust to your current usage and time span, so if you're using, say, less than a MiB, it will cap at a MiB. If you're using 10GiB, then the graph will reflect that and span to a bit greater than 10GiB.
- [#208](https://github.com/ClementTsang/bottom/pull/208): Mouse support for tables and moving to widgets.
- [#217](https://github.com/ClementTsang/bottom/pull/217): (Kinda) ARM support.
- [#220](https://github.com/ClementTsang/bottom/pull/220): Add ability to hide specific temperature and disk entries via config.
- [#223](https://github.com/ClementTsang/bottom/pull/223): Add tree mode for processes.
- [#312](https://github.com/ClementTsang/bottom/pull/312): Add a `tree` flag to default to the tree mode.
- [#269](https://github.com/ClementTsang/bottom/pull/269): Add simple indicator for when data updating is frozen.
- [#309](https://github.com/ClementTsang/bottom/pull/309): Add a `mem_as_value` flag to default displaying process memory as value rather than percentage.
### Changes
- [#213](https://github.com/ClementTsang/bottom/pull/213), [#214](https://github.com/ClementTsang/bottom/pull/214): Updated help descriptions, added auto-complete generation.
- [#296](https://github.com/ClementTsang/bottom/pull/296): Changed how we do battery theming. We now only set high, medium, and low colours, and we deal with the ratios.
### Bug Fixes
- [#211](https://github.com/ClementTsang/bottom/pull/211): Fix a bug where you could move down in the process widget even if the process widget search was closed.
- [#215](https://github.com/ClementTsang/bottom/pull/215): Add labels to Linux temperature values.
- [#224](https://github.com/ClementTsang/bottom/pull/224): Implements sorting by count. It previously did absolutely nothing.
- [#238](https://github.com/ClementTsang/bottom/pull/238): Fix being able to cause an index out-of-bounds by resizing
to a smaller terminal _just_ after the program got the terminal size, but right before the terminal started drawing.
- [#238](https://github.com/ClementTsang/bottom/pull/238): Fixed not clearing screen before drawing, which caused issues for some environments.
- [#253](https://github.com/ClementTsang/bottom/pull/253): Fix highlighted entries being stuck in another colour when the widget is not selected.
- [#253](https://github.com/ClementTsang/bottom/pull/253), [#266](https://github.com/ClementTsang/bottom/pull/266): Expanding a widget no longer overrides the widget/dialog title colour.
- [#261](https://github.com/ClementTsang/bottom/pull/261): Fixed process names occasionally showing up as truncated, due to only using `/proc/<PID>/stat` as our data source.
- [#262](https://github.com/ClementTsang/bottom/pull/262): Fixed missing thread termination steps as well as improper polling causing blocking in input thread.
- [#289](https://github.com/ClementTsang/bottom/pull/289): Fixed the CPU basic widget showing incorrect data due to an incorrect offset when displaying the data.
- [#290](https://github.com/ClementTsang/bottom/pull/290): Fixed an incorrect offset affecting the CPU colour when scrolling.
- [#291](https://github.com/ClementTsang/bottom/pull/291): Fixed spacing problems in basic CPU mode.
- [#296](https://github.com/ClementTsang/bottom/pull/296): Fixed an incorrect offset affecting the graph CPU colour mismatching the legend.
- [#296](https://github.com/ClementTsang/bottom/pull/296): Removes an accidental extra comma in one of the headers in the disk widget.
- [#308](https://github.com/ClementTsang/bottom/pull/308): Removes the automatically generated CPU colours method.
## [0.4.7] - 2020-08-26
### Bug Fixes
- [#204](https://github.com/ClementTsang/bottom/pull/204): Fix searching by command name being broken.
## [0.4.6] - 2020-08-25
### Features
- [#179](https://github.com/ClementTsang/bottom/pull/179): Show full command/process path as an option.
- [#183](https://github.com/ClementTsang/bottom/pull/183): Added sorting capabilities to any column.
- [#188](https://github.com/ClementTsang/bottom/pull/188): Add (estimated) memory usage values, toggle this from percent to values for processes with `%`.
- [#196](https://github.com/ClementTsang/bottom/pull/196): Support searching processes by process state.
- Added `WASD` as an alternative widget movement system.
- [#198](https://github.com/ClementTsang/bottom/pull/198): Allow `e` to also escape expanded mode.
### Changes
- [#181](https://github.com/ClementTsang/bottom/pull/181): Changed to just support stable (and newer) Rust, due to library incompatibilities.
- [#182](https://github.com/ClementTsang/bottom/pull/182): For macOS, support `$HOME/Library/Application Support` instead of `$HOME/.config` for config files. For backwards compatibility's sake, for macOS, this will still check `.config` if it exists first, but otherwise, it will default to the new location.
### Bug Fixes
- [#183](https://github.com/ClementTsang/bottom/pull/183): Fixed bug in basic mode where the battery widget was placed incorrectly.
- [#186](https://github.com/ClementTsang/bottom/pull/186): Fixed a bug caused by hitting `Enter` when a process kill fails, breaking future process kills.
- [#187](https://github.com/ClementTsang/bottom/pull/187): Fix bug caused by incorrectly reading the `/proc/{pid}/stats` file.
## [0.4.5] - 2020-07-08
- No changes in this update, just an uptick for Crates.io using the wrong Cargo.lock.
## [0.4.4] - 2020-07-06
### Features
- [#114](https://github.com/ClementTsang/bottom/pull/114): Show process state per process (originally in 0.4.0, moved to later). This only shows if the processes are not merged together; I couldn't think of a nice way to show it when grouped together, unfortunately.
### Changes
- [#156](https://github.com/ClementTsang/bottom/issues/156) - Removal of the `/` CPU core showing in the chart. It felt clunky to use, was not really useful, and hard to work with large core counts.
Furthermore:
- `show_disabled_data` option and flag is removed.
- Average CPU is now on by _default_. You can disable it via `-a, --hide_avg_cpu` or `hide_avg_cpu = true`.
- Make highlighted CPU persist even if widget is not selected - this should help make it easier to know what CPU you are looking at even if you aren't currently on the CPU widget.
### Bug Fixes
- [#164](https://github.com/ClementTsang/bottom/issues/164) - Fixed a bug where bottom would incorrectly read the wrong values to calculate the read/write columns for processes in Linux.
- [#165](https://github.com/ClementTsang/bottom/issues/165) - Fixed a bug where OR operations in the process query wouldn't properly for some cases.
- The process query should hopefully be a bit more usable now. There were issues with how spaces (which are treated as an AND if it was between keywords, so something like `btm cpu > 0 mem > 0` would look for a process named `btm` with cpu usage > 0 and mem usage > 0). This has been hopefully improved.
## [0.4.3] - 2020-05-15
### Other
- Update sysinfo version that fixes an overflow issue.
## [0.4.2] - 2020-05-11
### Changes
- Automatically hide time axis labels if the widget gets too small.
- Automatically hide table gap if the widget gets too small.
### Bug Fixes
- The `<Space>` character can be used as an "AND" again (properly) in queries. For example:
```bash
(btm cpu > 0) (discord mem > 0)
```
is equivalent to:
```bash
(btm AND cpu > 0) AND (discord AND mem > 0)
```
- [#151](https://github.com/ClementTsang/bottom/issues/151) - Fixed an issue where if the drive I/O label didn't match any disk, the entire disk widget would display nothing.
- Display SWAP and MEM legends even if the total amount is 0 to avoid a weird blank spot in the legend.
## [0.4.1] - 2020-05-05
### Bug Fixes
- [#146](https://github.com/ClementTsang/bottom/pull/146): Fixed a typo in the help menu (credit to [HarHarLinks](https://github.com/HarHarLinks)).
## [0.4.0] - 2020-05-04
### Features
- [#58](https://github.com/ClementTsang/bottom/issues/58): I/O stats per process.
- [#134](https://github.com/ClementTsang/bottom/pull/134): `hjkl` movement to delete dialog (credit to [andys8](https://github.com/andys8)).
- [#59](https://github.com/ClementTsang/bottom/issues/59): `Alt-h` and `Alt-l` to move left/right in query (and rest of the app actually).
- [#59](https://github.com/ClementTsang/bottom/issues/59): Added a more advanced querying system.
### Changes
- Changed default colours for highlighted borders and table headers to light blue - this is mostly to deal with Powershell colour conflicts.
- Updated the widget type keyword list to accept the following keywords as existing types:
- `"memory"`
- `"network"`
- `"process"`
- `"processes"`
- `"temperature"`
- [#117](https://github.com/ClementTsang/bottom/issues/117): Update tui to 0.9:
- Removed an (undocumented) feature in allowing modifying total RX/TX colours. This is mainly due to the legend change.
- Use custom legend-hiding to stop hiding legends for memory and network widgets.
- In addition, changed to using only legends within the graph for network, as well as redesigned the legend.
The old legend style can still be used via the `--use_old_network_legend` flag or `use_old_network_legend = true` config option.
- Allow for option to hide the header gap on tables via `--hide_table_gap` or `hide_table_gap = true`.
- [#126](https://github.com/ClementTsang/bottom/pull/126): Updated error messages to be a bit more consistent/helpful.
- [#70](https://github.com/ClementTsang/bottom/issues/70): Redesigned help menu to allow for scrolling.
- [#59](https://github.com/ClementTsang/bottom/issues/59): Moved maximization key to `e`, renamed feature to _expanding_ the widget. Done to allow for the `<Enter>` key to be used later for a more intuitive usage.
### Bug Fixes
- Fixed `dd` not working on non-first entries.
- Fixed bug where a single empty row as a layout would crash without a proper warning.
The behaviour now errors out with a more helpful message.
- Fixed bug where empty widgets in layout would cause widget movement to not work properly when moving vertically.
### Internal changes
- [#38](https://github.com/ClementTsang/bottom/issues/38): Updated arg tests and added config testing.
- Add MSRV, starting with 1.40.0.
## [0.3.0] - 2020-04-07
### Features
- [#20](https://github.com/ClementTsang/bottom/issues/20): Time scaling was added to allow users to zoom in/out based on their desired time intervals. Time markers on the charts can be hidden or automatically hidden.
- [#37](https://github.com/ClementTsang/bottom/issues/37): Automatically populate a config file if one does not exist.
- [#51](https://github.com/ClementTsang/bottom/issues/51): Modularity with widget placement or inclusion added.
### Changes
- Removed redundant dependencies.
- [#17](https://github.com/ClementTsang/bottom/issues/17): Add colouring options to the total RX/TX labels.
- [#29](https://github.com/ClementTsang/bottom/issues/29): Added `F1-F3` keys as alternatives for selecting search options
- [#42](https://github.com/ClementTsang/bottom/issues/42), [#45](https://github.com/ClementTsang/bottom/issues/45), [#35](https://github.com/ClementTsang/bottom/issues/35): Change the arrow used for sorting processes to work with other terminals.
- [#61](https://github.com/ClementTsang/bottom/issues/61): Search box changed to not block if the window is small.
- [#40](https://github.com/ClementTsang/bottom/issues/40): Rewrote README to be more clear and explicit.
- [#109](https://github.com/ClementTsang/bottom/issues/109): Sorting processes by name is case-insensitive.
### Bug Fixes
- [#33](https://github.com/ClementTsang/bottom/issues/33): Fix bug with search and graphemes bigger than a byte crashing due to the cursor.
- [#41](https://github.com/ClementTsang/bottom/issues/41): Fix bug that caused the cursor to go off-screen while searching.
- [#61](https://github.com/ClementTsang/bottom/issues/61): Dialog boxes set to be a constant width/height.
- [#80](https://github.com/ClementTsang/bottom/issues/80): Fix bug with resizing and scrolling causing issues with tables.
- [#77](https://github.com/ClementTsang/bottom/issues/77): Fixed hidden CPU entries from being scrolled to.
- [#79](https://github.com/ClementTsang/bottom/issues/79): Fixed CPU entries being a different colour if the one above it was hidden.
- [#85](https://github.com/ClementTsang/bottom/pull/85): A div-by-zero error when the memory values were zero was fixed.
### Other
- Various Travis changes.
- Scoop install option added.
## [0.2.2] - 2020-02-26
### Features
- Added support for colouring the average CPU core separately in config files.
- [#15](https://github.com/ClementTsang/bottom/issues/15) - Added support for (some) named colours and RGB values in config files.
### Bug Fixes
- [#28](https://github.com/ClementTsang/bottom/issues/30): Fixed broken Cargo.toml for Cargo installs.
- Fixed Windows issue with shift key.
- [#14](https://github.com/ClementTsang/bottom/issues/14): Ignore certain characters in search
## [0.2.1] - 2020-02-21
### Bug Fixes
- [#14](https://github.com/ClementTsang/bottom/issues/11): Fixed default config paths not being read properly.
## [0.2.0] - 2020-02-20
### Features
- Searching in processes was added.
- The option of a config file was added. Config files follow the TOML spec. These support boot flags by default, and colour schemes.
- The capability of maximizing a widget to take up all draw space was added.
- Filtering out CPU cores on the graph/legend was added.
### Changes
- Default colours were changed for better support on macOS Terminal and PowerShell.
- Rewrote and refactored how I get data to be less spaghetti. This might also have the added benefit of running better, with less duplicated logic.
- Changed how the dd dialog and help dialog look. Hopefully they'll be nicer to look at and more intuitive to use!
### Bug Fixes
- [#2](https://github.com/ClementTsang/bottom/issues/2): Fixed issues where the program would crash if the window was too small.
- Added a panic handler so terminals won't get all broken if a panic _does_ still occur.
- Fixed some sizing issues, hopefully this means that it's still readable at smaller sizes (within reason).
- [#10](https://github.com/ClementTsang/bottom/issues/10): Fixed scroll issue caused by resizing.
## [0.1.2] - 2020-01-11
### Changes
- Added a bit more complexity to how we determine column widths for tables. This should fix an issue where columns would glitch out at smaller widths, and hopefully look nicer.
### Bug Fixes
- Rewrote scroll logic in tables to avoid some strange scroll behaviour I encountered where it would jump around.
- Attempt to patch a panic caused by the change in how we determine time in the data collection stage.
## [0.1.1] - 2020-01-11
### Features
- `Tab` in the processes widget will now group similarly-named processes together (as well as their total CPU and MEM usage). `dd`-ing this will try to kill all entries with that process name.
- A flag to enable this by default is also now available.
### Bug Fixes
- Accidentally left in a bug in which the disk widget was using megabytes instead of bytes as their unit during data collection... but during data conversion for the display I treated them as bytes.
Contribution in any way is appreciated, whether it is reporting problems, fixing bugs, implementing features, improving the documentation, etc.
## Opening an issue
### Bug reports
When filing a bug report, fill out the [bug report template](https://github.com/ClementTsang/bottom/issues/new?assignees=&labels=bug&template=bug_report.yml). Be sure to give all the neccessary details! It is _incredibly_ difficult for a maintainer to fix a bug when it cannot be reproduced,
so that makes it much easier to reproduce the problem!
### Feature requests
Please fill out the [feature request template](https://github.com/ClementTsang/bottom/issues/new?assignees=&labels=feature&template=feature_request.yml). Remember to give details about what the feature is along with why you think this suggestion will be useful.
## Pull requests
If you want to directly contribute documentation changes or code, follow this! The expected workflow for a pull request is:
1. Fork the project.
2. Make your changes.
3. Make any documentation changes if necessary - if you add a new feature, it'll probably need documentation changes. See [here](https://clementtsang.github.io/bottom/nightly/contribution/documentation/) for tips on documentation.
4. Commit and create a pull request to merge into the `main` branch. **Please fill out the pull request template**.
5. Ask a maintainer to review your pull request.
- Check if the CI workflow passes. These consist of clippy lints, rustfmt checks, and basic tests. If you are a
first-time contributor, you may need to wait for a maintainer to let CI run.
- If changes are suggested or any comments are made, they should probably be addressed.
6. Once it looks good, it'll be merged! Note that _generally_, PRs are squashed to maintain repo cleanliness, though
feel free to ask otherwise if that isn't preferable.
For more details, see [here](https://clementtsang.github.io/bottom/nightly/contribution/issues-and-pull-requests/).
### Documentation
For contributing to documentation, see [here](https://clementtsang.github.io/bottom/nightly/contribution/documentation/).
### Packaging
If you want to become a package maintainer, see [here](https://clementtsang.github.io/bottom/nightly/contribution/packaging-and-distribution/)
for details on how to build bottom, how to generate/obtain completion files and manpages, and how to add installation instructions for the package to the README.
A customizable cross-platform graphical process/system monitor for the terminal.<br/>Supports Linux, macOS, and Windows. Inspired by <ahref=https://github.com/aksakalli/gtop>gtop</a>, <ahref=https://github.com/xxxserxxx/gotop>gotop</a>, and <ahref=https://github.com/htop-dev/htop>htop</a>.
</p>
A graphical top clone, written in Rust. Inspired by both [gtop](https://github.com/aksakalli/gtop) and [gotop](https://github.com/cjbassi/gotop)
<imgsrc="assets/demo.gif"alt="Quick demo recording showing off bottom's searching, expanding, and process killing."/>
<p>
<sub>
Demo using the <ahref="https://github.com/morhetz/gruvbox">Gruvbox</a> theme (<code>--theme gruvbox</code>), along with <ahref="https://www.ibm.com/plex/">IBM Plex Mono</a> and <ahref="https://sw.kovidgoyal.net/kitty/">Kitty</a>
</sub>
</p>
</div>
### Linux
## Table of contents <!-- omit in toc -->
You can install by cloning and using `cargo build --release`, or use `cargo install bottom`. Other installation methods based on distros are as follows:
You can get it from the AUR by installing `bottom`.
As (yet another) process/system visualization and management application, bottom supports the typical features:
### Windows
- Graphical visualization widgets for:
You can currently install by cloning and building yourself using `cargo build --release`, or use `cargo install bottom`
. You may need to install a font like [FreeMono](https://fonts2u.com/free-monospaced.font) and use a terminal like cmder for font support to work properly, unfortunately.
- [CPU usage](https://clementtsang.github.io/bottom/nightly/usage/widgets/cpu/) over time, at an average and per-core level
- [RAM and swap usage](https://clementtsang.github.io/bottom/nightly/usage/widgets/memory/) over time
- [Network I/O usage](https://clementtsang.github.io/bottom/nightly/usage/widgets/network/) over time
### macOS
with support for zooming in/out the current time interval displayed.
macOS support will hopefully come soon<sup>TM</sup>.
- [A process widget](https://clementtsang.github.io/bottom/nightly/usage/widgets/process/) for displaying, sorting, and searching info about processes, as well as support for:
- [Cross-platform support](https://github.com/ClementTsang/bottom#support) for Linux, macOS, and Windows, with more planned in the future.
- [Customizable behaviour](https://clementtsang.github.io/bottom/nightly/configuration/command-line-options/) that can be controlled with command-line options or a config file, such as:
bottom _officially_ supports the following operating systems and corresponding architectures:
- macOS (`x86_64`, `aarch64`)
- Linux (`x86_64`, `i686`, `aarch64`)
- Windows (`x86_64`, `i686`)
These platforms are tested to work for the most part and issues on these platforms will be fixed if possible.
Furthermore, binaries are built and tested using the most recent version of stable Rust at the time.
For more details on supported platforms and known problems, check out [the documentation](https://clementtsang.github.io/bottom/nightly/support/official/).
### Unofficial
bottom may work on a number of platforms that aren't officially supported. Note that unsupported platforms:
- Might not be tested in CI to build or pass tests (see [here](./.github/workflows/ci.yml) for checked platforms).
- Might not be properly tested by maintainers prior to a stable release.
- May only receive limited support, such as missing features or bugs that may not be fixed.
Note that some unsupported platforms may eventually be officially supported (e.g., FreeBSD).
A non-comprehensive list of some currently unofficially-supported platforms that may compile/work include:
- FreeBSD (`x86_64`)
- Linux (`armv6`, `armv7`, `powerpc64le`, `riscv64gc`)
- Android (`arm64`)
For more details on unsupported platforms and known problems, check out [the documentation](https://clementtsang.github.io/bottom/nightly/support/unofficial/).
## Installation
### Cargo
Installation via `cargo` can be done by installing the [`bottom`](https://crates.io/crates/bottom) crate:
```bash
# You might need to update the stable version of Rust first.
# Other versions might work, but this is not guaranteed.
rustup update stable
# Install the binary from crates.io.
cargo install bottom --locked
# If you use another channel by default, you can specify
# the what channel to use like so:
cargo +stable install bottom --locked
# --locked may be omitted if you wish to not use the
# locked crate versions in Cargo.lock. However, be
# aware that this may cause problems with dependencies.
cargo install bottom
```
Alternatively, you can use `cargo install` using the repo as the source.
```bash
# You might need to update the stable version of Rust first.
# Other versions might work, but this is not guaranteed.
rustup update stable
# Option 1 - Download an archive from releases and install
bottom is available as a [package](https://pkgs.alpinelinux.org/packages?name=bottom&branch=edge&repo=&arch=&origin=&flagged=&maintainer=) for Alpine Linux via `apk`:
```bash
apk add bottom
```
Packages for documentation ([`bottom-doc`](https://pkgs.alpinelinux.org/packages?name=bottom-doc&branch=edge&repo=&arch=&origin=&flagged=&maintainer=)) and completions for Bash ([`bottom-bash-completion`](https://pkgs.alpinelinux.org/packages?name=bottom-bash-completion&branch=edge&repo=&arch=&origin=&flagged=&maintainer=)), Fish ([`bottom-fish-completion`](https://pkgs.alpinelinux.org/packages?name=bottom-fish-completion&branch=edge&repo=&arch=&origin=&flagged=&maintainer=)), and Zsh ([`bottom-zsh-completion`](https://pkgs.alpinelinux.org/packages?name=bottom-zsh-completion&branch=edge&repo=&arch=&origin=&flagged=&maintainer=)) are also available.
### Arch Linux
bottom is available as an [official package](https://archlinux.org/packages/extra/x86_64/bottom/) that can be installed with `pacman`:
```bash
sudo pacman -S bottom
```
If you want the latest changes that are not yet stable, you can also install `bottom-git` [from the AUR](https://aur.archlinux.org/packages/bottom-git):
```bash
# Using paru
paru -S bottom-git
# Using yay
yay -S bottom-git
```
### Debian / Ubuntu
A `.deb` file is provided on each [stable release](https://github.com/ClementTsang/bottom/releases/latest) and
[nightly builds](https://github.com/ClementTsang/bottom/releases/tag/nightly) for x86, aarch64, and armv7.
bottom is available as a [rust package](https://gitlab.exherbo.org/exherbo/rust/-/tree/master/packages/sys-process/bottom) that can be installed with `cave`:
```bash
cave resolve -x repository/rust
cave resolve -x bottom
```
### Fedora / CentOS / AlmaLinux / Rocky Linux
bottom is available on [COPR](https://copr.fedorainfracloud.org/coprs/atim/bottom/):
```bash
sudo dnf copr enable atim/bottom -y
sudo dnf install bottom
```
bottom is also available via [Terra](https://terra.fyralabs.com/):
Available in the [official Gentoo repo](https://packages.gentoo.org/packages/sys-process/bottom):
```bash
sudo emerge --ask sys-process/bottom
```
### Nix
Available [in Nixpkgs](https://search.nixos.org/packages?channel=unstable&show=bottom&from=0&size=1&sort=relevance&type=packages) as `bottom`:
```bash
nix profile install nixpkgs#bottom
```
`bottom` can also be installed and configured through the [home-manager](https://nix-community.github.io/home-manager) module:
```nix
{
programs.bottom.enable = true;
}
```
### openSUSE
Available in openSUSE Tumbleweed:
```bash
zypper in bottom
```
### Snap
bottom is available as a [snap](https://snapcraft.io/install/bottom/ubuntu):
```bash
sudo snap install bottom
# To allow the program to run as intended
sudo snap connect bottom:mount-observe
sudo snap connect bottom:hardware-observe
sudo snap connect bottom:system-observe
sudo snap connect bottom:process-control
```
### Solus
Available [in the Solus repos](https://dev.getsol.us/source/bottom/):
```bash
sudo eopkg it bottom
```
### Void
Available [in the void-packages repo](https://github.com/void-linux/void-packages/tree/master/srcpkgs/bottom):
```bash
sudo xbps-install bottom
```
### gah
bottom can also be installed on Linux or macOS using [gah](https://github.com/marverix/gah):
```bash
gah install bottom
```
### Homebrew
Formula available [here](https://formulae.brew.sh/formula/bottom):
```bash
brew install bottom
```
### MacPorts
Available [here](https://ports.macports.org/port/bottom/):
```bash
sudo port selfupdate
sudo port install bottom
```
### Chocolatey
Chocolatey packages are located [here](https://chocolatey.org/packages/bottom):
```bash
choco install bottom
```
### Scoop
Available in the [Main bucket](https://github.com/ScoopInstaller/Main):
```bash
scoop install bottom
```
### winget
The winget package can be found [here](https://github.com/microsoft/winget-pkgs/tree/master/manifests/c/Clement/bottom):
```bash
winget install bottom
# If you need a more specific app id:
winget install Clement.bottom
```
You can uninstall via Control Panel, Options, or `winget --uninstall bottom`.
### Windows installer
You can also manually install bottom as a Windows program by going to the [latest release](https://github.com/ClementTsang/bottom/releases/latest)
and installing via the `.msi` file.
### Conda
You can install bottom using `conda` with [this conda-smithy repository](https://github.com/conda-forge/bottom-feedstock):
```bash
# Add the channel
conda config --add channels conda-forge
conda config --set channel_priority strict
# Install
conda install bottom
```
### Pre-built binaries
You can also use the pre-built release binaries:
- [Latest stable release](https://github.com/ClementTsang/bottom/releases/latest), built using the release branch
- [Latest nightly release](https://github.com/ClementTsang/bottom/releases/tag/nightly), built using the `main` branch at 00:00 UTC daily
To use, download and extract the binary that matches your system. You can then run by doing:
```bash
./btm
```
or by installing to your system following the procedures for installing binaries to your system.
#### Auto-completion
The release binaries in [the releases page](https://github.com/ClementTsang/bottom/releases) are packaged with
shell auto-completion files for Bash, Zsh, fish, Powershell, Elvish, Fig, and Nushell. To install them:
- For Bash, move `btm.bash` to `$XDG_CONFIG_HOME/bash_completion or /etc/bash_completion.d/`.
- For Zsh, move `_btm` to one of your `$fpath` directories.
- For fish, move `btm.fish` to `$HOME/.config/fish/completions/`.
- For PowerShell, add `_btm.ps1` to your PowerShell [profile](<https://docs.microsoft.com/en-us/previous-versions//bb613488(v=vs.85)>).
- For Elvish, the completion file is `btm.elv`.
- For Fig, the completion file is `btm.ts`.
- For Nushell, source `btm.nu`.
The individual auto-completion files are also included in the stable/nightly releases as `completion.tar.gz` if needed.
## Usage
### Command line options
You can run bottom using `btm`.
- `-h`, `--help` shows the help screen and exits.
- For help on flags, use `btm -h` for a quick overview or `btm --help` for more details.
- For info on key and mouse bindings, press `?` inside bottom or refer to the [documentation page](https://clementtsang.github.io/bottom/nightly/).
- `-a`, `--avgcpu` enables also showing the average CPU usage in addition to per-core CPU usage.
You can find more information on usage in the [documentation](https://clementtsang.github.io/bottom/nightly/).
- `-m`, `--dot-marker` uses a dot marker instead of the default braille marker.
## Configuration
- `-c`, `--celsius` displays the temperature type in Celsius. This is the default.
bottom accepts a number of command-line arguments to change the behaviour of the application as desired.
Additionally, bottom will automatically generate a configuration file on the first launch, which can be changed.
- `-f`, `--fahrenheit` displays the temperature type in Fahrenheit.
More details on configuration can be found [in the documentation](https://clementtsang.github.io/bottom/nightly/configuration/config-file/).
- `-k`, `--kelvin` displays the temperature type in Kelvin.
## Troubleshooting
- `-v`, `--version` displays the version number and exits.
If some things aren't working, give the [troubleshooting page](https://clementtsang.github.io/bottom/nightly/troubleshooting)
a look. If things still aren't working, then consider asking [a question](https://github.com/ClementTsang/bottom/discussions)
or filing a [bug report](https://github.com/ClementTsang/bottom/issues/new/choose) if you think it's a bug.
- `-d`, `--debug` enables debug logging.
## Contribution
- `-r <RATE>`, `--rate <RATE>` will set the refresh rate in _milliseconds_. Lowest it can go is 250ms, the highest it can go is 2<sup>128</sup> - 1. Defaults to 1000ms, and lower values may take more resources due to more frequent polling of data, and may be less accurate in some circumstances.
Whether it's reporting bugs, suggesting features, maintaining packages, or submitting a PR,
contribution is always welcome! Please read [CONTRIBUTING.md](./CONTRIBUTING.md) for details on how to
contribute to bottom.
- `-l`, `--left_legend` will move external table legends to the left side rather than the right side. Right side is default.
### Contributors
- `-u`, `--current_usage` will make a process' CPU usage be based on the current total CPU usage, rather than assuming 100% CPU usage. Only affects Linux for now.
Thanks to all contributors:
- `g`, `--group` will group together processes with the same name by default (equivalent to pressing `Tab`).
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<tdalign="center"valign="top"width="14.28%"><ahref="http://shilangyu.github.io"><imgsrc="https://avatars3.githubusercontent.com/u/29288116?v=4?s=100"width="100px;"alt="Marcin Wojnarowski"/><br/><sub><b>Marcin Wojnarowski</b></sub></a><br/><ahref="https://github.com/ClementTsang/bottom/commits?author=shilangyu"title="Code">💻</a><ahref="#platform-shilangyu"title="Packaging/porting to new platform">📦</a></td>
<tdalign="center"valign="top"width="14.28%"><ahref="https://liberapay.com/Artem4/"><imgsrc="https://avatars0.githubusercontent.com/u/5614476?v=4?s=100"width="100px;"alt="Artem Polishchuk"/><br/><sub><b>Artem Polishchuk</b></sub></a><br/><ahref="#platform-tim77"title="Packaging/porting to new platform">📦</a><ahref="https://github.com/ClementTsang/bottom/commits?author=tim77"title="Documentation">📖</a></td>
<tdalign="center"valign="top"width="14.28%"><ahref="http://ruby-journal.com/"><imgsrc="https://avatars2.githubusercontent.com/u/135605?v=4?s=100"width="100px;"alt="Trung Lê"/><br/><sub><b>Trung Lê</b></sub></a><br/><ahref="#platform-runlevel5"title="Packaging/porting to new platform">📦</a><ahref="#infra-runlevel5"title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
</tr>
<tr>
<tdalign="center"valign="top"width="14.28%"><ahref="https://github.com/dm9pZCAq"><imgsrc="https://avatars1.githubusercontent.com/u/46228973?v=4?s=100"width="100px;"alt="dm9pZCAq"/><br/><sub><b>dm9pZCAq</b></sub></a><br/><ahref="#platform-dm9pZCAq"title="Packaging/porting to new platform">📦</a><ahref="https://github.com/ClementTsang/bottom/commits?author=dm9pZCAq"title="Documentation">📖</a></td>
<tdalign="center"valign="top"width="14.28%"><ahref="https://github.com/briandipalma"><imgsrc="https://avatars.githubusercontent.com/u/1597820?v=4?s=100"width="100px;"alt="Brian Di Palma"/><br/><sub><b>Brian Di Palma</b></sub></a><br/><ahref="https://github.com/ClementTsang/bottom/commits?author=briandipalma"title="Documentation">📖</a></td>
<tdalign="center"valign="top"width="14.28%"><ahref="https://github.com/grawlinson"><imgsrc="https://avatars.githubusercontent.com/u/4408051?v=4?s=100"width="100px;"alt="George Rawlinson"/><br/><sub><b>George Rawlinson</b></sub></a><br/><ahref="https://github.com/ClementTsang/bottom/commits?author=grawlinson"title="Documentation">📖</a><ahref="#platform-grawlinson"title="Packaging/porting to new platform">📦</a></td>
<tdalign="center"valign="top"width="14.28%"><ahref="http://mpia.de/~hviding/"><imgsrc="https://avatars.githubusercontent.com/u/17031860?v=4?s=100"width="100px;"alt="Raphael Erik Hviding"/><br/><sub><b>Raphael Erik Hviding</b></sub></a><br/><ahref="https://github.com/ClementTsang/bottom/commits?author=TheSkyentist"title="Code">💻</a></td>
You can filter out what entries to show by configuring `[disk.name_filter]` and `[disk.mount_filter]` to filter by name and mount point respectively. In particular,
you can set a list of things to filter with by setting `list`, and configure how that list
is processed with the other options.
For example, consider a disk widget showing these entries:

If we wanted to ignoring any entry with a name that matches `/dev/sda`:
```toml
[disk.name_filter]
# Whether to ignore any matches. Defaults to true.
is_list_ignored = true
# A list of filters to try and match.
list = ["/dev/sda"]
# Whether to use regex. Defaults to false.
regex = true
# Whether to be case-sensitive. Defaults to false.
case_sensitive = false
# Whether to be require matching the whole word. Defaults to false.
whole_word = false
```
This would give us:

We can also combine both the name filter and mount filter. For example:
```toml
[disk.name_filter]
is_list_ignored = false
list = ["/dev/sda"]
regex = true
case_sensitive = false
whole_word = false
[disk.mount_filter]
is_list_ignored = true
list = ["/mnt/.*", "/"]
regex = true
case_sensitive = false
whole_word = true
```
This gives us:

| `battery` | Boolean | Shows the battery widget. |
| `rate` | Unsigned Int (represents milliseconds) or String (represents human time) | Sets a refresh rate in ms. |
| `default_time_value` | Unsigned Int (represents milliseconds) or String (represents human time) | Default time value for graphs in ms. |
| `time_delta` | Unsigned Int (represents milliseconds) or String (represents human time) | The amount in ms changed upon zooming. |
| `hide_time` | Boolean | Hides the time scale. |
| `temperature_type` | String (one of ["k", "f", "c", "kelvin", "fahrenheit", "celsius"]) | Sets the temperature unit type. |
| `default_widget_type` | String (one of ["cpu", "proc", "net", "temp", "mem", "disk"], same as layout options) | Sets the default widget type, use --help for more info. |
| `default_widget_count` | Unsigned Int (represents which `default_widget_type`) | Sets the n'th selected widget type as the default. |
| `enable_cache_memory` | Boolean | Enable cache and buffer memory stats (not available on Windows). |
| `process_memory_as_value` | Boolean | Defaults to showing process memory usage by value. |
| `tree` | Boolean | Defaults to showing the process widget in tree mode. |
| `show_table_scroll_position` | Boolean | Shows the scroll position tracker in table widgets. |
| `process_command` | Boolean | Show processes as their commands by default. |
| `disable_advanced_kill` | Boolean | Disable being able to send signals to processes on supported Unix-like systems. Only available on Linux, macOS, and FreeBSD. |
| `network_use_binary_prefix` | Boolean | Displays the network widget with binary prefixes. |
| `network_use_bytes` | Boolean | Displays the network widget using bytes. |
| `network_use_log` | Boolean | Displays the network widget with a log scale. |
| `disable_gpu` | Boolean | Disable NVIDIA and AMD GPU data collection. |
| `retention` | String (human readable time, such as "10m", "1h", etc.) | How much data is stored at once in terms of time. |
| `unnormalized_cpu` | Boolean | Show process CPU% without normalizing over the number of cores. |
| `expanded` | Boolean | Expand the default widget upon starting the app. |
| `memory_legend` | String (one of ["none", "top-left", "top", "top-right", "left", "right", "bottom-left", "bottom", "bottom-right"]) | Where to place the legend for the memory widget. |
| `network_legend` | String (one of ["none", "top-left", "top", "top-right", "left", "right", "bottom-left", "bottom", "bottom-right"]) | Where to place the legend for the network widget. |
| `average_cpu_row` | Boolean | Moves the average CPU usage entry to its own row when using basic mode. |
| `tree_collapse` | Boolean | Collapse process tree by default. |
| `"proc", "process", "processes"` | Process table and search |
| `"temp", "temperature"` | Temperature table |
| `"disk"` | Disk table |
| `"empty"` | An empty space |
| `"batt", "battery"` | Battery statistics |
Each component of the layout accepts a `ratio` value. If this is not set, it defaults to 1.
Furthermore, you can have duplicate widgets.
For an example, look at the [default config](https://github.com/ClementTsang/bottom/blob/main/sample_configs/default_config.toml), which contains the default layout.
| `border_color` | The colour of the widgets' borders | `border_color = "white"` |
| `selected_border_color` | The colour of a widget's borders when the widget is selected | `selected_border_color = "white"` |
| `widget_title` | Text styling for a widget's title | `widget_title = { color = "black", bg_color = "blue", bold = true }` |
| `text` | Text styling for text in general | `text = { color = "black", bg_color = "blue", bold = true }` |
| `selected_text` | Text styling for text when representing something that is selected | `selected_text = { color = "black", bg_color = "blue", bold = true }` |
| `disabled_text` | Text styling for text when representing something that is disabled | `disabled_text = { color = "black", bg_color = "blue", bold = true }` |
| `thread_text` | Text styling for text when representing process threads. Only usable on Linux at the moment. | `thread_text = { color = "green", bg_color = "blue", bold = true }` |
You can filter out what entries to show by configuring `[temperature.sensor_filter]`. In particular you can set a list of things to filter with by setting `list`, and configure how that list is processed with the other options.
For example, here we are ignoring any sensor that has "cpu" or "wifi" in it.
```toml
[temperature.sensor_filter]
# Whether to ignore any matches. Defaults to true.
is_list_ignored = true
# A list of filters to try and match.
list = ["cpu", "wifi"]
# Whether to use regex. Defaults to false.
regex = false
# Whether to be case-sensitive. Defaults to false.
case_sensitive = false
# Whether to be require matching the whole word. Defaults to false.
This section is intended for people who wish to work on/build/distribute bottom, not general users.
## Overview
bottom manages its own binary builds for nightly and stable release purposes. The core build workflow is handled by [`build_releases.yml`](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/build_releases.yml), called by a wrapper workflow for [nightly](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/nightly.yml) and [stable](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/deployment.yml) releases. Builds take place via GitHub Actions.
The main things built are:
- Binaries for various platforms
- MSI installer for Windows
- `.deb` package for Debian and its derivatives
This documentation gives a high-level overview of the build process for each part. For the most up-to-date and detailed reference, definitely refer back to the [`build_releases.yml`](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/build_releases.yml) file.
## Binaries
Binaries are built currently for various targets. Note that not all of these are officially supported. The following general steps are performed:
- Set up the Rust toolchain for the action runner.
- Enable cache.
- Build a release build with:
- `--features deploy`, which enables only crates needed for release builds.
These generate the manpages and shell completions (see [Packaging](../packaging-and-distribution.md) for some more information).
- Bundle the binaries and manpage/completions.
- Cleanup.
Some builds use [`cross`](https://github.com/cross-rs/cross) to do cross-compilation builds for architectures otherwise not natively supported by the runner.
## MSI
This builds a full Windows installer using [`cargo-wix`](https://github.com/volks73/cargo-wix). This requires some setup beforehand with some dependencies:
- Net-Framework-Core (handled by Powershell)
- wixtoolset (handled by chocolatey)
- Rust toolchain
After that, cache is enabled, and `cargo wix` takes care of the rest.
## `.deb`
Currently, `.deb` files are built for x86 and ARM architectures (`armv7`, `aarch64`). This is handled by [`cargo-deb`](https://crates.io/crates/cargo-deb).
- For x86, this is handled natively with just `cargo-deb`.
- For ARM, this uses a Docker container, [cargo-deb-arm](https://github.com/ClementTsang/cargo-deb-arm), which correctly sets the dependencies and architecture for the generated `.deb` file.
There are additional checks via `dpkg` to ensure the architecture is correctly set.
This section is intended for people who wish to work on/build/distribute bottom, not general users.
## Overview
bottom currently has two main deploy processes to worry about:
- [Nightly](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/nightly.yml): a daily (00:00 UTC) GitHub action to build binary/installer files, and upload them to the [nightly release](https://github.com/ClementTsang/bottom/releases/tag/nightly). It can also be triggered manually as either a proper nightly release or a mock release.
- [Stable](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/deployment.yml): a stable deployment, triggered manually or upon creation of a valid tag. This is a GitHub action that builds binary/installer files and uploads them to a new GitHub release.
Furthermore, this workflow does not handle the following deployments, which must be manually handled:
This is, for the most part, automatic, though it can also be used as a way of testing build workflow changes and seeing if binaries can be successfully built at all against all the targets we want to build for.
If one does not want to actually update the nightly release, and just want to test the general builds and workflow, one can run the workflow manually on a branch of choice with "mock" set as the parameter. Changing it to anything else will trigger a non-mock run.
## Stable
This can be manually triggered, though the general use-case is setting a tag of the form `x.y.z` (after checking everything is good, of course). For example:
```bash
git tag 0.6.9 && git push origin 0.6.9
```
This will automatically trigger the deployment workflow, and create a draft release with the files uploaded. One still needs to fill in the details and release it.
Furthermore, there are some deployments that are handled by maintainers of bottom that this workflow does not automatically finish. These must be manually handled.
### Chocolatey
Upon releasing on GitHub, [choco-bottom](https://github.com/ClementTsang/choco-bottom) will automatically be updated with a new PR with the correct deployment files for Chocolatey. Check the PR, merge it if it is correct, then pull locally and deploy following the instructions in the [README](https://github.com/ClementTsang/choco-bottom/blob/master/README.md). Make sure to test installation and running at least once before deploying!
If done correctly, there should be a new build on Chocolatey, which will take some time to validate.
### crates.io
Validate everything builds properly and works (you should have done this before releasing though). If good, then deploying on crates.io is as simple as:
- Whenever a new feature is added, a bug is fixed, or a breaking change is made, it should be documented where
appropriate (ex: `README.md`, changelog, etc.)
- New methods of installation are always appreciated and should be documented
## What pages need documentation?
There are a few areas where documentation changes are often needed:
- The [`README.md`](https://github.com/ClementTsang/bottom/blob/main/README.md)
- The help menu inside of the application (located [here](https://github.com/ClementTsang/bottom/blob/main/src/constants.rs))
- The [extended documentation](../index.md) (what you're reading right now)
- The [`CHANGELOG.md`](https://github.com/ClementTsang/bottom/blob/main/CHANGELOG.md)
## How should I add/update documentation?
1. Fork the repository to make changes in.
2. Where you're adding documentation will probably affect what you need to do:
<h3><code>README.md</code> or <code>CHANGELOG.md</code></h3>
For changes to [`README.md`](https://github.com/ClementTsang/bottom/blob/main/README.md) and [`CHANGELOG.md`](https://github.com/ClementTsang/bottom/blob/main/CHANGELOG.md), just follow the formatting provided and use any editor.
Generally, changes to [`CHANGELOG.md`](https://github.com/ClementTsang/bottom/blob/main/CHANGELOG.md) will be handled
by a maintainer, and the contents of the file should follow the [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
format, as well as link to the relevant PR or issues.
<h3>Help menu</h3>
For changes to the help menu, try to refer to the existing code within [`src/constants.rs`](https://github.com/ClementTsang/bottom/blob/main/src/constants.rs) on how the help menu is generated.
<h3>Extended documentation</h3>
For changes to the extended documentation, you'll probably want at least Python 3.11 (older and newer versions
should be fine), [MkDocs](https://www.mkdocs.org/), [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/),
`mdx_truly_sane_lists`, and optionally [Mike](https://github.com/jimporter/mike) installed. These can help with
validating your changes locally.
You can do so through `pip` or your system's package managers. If you use `pip`, you can use venv to cleanly install
the documentation dependencies:
```bash
# Change directories to the documentation.
cd docs/
# Create venv, install the dependencies, and serve the page.
./serve.sh
```
This will serve a local version of the docs that you can open on your browser. It will update as you make changes.
3. Once you have your documentation changes done, submit it as a pull request. For more information regarding that,
refer to [Issues, Pull Requests, and Discussions](issues-and-pull-requests.md).
Discussions are open [in the repo](https://github.com/ClementTsang/bottom/discussions). As for the difference between discussions and issues:
- Open an issue if what you have enough information to properly fill out any details needed for a report or request.
- Open a discussion otherwise (e.g. asking a question).
## Opening an issue
### Bug reports
When filing a bug report, please use the [bug report template](https://github.com/ClementTsang/bottom/issues/new?assignees=&labels=bug&template=bug_report.md&title=) and fill in as much as you can. It is _incredibly_ difficult for a maintainer to fix a bug when it cannot be reproduced, and giving as much detail as possible generally helps to make it easier to reproduce the problem!
### Feature requests
Please use the [feature request template](https://github.com/ClementTsang/bottom/issues/new?assignees=&labels=feature&template=feature_request.md&title=) and fill it out. Remember to give details about what the feature is along with why you think this suggestion will be useful.
Also, please check whether an existing issue has covered your specific feature request!
## Pull requests
The expected workflow for a pull request is:
1. Fork the project.
2. Make your changes.
3. Make any documentation changes if necessary - if you add a new feature, it'll probably need documentation changes. See [here](./documentation.md) for tips on documentation.
4. Commit and create a pull request to merge into the `main` branch. **Please fill out the pull request template**.
5. Ask a maintainer to review your pull request.
- Check if the CI workflow passes. These consist of clippy lints, rustfmt checks, and basic tests. If you are a
first-time contributor, you may need to wait for a maintainer to let CI run.
- If changes are suggested or any comments are made, they should probably be addressed.
6. Once it looks good, it'll be merged! Note that _generally_, PRs are squashed to maintain repo cleanliness, though
feel free to ask otherwise if that isn't preferable.
A customizable cross-platform graphical process/system monitor for the terminal, supporting Linux, macOS, and Windows. Inspired by other tools like [gtop](https://github.com/aksakalli/gtop), [gotop](https://github.com/xxxserxxx/gotop), and [htop](https://github.com/htop-dev/htop).
---
This site serves as extended documentation for bottom alongside the [`README.md`](https://github.com/ClementTsang/bottom#readme).
!!! Warning
Some areas of this site are still in progress and may be missing details. Feel free to suggest/contribute changes!
## Installation
!!! Tip
It's as good idea to first check out the [Support](support/official.md) page to see if your system is officially supported!
!!! Tip
If you're facing some issues during/after installation, check out the [Troubleshooting](troubleshooting.md) page for some common problems and solutions.
To install bottom, refer to [the installation section of the `README.md`](https://github.com/ClementTsang/bottom#installation),
which contains a list of all the installation methods.
## Usage and configuration
The command to run bottom is `btm`.
You can refer to the [usage](usage/general-usage.md) pages for more details on using bottom (e.g. keybinds, some features, a general overview of what each widget does).
To configure bottom (e.g. how it behaves, how it looks, etc.) refer to the [command-line options page](configuration/command-line-options.md) for temporary settings, or [the config file page](configuration/config-file/index.md) for more permanent settings.
## Contribution
New contributors are always welcome! See the [contribution](contribution/issues-and-pull-requests.md) section for how to contribute to
bottom, whether it be filing issues, writing documentation, creating pull requests, etc.
bottom _officially_ supports the following operating systems and corresponding architectures:
- macOS (`x86_64`, `aarch64`)
- Linux (`x86_64`, `i686`, `aarch64`)
- Windows (`x86_64`, `i686`)
These platforms are tested to work (with caveats, see below) and issues on these platforms will be fixed if possible.
Furthermore, binaries are expected to be built and tested using the most recent version of stable Rust - if you are manually building
bottom from the repo/source, then please try that as well.
## Known problems
### Linux
- If you're using Linux via WSL or WSL2:
- You may have issues with getting memory data.
- Temperature sensors may not be correctly reported.
- WSL2 will not match Windows' own Task Manager in terms of data.
### Windows
- The temperature widget seems to require admin privileges in some cases to get data.
- The battery widget seems to have issues with dual battery systems, like some Thinkpads.
- If you are using WSL or WSL2:
- You may have issues with getting memory data.
- Temperature sensors may not be correctly reported.
- WSL2 will not match Windows' own Task Manager in terms of data.
### macOS
- The process widget may require elevated access (ex: `sudo btm`) to gather all data in some cases. _Please note that you should be certain that you trust any software you grant root privileges._
Systems and architectures that aren't officially supported may still work, but there are no guarantees on how much will
work. For example, it might only compile, or it might run with bugs/broken features. Furthermore, while it will depend
on the problem at the end of the day, _issues on unsupported platforms are likely to go unfixed_.
Unofficially supported platforms known to compile/work:
- FreeBSD
- Linux on ARMv7 and ARMv6 (tested to compile in [CI](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/ci.yml))
- Linux on PowerPC 64 LE (tested to compile in [CI](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/ci.yml))
- Linux on an RISC-V (tested to compile in [CI](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/ci.yml), tested to run on an [Allwinner D1 Nezha](https://github.com/ClementTsang/bottom/issues/564))
4. Here, add a new `String value`, and set the `Name` to a bunch of 0's (e.g. `000` - make sure the name isn't already used), then set the `Data` to the font name (e.g. `Iosevka`).
<figure>
<imgsrc="../assets/screenshots/troubleshooting/regedit_fonts.webp"alt="Regedit menu showing how to add a new font for Command Prompt/PowerShell"/>
<figcaption><sub>The last entry is the new entry for Iosevka</sub></figcaption>
</figure>
5. Then, open the Command Prompt/PowerShell, and right-click on the top bar, and open "Properties":
<figure>
<imgsrc="../assets/screenshots/troubleshooting/cmd_prompt_props.webp"alt="Opening the properties menu in Command Prompt/PowerShell"/>
</figure>
6. From here, go to "Font", and set the font to your new font (so in this example, Iosevka):
<figure>
<imgsrc="../assets/screenshots/troubleshooting/cmd_prompt_font.webp"alt="Setting a new font in Command Prompt/PowerShell"/>
</figure>
### Still having issues?
If you're still having issues, feel free to open a [discussion](https://github.com/ClementTsang/bottom/discussions/new/)
question about it, and I (or others) can try to help.
## Why can't I see all my temperature sensors on Windows?
This is a [known limitation](./support/official.md#windows), some sensors may require admin privileges to get sensor data.
## Why don't I see dual batteries on Windows reported separately? (e.g. Thinkpads)
This is a [known limitation](./support/official.md#windows) which seems to be with how batteries are being detected on Windows.
## Why can't I see all my temperature sensors on WSL?
This is a [known limitation](./support/official.md#windows) with WSL. Due to how it works, hosts may not expose their
temperature sensors and therefore, temperature sensors might be missing.
## Why does WSL2 not match Task Manager?
This is a [known limitation](./support/official.md#windows) with WSL2. Due to how WSL2 works, the two might not match
up in terms of reported data.
## Why can't I see all my processes/process data on macOS?
This is a [known limitation](./support/official.md#macos), and you may have to run the program with elevated
privileges to work around it - for example:
```bash
sudo btm
```
**Please note that you should be certain that you trust any software you grant root privileges.**
There are measures taken to try to maximize the amount of information obtained without elevated privileges. For example,
one can modify the instructions found on the [htop wiki](https://github.com/hishamhm/htop/wiki/macOS:-run-without-sudo)
on how to run htop without sudo for bottom. However, **please** understand the potential security risks before doing so!
## My configuration file isn't working
If your configuration files aren't working, here are a few things to try:
### Check the formatting
It may be handy to refer to the automatically generated config files or the
[sample configuration files](https://github.com/ClementTsang/bottom/tree/main/sample_configs). The config files also
follow the [TOML](https://toml.io/en/) format.
Also make sure your config options are under the right table - for example, to set your temperature type, you must
set it under the `[flags]` table:
```toml
[flags]
temperature_type = "f"
```
Meanwhile, if you want to set a custom color scheme, it would be under the `[styles]` table:
```toml
[styles.tables.headers]
color="LightBlue"
```
To help validate your configuration files, there is [JSON Schema](https://json-schema.org/) support if your IDE/editor
supports it.
### Check the configuration file location
Make sure bottom is reading the right configuration file. By default, bottom looks for config files at these locations:
Basic mode is a special layout that removes all of the graphs and provides an interface that resembles (a very stripped-down version of) htop.
<figure>
<imgsrc="../../assets/screenshots/basic.webp"alt="A picture of bottom's basic mode."/>
</figure>
Basic mode can be enabled either through a command line flag:
```bash
btm -b
# or
btm --basic
```
or through the config:
```toml
[flags]
basic = true
```
## Notes
In this mode, widgets that use tables (temperatures, processes, disks, and batteries) are only shown one at a time.
One can switch between these widgets either by clicking the arrow buttons or by using the general widget selection shortcuts (for example, ++ctrl+left++ or ++H++)
to switch which widget is shown.
Also note that in this mode, widget expansion and custom layouts are disabled.
## Key bindings
Basic mode follows the same key bindings as normal, barring widget expansion being disabled, and that the ++"%"++ key while selecting the memory widget toggles between total usage and percentage.
You can also see keybinds and basic usage details in bottom by pressing ++question++, which will open a help menu.
## Features
### Expansion
By default, bottom is somewhat like a dashboard - a bunch of different widgets, all showing different things, and they all cram together to fit into one terminal.
If you instead just want to see _one_ widget - maybe you want to look at a graph in more detail, for example - you can "expand" the currently selected
widget using the ++e++ key, which will hide all other widgets and make that widget take up all available terminal space.
You can leave this state by either pressing ++e++ again or pressing ++esc++.
### Widget selection
To allow for widget-specific keybindings and expansion, there is the idea of _widget selection_ in bottom, where you can focus on a specific widget to work with it.
This can be done with the mouse (just click on the widget of interest) or keyboard (ex: ++ctrl+"Direction"++, see [Key bindings](#key-bindings) for alternatives).
## Key bindings
These are global or common keyboard shortcuts for the application, which you can see in-app through the ++question++ shortcut.
Note that key bindings are generally case-sensitive.
The battery features are unavailable if the binary is compiled with the `battery` feature disabled or if there are no batteries on the system!
The battery widget provides information about batteries on the system.
<figure>
<imgsrc="../../../assets/screenshots/battery.webp"alt="A picture of an expanded battery widget."/>
</figure>
The battery widget can be enabled through either the `--battery` flag, the `battery = true` option in a config file, or specifying the widget in a custom layout.
## Features
The following data is displayed for batteries:
- Charge percent
- Consumption rate
- Charging state
- Time to empty/charge, based on the current state
- Battery health percent
The battery widget also supports devices with multiple batteries, and you can switch between them using the keyboard or the mouse.
## Key bindings
Note that key bindings are generally case-sensitive.
The CPU widget displays a visual representation of CPU usage over a time range.
<figure>
<imgsrc="../../../assets/screenshots/cpu.webp"alt="A picture of an expanded CPU widget showing average CPU usage."/>
</figure>
## Features
The CPU widget is composed of two parts: the graph and the legend:
- The graph displays the usage data for the currently selected entry as a percentage
- The legend displays all available entries that can be displayed on the graph along with their last recorded use percentage (except for the "All" option)
Users can scroll through the legend using either the keyboard or mouse to select which entry to display on the graph. The "All" option shows every entry
at the same time, though this may get a bit hard to follow if you have a large number of cores/threads.
One can also adjust the displayed time range through either the keyboard or mouse, with a range of 30s to 600s.
## Key bindings
Note that key bindings are generally case-sensitive.
The memory widget provides a visual representation of RAM and swap usage over time.
<figure>
<imgsrc="../../../assets/screenshots/memory.webp"alt="A picture of an expanded memory widget."/>
</figure>
## Features
The legend displays the current usage in terms of percentage and actual usage in binary units (KiB, MiB, GiB, etc.).
If the total RAM or swap available is 0, then it is automatically hidden from the legend and graph.
One can also adjust the displayed time range through either the keyboard or mouse, with a range of 30s to 600s.
This widget can also be configured to display Nvidia and AMD GPU memory usage (`--disable_gpu` on Linux/Windows to disable) or cache memory usage (`--enable_cache_memory`).
## Key bindings
Note that key bindings are generally case-sensitive.
| ++"Scroll"++ | Scrolling up or down zooms in or out of the graph respectively |
## How are memory values determined?
### Linux
Memory usage is calculated using the following formula based on values from `/proc/meminfo` (based on [htop's implementation](https://github.com/htop-dev/htop/blob/976c6123f41492aaf613b9d172eef1842fb7b0a3/linux/LinuxProcessList.c#L1584)):
You can find more info on `/proc/meminfo` and its fields [here](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/6/html/deployment_guide/s2-proc-meminfo).
### Windows
In Windows, we calculate swap by querying `Get-Counter "\Paging File(*)\% Usage"`. This
is also what some libraries like [psutil](https://github.com/giampaolo/psutil/blob/master/psutil/arch/windows/mem.c) use. However, note there are also a few other valid methods of
representing "swap" in Windows (e.g. using `GetPerformanceInfo`), which all slightly don't
The network widget provides a visual representation of network input and output per second, as well as noting the total amount
received and transmitted.
<figure>
<imgsrc="../../../assets/screenshots/network/network.webp"alt="A picture of an expanded network widget."/>
</figure>
## Features
The legend displays the current reads and writes per second in bits, as well as the total amount read/written.
The y-axis automatically scales based on shown read/write values, and by default, is a linear scale based on base-10 units (e.x. kilobit, gigabit, etc.).
Through [configuration](../../configuration/command-line-options.md), the read/write per second unit can be changed to bytes, while the y-axis can be changed to a
log scale and/or use base-2 units (e.x. kibibit, gibibit, etc.).
One can also adjust the displayed time range through either the keyboard or mouse, with a range of 30s to 600s.
## Key bindings
Note that key bindings are generally case-sensitive.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.