Compare commits

..

No commits in common. "main" and "v0.1.2" have entirely different histories.
main ... v0.1.2

315 changed files with 3774 additions and 45783 deletions

View File

@ -1,649 +0,0 @@
{
"files": [
"README.md"
],
"imageSize": 100,
"commit": false,
"contributors": [
{
"login": "shilangyu",
"name": "Marcin Wojnarowski",
"avatar_url": "https://avatars3.githubusercontent.com/u/29288116?v=4",
"profile": "http://shilangyu.github.io",
"contributions": [
"code",
"platform"
]
},
{
"login": "mqudsi",
"name": "Mahmoud Al-Qudsi",
"avatar_url": "https://avatars3.githubusercontent.com/u/606923?v=4",
"profile": "http://neosmart.net/",
"contributions": [
"code"
]
},
{
"login": "andys8",
"name": "Andy",
"avatar_url": "https://avatars0.githubusercontent.com/u/13085980?v=4",
"profile": "https://andys8.de",
"contributions": [
"code"
]
},
{
"login": "HarHarLinks",
"name": "Kim Brose",
"avatar_url": "https://avatars0.githubusercontent.com/u/2803622?v=4",
"profile": "https://github.com/HarHarLinks",
"contributions": [
"code"
]
},
{
"login": "svenstaro",
"name": "Sven-Hendrik Haase",
"avatar_url": "https://avatars0.githubusercontent.com/u/1664?v=4",
"profile": "https://svenstaro.org",
"contributions": [
"doc"
]
},
{
"login": "tim77",
"name": "Artem Polishchuk",
"avatar_url": "https://avatars0.githubusercontent.com/u/5614476?v=4",
"profile": "https://liberapay.com/Artem4/",
"contributions": [
"platform",
"doc"
]
},
{
"login": "runlevel5",
"name": "Trung Lê",
"avatar_url": "https://avatars2.githubusercontent.com/u/135605?v=4",
"profile": "http://ruby-journal.com/",
"contributions": [
"platform",
"infra"
]
},
{
"login": "dm9pZCAq",
"name": "dm9pZCAq",
"avatar_url": "https://avatars1.githubusercontent.com/u/46228973?v=4",
"profile": "https://github.com/dm9pZCAq",
"contributions": [
"platform",
"doc"
]
},
{
"login": "LlinksRechts",
"name": "Lukas Rysavy",
"avatar_url": "https://avatars2.githubusercontent.com/u/10536802?v=4",
"profile": "https://lukor.org",
"contributions": [
"code"
]
},
{
"login": "ehamberg",
"name": "Erlend Hamberg",
"avatar_url": "https://avatars3.githubusercontent.com/u/16063?v=4",
"profile": "http://hamberg.no/erlend",
"contributions": [
"code"
]
},
{
"login": "Frederick888",
"name": "Frederick Zhang",
"avatar_url": "https://avatars.githubusercontent.com/u/4507647?v=4",
"profile": "https://onee3.org",
"contributions": [
"code"
]
},
{
"login": "pvanheus",
"name": "pvanheus",
"avatar_url": "https://avatars.githubusercontent.com/u/4154788?v=4",
"profile": "https://github.com/pvanheus",
"contributions": [
"code"
]
},
{
"login": "briandipalma",
"name": "Brian Di Palma",
"avatar_url": "https://avatars.githubusercontent.com/u/1597820?v=4",
"profile": "https://github.com/briandipalma",
"contributions": [
"doc"
]
},
{
"login": "dakyskye",
"name": "Lasha Kanteladze",
"avatar_url": "https://avatars.githubusercontent.com/u/32128756?v=4",
"profile": "https://dakyskye.github.io",
"contributions": [
"doc"
]
},
{
"login": "herbygillot",
"name": "Herby Gillot",
"avatar_url": "https://avatars.githubusercontent.com/u/618376?v=4",
"profile": "https://github.com/herbygillot",
"contributions": [
"doc"
]
},
{
"login": "yellowsquid",
"name": "Greg Brown",
"avatar_url": "https://avatars.githubusercontent.com/u/46519298?v=4",
"profile": "https://github.com/yellowsquid",
"contributions": [
"code"
]
},
{
"login": "TotalCaesar659",
"name": "TotalCaesar659",
"avatar_url": "https://avatars.githubusercontent.com/u/14265316?v=4",
"profile": "https://github.com/TotalCaesar659",
"contributions": [
"doc"
]
},
{
"login": "grawlinson",
"name": "George Rawlinson",
"avatar_url": "https://avatars.githubusercontent.com/u/4408051?v=4",
"profile": "https://github.com/grawlinson",
"contributions": [
"doc",
"platform"
]
},
{
"login": "adiabatic",
"name": "adiabatic",
"avatar_url": "https://avatars.githubusercontent.com/u/101246?v=4",
"profile": "https://www.frogorbits.com/",
"contributions": [
"doc"
]
},
{
"login": "bowlofeggs",
"name": "Randy Barlow",
"avatar_url": "https://avatars.githubusercontent.com/u/354506?v=4",
"profile": "https://electronsweatshop.com",
"contributions": [
"code"
]
},
{
"login": "patricksjackson",
"name": "Patrick Jackson",
"avatar_url": "https://avatars.githubusercontent.com/u/160646?v=4",
"profile": "http://jackson.dev",
"contributions": [
"ideas",
"doc"
]
},
{
"login": "mati865",
"name": "Mateusz Mikuła",
"avatar_url": "https://avatars.githubusercontent.com/u/1174646?v=4",
"profile": "https://github.com/mati865",
"contributions": [
"code"
]
},
{
"login": "GuillaumeGomez",
"name": "Guillaume Gomez",
"avatar_url": "https://avatars.githubusercontent.com/u/3050060?v=4",
"profile": "https://blog.guillaume-gomez.fr",
"contributions": [
"code"
]
},
{
"login": "shurizzle",
"name": "shura",
"avatar_url": "https://avatars.githubusercontent.com/u/203655?v=4",
"profile": "https://github.com/shurizzle",
"contributions": [
"code"
]
},
{
"login": "wezm",
"name": "Wesley Moore",
"avatar_url": "https://avatars.githubusercontent.com/u/21787?v=4",
"profile": "https://www.wezm.net/",
"contributions": [
"code"
]
},
{
"login": "xgdgsc",
"name": "xgdgsc",
"avatar_url": "https://avatars.githubusercontent.com/u/1189869?v=4",
"profile": "https://github.com/xgdgsc",
"contributions": [
"doc"
]
},
{
"login": "ViridiCanis",
"name": "ViridiCanis",
"avatar_url": "https://avatars.githubusercontent.com/u/49595344?v=4",
"profile": "https://github.com/ViridiCanis",
"contributions": [
"code"
]
},
{
"login": "jamartin9",
"name": "Justin Martin",
"avatar_url": "https://avatars.githubusercontent.com/u/7027701?v=4",
"profile": "https://github.com/jamartin9",
"contributions": [
"code",
"doc"
]
},
{
"login": "DianaNites",
"name": "Diana",
"avatar_url": "https://avatars.githubusercontent.com/u/5275194?v=4",
"profile": "https://github.com/DianaNites",
"contributions": [
"code"
]
},
{
"login": "hervyqa",
"name": "Hervy Qurrotul Ainur Rozi",
"avatar_url": "https://avatars.githubusercontent.com/u/45872139?v=4",
"profile": "https://hervyqa.id",
"contributions": [
"doc"
]
},
{
"login": "mrivnak",
"name": "Mike Rivnak",
"avatar_url": "https://avatars.githubusercontent.com/u/7389355?v=4",
"profile": "https://mrivnak.github.io",
"contributions": [
"doc"
]
},
{
"login": "lroobrou",
"name": "lroobrou",
"avatar_url": "https://avatars.githubusercontent.com/u/35152113?v=4",
"profile": "https://github.com/lroobrou",
"contributions": [
"code"
]
},
{
"login": "database64128",
"name": "database64128",
"avatar_url": "https://avatars.githubusercontent.com/u/18757988?v=4",
"profile": "https://cube64128.xyz/",
"contributions": [
"code"
]
},
{
"login": "sou-chon",
"name": "Chon Sou",
"avatar_url": "https://avatars.githubusercontent.com/u/35537528?v=4",
"profile": "https://github.com/sou-chon",
"contributions": [
"code"
]
},
{
"login": "Drsheppard01",
"name": "DrSheppard",
"avatar_url": "https://avatars.githubusercontent.com/u/60893791?v=4",
"profile": "https://github.com/Drsheppard01",
"contributions": [
"doc"
]
},
{
"login": "RaresCon",
"name": "Rareș Constantin",
"avatar_url": "https://avatars.githubusercontent.com/u/95525840?v=4",
"profile": "https://github.com/RaresCon",
"contributions": [
"code"
]
},
{
"login": "felipesuri",
"name": "felipesuri",
"avatar_url": "https://avatars.githubusercontent.com/u/50281523?v=4",
"profile": "http://felipesuri.com",
"contributions": [
"doc"
]
},
{
"login": "spital",
"name": "spital",
"avatar_url": "https://avatars.githubusercontent.com/u/11034264?v=4",
"profile": "https://github.com/spital",
"contributions": [
"code"
]
},
{
"login": "mbikovitsky",
"name": "Michael Bikovitsky",
"avatar_url": "https://avatars.githubusercontent.com/u/1389811?v=4",
"profile": "https://bikodbg.com/",
"contributions": [
"code"
]
},
{
"login": "dvalter",
"name": "Dmitry Valter",
"avatar_url": "https://avatars.githubusercontent.com/u/38795282?v=4",
"profile": "https://github.com/dvalter",
"contributions": [
"code"
]
},
{
"login": "aragonnetje6",
"name": "Grace Stok",
"avatar_url": "https://avatars.githubusercontent.com/u/69118097?v=4",
"profile": "https://github.com/aragonnetje6",
"contributions": [
"code"
]
},
{
"login": "yshui",
"name": "Yuxuan Shui",
"avatar_url": "https://avatars.githubusercontent.com/u/366851?v=4",
"profile": "https://github.com/yshui",
"contributions": [
"code"
]
},
{
"login": "WenqingZong",
"name": "Wenqing Zong",
"avatar_url": "https://avatars.githubusercontent.com/u/43934749?v=4",
"profile": "http://zongwenqing.com",
"contributions": [
"code"
]
},
{
"login": "gabelluardo",
"name": "Gabriele Belluardo",
"avatar_url": "https://avatars.githubusercontent.com/u/42920247?v=4",
"profile": "http://gabelluardo.github.io",
"contributions": [
"code"
]
},
{
"login": "zebp",
"name": "Zeb Piasecki",
"avatar_url": "https://avatars.githubusercontent.com/u/14242997?v=4",
"profile": "https://zebulon.dev/",
"contributions": [
"code"
]
},
{
"login": "Freed-Wu",
"name": "wzy",
"avatar_url": "https://avatars.githubusercontent.com/u/32936898?v=4",
"profile": "https://freed-wu.github.io/",
"contributions": [
"code",
"doc"
]
},
{
"login": "john-s-lin",
"name": "john-s-lin",
"avatar_url": "https://avatars.githubusercontent.com/u/66440371?v=4",
"profile": "https://johnlin.ca/",
"contributions": [
"doc"
]
},
{
"login": "lyuha",
"name": "Lee Wonjoon",
"avatar_url": "https://avatars.githubusercontent.com/u/4014016?v=4",
"profile": "https://github.com/lyuha",
"contributions": [
"code",
"doc"
]
},
{
"login": "davlgd",
"name": "David Legrand",
"avatar_url": "https://avatars.githubusercontent.com/u/1110600?v=4",
"profile": "https://www.davlgd.fr",
"contributions": [
"doc"
]
},
{
"login": "MichalBryxi",
"name": "Michal Bryxí",
"avatar_url": "https://avatars.githubusercontent.com/u/847473?v=4",
"profile": "https://github.com/MichalBryxi",
"contributions": [
"doc"
]
},
{
"login": "TheSkyentist",
"name": "Raphael Erik Hviding",
"avatar_url": "https://avatars.githubusercontent.com/u/17031860?v=4",
"profile": "http://mpia.de/~hviding/",
"contributions": [
"code"
]
},
{
"login": "CosmicHorrorDev",
"name": "CosmicHorror",
"avatar_url": "https://avatars.githubusercontent.com/u/30302768?v=4",
"profile": "http://cosmichorror.dev",
"contributions": [
"code"
]
},
{
"login": "woodsb02",
"name": "Ben Woods",
"avatar_url": "https://avatars.githubusercontent.com/u/7113557?v=4",
"profile": "https://www.woods.am/",
"contributions": [
"doc"
]
},
{
"login": "stephen-huan",
"name": "Stephen Huan",
"avatar_url": "https://avatars.githubusercontent.com/u/20411956?v=4",
"profile": "http://cgdct.moe",
"contributions": [
"code"
]
},
{
"login": "jasongwartz",
"name": "Jason Gwartz",
"avatar_url": "https://avatars.githubusercontent.com/u/10981911?v=4",
"profile": "https://github.com/jasongwartz",
"contributions": [
"doc"
]
},
{
"login": "llc0930",
"name": "llc0930",
"avatar_url": "https://avatars.githubusercontent.com/u/14966910?v=4",
"profile": "https://github.com/llc0930",
"contributions": [
"code"
]
},
{
"login": "yretenai",
"name": "Ada Ahmed",
"avatar_url": "https://avatars.githubusercontent.com/u/614231?v=4",
"profile": "https://chronovore.dev",
"contributions": [
"code"
]
},
{
"login": "Wateir",
"name": "Wateir",
"avatar_url": "https://avatars.githubusercontent.com/u/78731687?v=4",
"profile": "https://github.com/Wateir",
"contributions": [
"doc"
]
},
{
"login": "al42and",
"name": "Andrey Alekseenko",
"avatar_url": "https://avatars.githubusercontent.com/u/933873?v=4",
"profile": "https://github.com/al42and",
"contributions": [
"code"
]
},
{
"login": "fgimian",
"name": "Fotis Gimian",
"avatar_url": "https://avatars.githubusercontent.com/u/1811813?v=4",
"profile": "http://fgimian.github.io/",
"contributions": [
"code",
"doc"
]
},
{
"login": "SigmaSquadron",
"name": "Fernando Rodrigues",
"avatar_url": "https://avatars.githubusercontent.com/u/174749595?v=4",
"profile": "https://sigmasquadron.net",
"contributions": [
"doc"
]
},
{
"login": "mtoohey31",
"name": "Matthew Toohey",
"avatar_url": "https://avatars.githubusercontent.com/u/36740602?v=4",
"profile": "https://mtoohey.com",
"contributions": [
"code"
]
},
{
"login": "win8linux",
"name": "Julius Enriquez",
"avatar_url": "https://avatars.githubusercontent.com/u/11584387?v=4",
"profile": "https://meander.site",
"contributions": [
"doc"
]
},
{
"login": "benjamb",
"name": "Ben Brown",
"avatar_url": "https://avatars.githubusercontent.com/u/8291297?v=4",
"profile": "https://github.com/benjamb",
"contributions": [
"code"
]
},
{
"login": "nyurik",
"name": "Yuri Astrakhan",
"avatar_url": "https://avatars.githubusercontent.com/u/1641515?v=4",
"profile": "https://github.com/nyurik",
"contributions": [
"code",
"doc"
]
},
{
"login": "kachick",
"name": "Kenichi Kamiya",
"avatar_url": "https://avatars.githubusercontent.com/u/1180335?v=4",
"profile": "https://kachick.github.io/",
"contributions": [
"code"
]
},
{
"login": "yahlia",
"name": "yahlia",
"avatar_url": "https://avatars.githubusercontent.com/u/40295453?v=4",
"profile": "https://github.com/yahlia",
"contributions": [
"code"
]
},
{
"login": "Bucket-Bucket-Bucket",
"name": "Bucket-Bucket-Bucket",
"avatar_url": "https://avatars.githubusercontent.com/u/107044719?v=4",
"profile": "https://github.com/Bucket-Bucket-Bucket",
"contributions": [
"code"
]
},
{
"login": "marverix",
"name": "Marek Sierociński",
"avatar_url": "https://avatars.githubusercontent.com/u/2142811?v=4",
"profile": "http://marek.sierocinscy.pl",
"contributions": [
"doc"
]
}
],
"contributorsPerLine": 7,
"projectName": "bottom",
"projectOwner": "ClementTsang",
"repoType": "github",
"repoHost": "https://github.com",
"skipCi": true,
"commitConvention": "angular",
"commitType": "docs"
}

View File

@ -1,11 +0,0 @@
#!/bin/sh
set -e
echo "Running pre-push hook:"
echo "Executing: cargo fmt --all -- --check"
cargo fmt --all -- --check
echo "Executing: cargo clippy --all-targets --workspace -- -D warnings"
cargo clippy --all-targets --workspace -- -D warnings

View File

@ -1,5 +0,0 @@
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
[target.i686-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]

View File

@ -1,71 +0,0 @@
%YAML 1.1
---
# Configuration for CirrusCI. This is primarily used for testing and building FreeBSD and old versions of Linux,
# since other CI platforms don't support build jobs for these configurations.
#
# Note that we set the YAML directive above to prevent some linting errors around the templates.
setup_template: &SETUP_TEMPLATE
setup_script:
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
- sh rustup.sh --default-toolchain stable -y
cache_template: &CACHE_TEMPLATE
registry_cache:
folder: $HOME/.cargo/registry
reupload_on_changes: "true"
fingerprint_script:
- $HOME/.cargo/bin/rustc --version
- cat Cargo.lock
- echo $CIRRUS_OS
- echo $CIRRUS_TASK_NAME
target_cache:
folder: target
reupload_on_changes: "true"
fingerprint_script:
- $HOME/.cargo/bin/rustc --version
- cat Cargo.lock
- echo $CIRRUS_OS
- echo $CIRRUS_TASK_NAME
cleanup_template: &CLEANUP_TEMPLATE
before_cache_script:
- rm -rf $HOME/.cargo/registry/index
- rm -rf $HOME/.cargo/registry/src
- rm -f ./target/.rustc_info.json
env:
CARGO_INCREMENTAL: "0"
CARGO_PROFILE_DEV_DEBUG: "0"
CARGO_HUSKY_DONT_INSTALL_HOOKS: "true"
release_task:
auto_cancellation: "false"
only_if: $CIRRUS_BUILD_SOURCE == "api" && $BTM_BUILD_RELEASE_CALLER == "ci"
timeout_in: "30m"
env:
BTM_GENERATE: "true"
COMPLETION_DIR: "target/tmp/bottom/completion/"
MANPAGE_DIR: "target/tmp/bottom/manpage/"
# -PLACEHOLDER FOR CI-
matrix:
- name: "Legacy Linux (2.17)"
alias: "linux_2_17_build"
container:
image: quay.io/pypa/manylinux2014_x86_64
env:
TARGET: "x86_64-unknown-linux-gnu"
NAME: "x86_64-unknown-linux-gnu-2-17"
<<: *SETUP_TEMPLATE
<<: *CACHE_TEMPLATE
build_script:
- . $HOME/.cargo/env
- cargo build --release --verbose --locked --features deploy
- mv ./target/release/btm ./
- ./btm -V
- mv "$COMPLETION_DIR" completion
- mv "$MANPAGE_DIR" manpage
- tar -czvf bottom_$NAME.tar.gz btm completion
binaries_artifacts:
path: bottom_$NAME.tar.gz
<<: *CLEANUP_TEMPLATE

31
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,31 @@
---
name: Bug report
about: Found a bug? Please report it if it hasn't already been filed...
title: ''
labels: ''
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Desktop (please complete the following information):**
- OS
- Terminal that you're using
**Additional context**
If there's any additional information not fitting in the above fields relating to this problem, state it here.

View File

@ -1,158 +0,0 @@
name: Bug report
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.

View File

@ -1,6 +0,0 @@
blank_issues_enabled: true
contact_links:
- name: Open a discussion
about: |
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!
url: https://github.com/ClementTsang/bottom/discussions/new

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@ -1,30 +0,0 @@
name: Feature request
description: Got a good idea that hasn't already been suggested? Mention it here!
labels: ["feature"]
body:
- type: checkboxes
id: acknowledgements
attributes:
label: Checklist
options:
- label: >
I've looked through [the documentation](https://clementtsang.github.io/bottom/nightly/) and
[existing open issues](https://github.com/ClementTsang/bottom/issues?q=is%3Aopen+is%3Aissue+label%3Afeature)
for similar feature requests.
required: true
- type: textarea
id: description
validations:
required: true
attributes:
label: Describe the feature request
description: >
Please describe what behaviour you are looking for, the motivation for it, and use cases where this feature
would be helpful to both you and others. Try to be clear and concise.
If you have any ideas to implement this feature as well, feel free to write them down here too.
placeholder: |
Example:
It would be nice to support FreeBSD, as I and others often use similar tools on my FreeBSD-based system.
I also noticed that sysinfo has FreeBSD support as a data source.

View File

@ -1,47 +0,0 @@
name: Packaging
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?

View File

@ -1,30 +0,0 @@
## Description
_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)_

View File

@ -1,635 +0,0 @@
# Builds the following releases:
# - Binaries
# - Binaries via VMs
# - Cirrus binaries (currently just Linux 2.17)
# - MSI installer for Windows (.msi)
# - .deb releases
# - .rpm releases
name: "build releases"
on:
workflow_dispatch:
workflow_call:
inputs:
caller:
description: "The calling workflow."
default: ""
required: false
type: string
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_HUSKY_DONT_INSTALL_HOOKS: true
COMPLETION_DIR: "target/tmp/bottom/completion/"
MANPAGE_DIR: "target/tmp/bottom/manpage/"
permissions:
id-token: write
contents: read
attestations: write
# TODO: Maybe add retry job in case of timeouts?
jobs:
build-binaries:
name: "Build binaries"
runs-on: ${{ matrix.info.os }}
container: ${{ matrix.info.container }}
timeout-minutes: 12
strategy:
fail-fast: false
matrix:
info:
# ======= Supported targets =======
# Linux (x86-64, x86, aarch64)
#
# TODO: In the future, when ARM runners are available on github, switch ARM targets off of cross.
- {
os: "ubuntu-22.04",
target: "x86_64-unknown-linux-gnu",
cross: false,
generate-other-artifacts: true,
}
- {
os: "ubuntu-22.04",
target: "i686-unknown-linux-gnu",
cross: true,
}
- {
os: "ubuntu-22.04",
target: "x86_64-unknown-linux-musl",
cross: true,
}
- {
os: "ubuntu-22.04",
target: "i686-unknown-linux-musl",
cross: true,
}
- {
os: "ubuntu-22.04",
target: "aarch64-unknown-linux-gnu",
cross: true,
}
- {
os: "ubuntu-22.04",
target: "aarch64-unknown-linux-musl",
cross: true,
}
# macOS (x86-64 and aarch64)
- { os: "macos-13", target: "x86_64-apple-darwin", cross: false }
- { os: "macos-14", target: "aarch64-apple-darwin", cross: false }
# Windows (x86-64, x86)
- {
os: "windows-2022",
target: "x86_64-pc-windows-msvc",
cross: false,
}
- { os: "windows-2022", target: "i686-pc-windows-msvc", cross: false }
- {
os: "windows-2022",
target: "x86_64-pc-windows-gnu",
cross: false,
}
# ======= Unsupported targets =======
# armv7
- {
os: "ubuntu-22.04",
target: "armv7-unknown-linux-gnueabihf",
cross: true,
}
- {
os: "ubuntu-22.04",
target: "armv7-unknown-linux-musleabihf",
cross: true,
}
# PowerPC 64 LE
- {
os: "ubuntu-22.04",
target: "powerpc64le-unknown-linux-gnu",
cross: true,
}
# Risc-V 64gc
- {
os: "ubuntu-22.04",
target: "riscv64gc-unknown-linux-gnu",
cross: true,
}
# Windows ARM
- {
os: "windows-11-arm",
target: "aarch64-pc-windows-msvc",
cross: false,
}
steps:
- name: Checkout repository
if: matrix.info.container == ''
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- name: Set up Rust toolchain
if: matrix.info.container == ''
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
with:
toolchain: ${{ matrix.info.rust || 'stable' }}
target: ${{ matrix.info.target }}
- name: Set up Rust toolchain (non-GitHub container)
if: matrix.info.container != ''
shell: bash
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
sh rustup.sh --default-toolchain stable -y
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
- name: Build
uses: ClementTsang/cargo-action@v0.0.5
env:
BTM_GENERATE: true
BTM_BUILD_RELEASE_CALLER: ${{ inputs.caller }}
with:
command: build
args: --release --verbose --locked --target=${{ matrix.info.target }} --features deploy
use-cross: ${{ matrix.info.cross }}
cross-version: 0.2.5
- name: Move automatically generated completion/manpage
shell: bash
run: |
mv "$COMPLETION_DIR" completion
mv "$MANPAGE_DIR" manpage
- name: Bundle release and completion (Windows)
if: matrix.info.os == 'windows-2022'
shell: bash
run: |
cp target/${{ matrix.info.target }}/release/btm.exe btm.exe
7z a bottom_${{ matrix.info.target }}.zip "btm.exe"
7z a bottom_${{ matrix.info.target }}.zip "completion"
echo "ASSET=bottom_${{ matrix.info.target }}.zip" >> $GITHUB_ENV
- name: Bundle release and completion (Linux and macOS)
if: matrix.info.os != 'windows-2022'
shell: bash
run: |
cp target/${{ matrix.info.target }}/release/btm ./btm
tar -czvf bottom_${{ matrix.info.target }}.tar.gz btm completion
echo "ASSET=bottom_${{ matrix.info.target }}.tar.gz" >> $GITHUB_ENV
- name: Generate artifact attestation for file
uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2
with:
subject-path: ${{ env.ASSET }}
- name: Create release directory for artifact, move file
shell: bash
run: |
mkdir release
mv ${{ env.ASSET }} release/
- name: Compress completion files
if: matrix.info.generate-other-artifacts == true
shell: bash
run: |
tar -C ./completion -czvf completion.tar.gz .
mv completion.tar.gz release/
- name: Compress manpage files
if: matrix.info.generate-other-artifacts == true
shell: bash
run: |
gzip ./manpage/btm.1
tar -C ./manpage -czvf manpage.tar.gz .
mv manpage.tar.gz release/
- name: Copy over .desktop file
if: matrix.info.generate-other-artifacts == true
shell: bash
run: |
cp ./desktop/bottom.desktop release/
- name: Save release as artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
retention-days: 3
name: "release-${{ matrix.info.target }}"
path: release
build-with-vm:
name: "Build binaries via VMs"
runs-on: "ubuntu-latest"
timeout-minutes: 12
strategy:
fail-fast: false
matrix:
info:
# Seems like cross's FreeBSD image is a bit broken? I get build errors,
# may be related to this issue: https://github.com/cross-rs/cross/issues/1291
# Alas, that's why we do it with VMs.
# Disabled as there's a weird issue with installing curl on FreeBSD 15 at the moment.
# - {
# type: "freebsd",
# os_release: "15.0",
# target: "x86_64-unknown-freebsd",
# }
- {
type: "freebsd",
os_release: "14.3",
target: "x86_64-unknown-freebsd",
}
- {
type: "freebsd",
os_release: "13.5",
target: "x86_64-unknown-freebsd",
}
steps:
- name: Checkout repository
if: matrix.info.container == ''
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- name: Build (FreeBSD)
if: ${{ matrix.info.type == 'freebsd' }}
uses: vmactions/freebsd-vm@966989c456d41351f095a421f60e71342d3bce41 # v1.2.1
with:
release: "${{ matrix.info.os_release }}"
envs: "RUST_BACKTRACE CARGO_INCREMENTAL CARGO_PROFILE_DEV_DEBUG CARGO_HUSKY_DONT_INSTALL_HOOKS COMPLETION_DIR MANPAGE_DIR"
usesh: true
prepare: |
pkg install -y curl bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
sh rustup.sh --default-toolchain stable -y
run: |
. "$HOME/.cargo/env"
BTM_GENERATE=true BTM_BUILD_RELEASE_CALLER=${{ inputs.caller }} cargo build --release --verbose --locked --target=${{ matrix.info.target }} --features deploy
- name: Move automatically generated completion/manpage
shell: bash
run: |
mv "$COMPLETION_DIR" completion
mv "$MANPAGE_DIR" manpage
- name: Bundle release and completion
shell: bash
run: |
cp target/${{ matrix.info.target }}/release/btm ./btm
tar -czvf bottom_${{ matrix.info.target }}-${{ matrix.info.os_release }}.tar.gz btm completion
echo "ASSET=bottom_${{ matrix.info.target }}-${{ matrix.info.os_release }}.tar.gz" >> $GITHUB_ENV
- name: Generate artifact attestation for file
uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2
with:
subject-path: ${{ env.ASSET }}
- name: Create release directory for artifact, move file
shell: bash
run: |
mkdir release
mv ${{ env.ASSET }} release/
- name: Save release as artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
retention-days: 3
name: "release-${{ matrix.info.target }}-${{ matrix.info.os_release }}"
path: release
build-msi:
name: "Build MSI (WiX) installer"
timeout-minutes: 12
strategy:
fail-fast: false
matrix:
info:
- {
os: "windows-2022",
target: "x86_64-pc-windows-msvc",
output: "bottom_x86_64_installer.msi"
}
- {
os: "windows-11-arm",
target: "aarch64-pc-windows-msvc",
output: "bottom_aarch64_installer.msi"
}
runs-on: ${{ matrix.info.os }}
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- name: Install Net-Framework-Core
shell: powershell
run: |
choco install dotnet-sdk --pre -y --no-progress;
- name: Install wixtoolset
shell: powershell
run: |
choco install -y wixtoolset --no-progress;
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
with:
toolchain: stable
target: ${{ matrix.info.target }}
- name: Install cargo-wix
shell: powershell
run: |
cargo install cargo-wix --version 0.3.8 --locked
- name: Build MSI file
shell: powershell
env:
BTM_GENERATE: true
run: |
Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1"
refreshenv
cargo wix --nocapture
mv bottom_installer.msi ${{ matrix.info.output }}
- name: Generate artifact attestation for file
uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2
with:
subject-path: ${{ matrix.info.output }}
- name: Create release directory for artifact, move files
shell: bash
run: |
mkdir release
mv ${{ matrix.info.output }} release/
- name: Save release as artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
retention-days: 3
name: "release-${{ matrix.info.target }}-msi"
path: release
build-cirrus:
name: "Build using Cirrus CI"
runs-on: "ubuntu-latest"
timeout-minutes: 12
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- name: Create release directory
run: |
mkdir -p release
- name: Execute Cirrus CI build script
env:
CIRRUS_KEY: ${{ secrets.CIRRUS_TOKEN }}
run: |
if [[ "${{ github.ref_type }}" == "branch" ]]; then
BRANCH="${{ github.ref_name }}";
else
raw=$(git branch -r --contains '${{ github.ref_name }}');
BRANCH=${raw##*/};
fi
python ./scripts/cirrus/release.py "$BRANCH" "release/" "${{ inputs.caller }}"
- name: Generate artifact attestation for file
uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2
with:
subject-path: "release/**/*.tar.gz"
- name: Save release as artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
retention-days: 3
name: release-build-cirrus
path: release
build-deb:
name: "Build .deb software packages"
runs-on: "ubuntu-22.04"
timeout-minutes: 12
strategy:
fail-fast: false
matrix:
# TODO: In the future, when ARM runners are available on github, switch ARM targets off of cross.
info:
- { target: "x86_64-unknown-linux-gnu", dpkg: amd64 }
- { target: "x86_64-unknown-linux-musl", cross: true, dpkg: amd64 }
- {
target: "aarch64-unknown-linux-gnu",
cross: true,
dpkg: arm64,
container: "ghcr.io/clementtsang/cargo-deb-aarch64-unknown-linux-gnu",
}
- {
target: "armv7-unknown-linux-gnueabihf",
cross: true,
dpkg: armhf,
container: "ghcr.io/clementtsang/cargo-deb-armv7-unknown-linux-gnueabihf",
}
- {
target: "aarch64-unknown-linux-musl",
cross: true,
dpkg: arm64,
container: "ghcr.io/clementtsang/cargo-deb-aarch64-unknown-linux-gnu",
}
- {
target: "armv7-unknown-linux-musleabihf",
cross: true,
dpkg: armhf,
container: "ghcr.io/clementtsang/cargo-deb-armv7-unknown-linux-gnueabihf",
}
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
with:
toolchain: ${{ matrix.info.rust || 'stable' }}
target: ${{ matrix.info.target }}
# TODO: Could I use the previous jobs to skip this call?
- name: Build
uses: ClementTsang/cargo-action@v0.0.5
env:
BTM_GENERATE: true
BTM_BUILD_RELEASE_CALLER: ${{ inputs.caller }}
with:
command: build
args: --release --locked --verbose --features deploy --target ${{ matrix.info.target }}
use-cross: ${{ matrix.info.cross || false }}
cross-version: 0.2.5
- name: Move automatically generated completion/manpage
shell: bash
run: |
mv "$COMPLETION_DIR" completion
mv "$MANPAGE_DIR" manpage
- name: Zip manpage
run: |
gzip ./manpage/btm.1
- name: Build Debian release (x86-64)
if: startsWith(matrix.info.target, 'x86_64')
env:
BTM_GENERATE: true
run: |
cargo install cargo-deb --version 3.5.0 --locked
cargo deb --no-build --target ${{ matrix.info.target }}
cp ./target/debian/bottom_*.deb .
- name: Build Debian release (ARM)
if: startsWith(matrix.info.target, 'x86_64') != true
env:
BTM_GENERATE: true
run: |
docker pull ${{ matrix.info.container }}
docker run -t --rm --mount type=bind,source="$(pwd)",target=/volume ${{ matrix.info.container }} "--no-build --variant ${{ matrix.info.dpkg }} --target ${{ matrix.info.target }}" "/volume"
cp ./target/debian/bottom-*.deb .
TMP_NAME=$(find bottom-*.deb)
VERSION=${{ matrix.info.dpkg }}
mv $TMP_NAME $(echo $TMP_NAME | sed "s/-$VERSION//")
- name: Rename if it is a musl target
if: contains(matrix.info.target, 'musl')
run: |
TMP_NAME=$(find bottom_*.deb)
mv $TMP_NAME $(echo $TMP_NAME | sed "s/bottom/bottom-musl/")
# TODO: Maybe rename version if nightly?
- name: Verify Debian release
id: verify
run: |
DEB_FILE=$(find bottom*_*.deb)
dpkg -I $DEB_FILE
dpkg -I $DEB_FILE | grep ${{ matrix.info.dpkg }} && echo "Found correct architecture"
echo "DEB_FILE=$DEB_FILE" >> $GITHUB_OUTPUT
- name: Delete generated Debian folder
run: |
sudo chown $USER ./target/debian/ 2>/dev/null || true
rm -r ./target/debian/
- name: Generate artifact attestation for file
uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2
with:
subject-path: ${{ steps.verify.outputs.DEB_FILE }}
- name: Create release directory for artifact, move file
shell: bash
run: |
mkdir release
mv ${{ steps.verify.outputs.DEB_FILE }} release/
- name: Save release as artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
retention-days: 3
name: release-build-deb-${{ matrix.info.target }}
path: release
build-rpm:
name: "Build .rpm software packages"
runs-on: ubuntu-latest
container: ghcr.io/clementtsang/almalinux-8
timeout-minutes: 12
strategy:
fail-fast: false
matrix:
info:
- { target: "x86_64-unknown-linux-gnu" }
- { target: "x86_64-unknown-linux-musl", cross: true }
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
with:
toolchain: ${{ matrix.info.rust || 'stable' }}
target: ${{ matrix.info.target }}
# TODO: Could I use the previous jobs to skip this call?
- name: Build
uses: ClementTsang/cargo-action@v0.0.5
env:
BTM_GENERATE: true
BTM_BUILD_RELEASE_CALLER: ${{ inputs.caller }}
CROSS_CONTAINER_IN_CONTAINER: true
with:
command: build
use-cross: ${{ matrix.info.cross || false }}
args: --release --locked --verbose --features deploy --target ${{ matrix.info.target }}
cross-version: 0.2.5
- name: Move automatically generated completion/manpage
shell: bash
run: |
mv "$COMPLETION_DIR" completion
mv "$MANPAGE_DIR" manpage
- name: Zip manpage
run: |
gzip ./manpage/btm.1
- name: Build rpm release
env:
BTM_GENERATE: true
run: |
cargo install cargo-generate-rpm --version 0.11.0 --locked
cargo generate-rpm --target ${{ matrix.info.target }}
cp ./target/${{ matrix.info.target }}/generate-rpm/bottom-*.rpm .
- name: Rename if it is a musl target
if: contains(matrix.info.target, 'musl')
run: |
TMP_NAME=$(find bottom-*.rpm)
mv $TMP_NAME $(echo $TMP_NAME | sed "s/bottom/bottom-musl/")
- name: Verify rpm release
id: verify
run: |
RPM_FILE=$(find bottom-*.rpm)
rpm -qip $RPM_FILE
echo "RPM_FILE=$RPM_FILE" >> $GITHUB_OUTPUT
- name: Delete generated rpm folder
run: |
sudo chown $USER ./target/${{ matrix.info.target }}/generate-rpm/ 2>/dev/null || true
rm -r ./target/${{ matrix.info.target }}/generate-rpm/
- name: Generate artifact attestation for file
uses: actions/attest-build-provenance@6149ea5740be74af77f260b9db67e633f6b0a9a1 # v1.4.2
with:
subject-path: ${{ steps.verify.outputs.RPM_FILE }}
- name: Create release directory for artifact, move file
shell: bash
run: |
mkdir release
mv ${{ steps.verify.outputs.RPM_FILE }} release/
- name: Save release as artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
retention-days: 3
name: release-build-rpm-${{ matrix.info.target }}
path: release

View File

@ -1,353 +0,0 @@
# Main CI workflow to validate that files are formatted correctly, pass tests,
# and pass lints.
#
# CI workflow was based on a lot of work from other people:
# - https://github.com/heim-rs/heim/blob/master/.github/workflows/ci.yml
# - https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/ci.yml
# - https://www.reillywood.com/blog/rust-faster-ci/
# - https://matklad.github.io/2021/09/04/fast-rust-builds.html
#
# Supported platforms run the following tasks:
# - Format
# - Test (built/test in separate steps)
# - Clippy (apparently faster to do it after the build/test)
#
# Unsupported platforms run the following tasks:
# - Clippy
name: ci
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
env:
RUST_BACKTRACE: 1
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_HUSKY_DONT_INSTALL_HOOKS: true
COMPLETION_DIR: "target/tmp/bottom/completion/"
MANPAGE_DIR: "target/tmp/bottom/manpage/"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'ClementTsang/bottom' }}
jobs:
# Check if things should be skipped.
pre-job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- name: Check if this action should be skipped
id: skip_check
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1
with:
skip_after_successful_duplicate: "true"
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml", "Cross.toml"]'
do_not_skip: '["workflow_dispatch", "push"]'
# Runs rustfmt + tests + clippy on the main supported platforms.
#
# TODO: In the future, when ARM runners are available on github, switch ARM targets off of cross.
supported:
needs: pre-job
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.info.os }}
timeout-minutes: 12
strategy:
fail-fast: false
matrix:
info:
- {
os: "ubuntu-latest",
target: "x86_64-unknown-linux-gnu",
cross: false,
}
- {
os: "ubuntu-latest",
target: "aarch64-unknown-linux-gnu",
cross: true,
}
- { os: "macos-13", target: "x86_64-apple-darwin", cross: false }
- { os: "macos-14", target: "aarch64-apple-darwin", cross: false }
- {
os: "windows-2022",
target: "x86_64-pc-windows-msvc",
cross: false,
}
features: ["--all-features", "--no-default-features"]
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
with:
toolchain: stable
components: rustfmt, clippy
target: ${{ matrix.info.target }}
- name: Enable Rust cache
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # 2.7.8
if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork
with:
key: ${{ matrix.info.target }}
cache-all-crates: true
- name: Check cargo fmt
run: cargo fmt --all -- --check
# TODO: add junit output using nextest for codecov (https://docs.codecov.com/docs/test-analytics)
- name: Build tests
uses: ClementTsang/cargo-action@v0.0.5
with:
command: test
args: --no-run --locked ${{ matrix.features }} --target=${{ matrix.info.target }}
use-cross: ${{ matrix.info.cross }}
cross-version: 0.2.5
env:
RUST_BACKTRACE: full
- name: Run tests
uses: ClementTsang/cargo-action@v0.0.5
with:
command: test
args: --no-fail-fast ${{ matrix.features }} --target=${{ matrix.info.target }} -- --nocapture --quiet
use-cross: ${{ matrix.info.cross }}
cross-version: 0.2.5
env:
RUST_BACKTRACE: full
- name: Run clippy
uses: ClementTsang/cargo-action@v0.0.5
with:
command: clippy
args: ${{ matrix.features }} --all-targets --workspace --target=${{ matrix.info.target }} -- -D warnings
use-cross: ${{ matrix.info.cross }}
cross-version: 0.2.5
env:
RUST_BACKTRACE: full
# Try running cargo build on all other platforms.
#
# TODO: Maybe some of these should be allowed to fail? If so, I guess we can add back the "unofficial" MSRV,
# I would also put android there.
unsupported-check:
needs: pre-job
strategy:
fail-fast: false
matrix:
info:
# x86 or x86-64
- {
os: "ubuntu-latest",
target: "i686-unknown-linux-gnu",
cross: true,
}
- {
os: "ubuntu-latest",
target: "x86_64-unknown-linux-musl",
cross: false,
}
- {
os: "ubuntu-latest",
target: "i686-unknown-linux-musl",
cross: true,
}
- { os: "windows-2022", target: "i686-pc-windows-msvc", cross: false }
- {
os: "windows-2022",
target: "x86_64-pc-windows-gnu",
cross: false,
}
# Beta
- {
os: "ubuntu-latest",
target: "x86_64-unknown-linux-gnu",
cross: false,
rust: "beta",
}
- {
os: "macos-14",
target: "aarch64-apple-darwin",
cross: false,
rust: "beta",
}
- {
os: "windows-2022",
target: "x86_64-pc-windows-msvc",
cross: false,
rust: "beta",
}
# armv7
- {
os: "ubuntu-latest",
target: "armv7-unknown-linux-gnueabihf",
cross: true,
}
# armv6
- {
os: "ubuntu-latest",
target: "arm-unknown-linux-gnueabihf",
cross: true,
}
# PowerPC 64 LE
- {
os: "ubuntu-latest",
target: "powerpc64le-unknown-linux-gnu",
cross: true,
}
# Risc-V 64gc
# Note: seems like this breaks with tests?
- {
os: "ubuntu-latest",
target: "riscv64gc-unknown-linux-gnu",
cross: true,
}
# Android ARM64
- {
os: "ubuntu-latest",
target: "aarch64-linux-android",
cross: true,
cross-version: "git:df3309709a4a26b3dc3b1567239c3f38b9da0425", # latest version that I've found works so far
no-default-features: true,
no-clippy: true,
}
# Windows ARM
- {
os: "windows-11-arm",
target: "aarch64-pc-windows-msvc",
cross: false,
}
runs-on: ${{ matrix.info.os }}
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
timeout-minutes: 12
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
with:
toolchain: ${{ matrix.info.rust || 'stable' }}
target: ${{ matrix.info.target }}
components: "clippy"
- name: Enable Rust cache
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # 2.7.8
if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork
with:
key: ${{ matrix.info.target }}
cache-all-crates: true
- name: Clippy (default features)
uses: ClementTsang/cargo-action@v0.0.5
if: ${{ matrix.info.no-default-features != true }}
with:
command: clippy
args: --all-targets --workspace --target=${{ matrix.info.target }} --locked
use-cross: ${{ matrix.info.cross }}
cross-version: ${{ matrix.info.cross-version || '0.2.5' }}
- name: Clippy (no features enabled)
uses: ClementTsang/cargo-action@v0.0.5
if: ${{ matrix.info.no-default-features == true }}
with:
command: clippy
args: --all-targets --workspace --target=${{ matrix.info.target }} --locked --no-default-features
use-cross: ${{ matrix.info.cross }}
cross-version: ${{ matrix.info.cross-version || '0.2.5' }}
unsupported-check-freebsd:
needs: pre-job
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
runs-on: "ubuntu-latest"
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
info:
# Seems like cross's FreeBSD image is a bit broken? I get build errors,
# may be related to this issue: https://github.com/cross-rs/cross/issues/1291
#
# Alas, that's why we do it with VMs.
# Disabled as there's a weird issue with installing curl on FreeBSD 15 at the moment.
# - {
# type: "freebsd",
# os_release: "15.0",
# target: "x86_64-unknown-freebsd",
# }
- {
type: "freebsd",
os_release: "14.3",
target: "x86_64-unknown-freebsd",
}
- {
type: "freebsd",
os_release: "13.5",
target: "x86_64-unknown-freebsd",
}
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- name: Enable Rust cache
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # 2.7.8
if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork
with:
key: ${{ matrix.info.target }}-${{ matrix.info.os_release }}
cache-all-crates: true
- name: Clippy (FreeBSD)
if: ${{ matrix.info.type == 'freebsd' }}
uses: vmactions/freebsd-vm@966989c456d41351f095a421f60e71342d3bce41 # v1.2.1
with:
release: "${{ matrix.info.os_release }}"
envs: "RUST_BACKTRACE CARGO_INCREMENTAL CARGO_PROFILE_DEV_DEBUG CARGO_HUSKY_DONT_INSTALL_HOOKS"
usesh: true
prepare: |
pkg install -y curl bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output rustup.sh
sh rustup.sh --default-toolchain stable -y
run: |
. "$HOME/.cargo/env"
cargo clippy --all-targets --workspace -- -D warnings
completion:
name: "CI Pass Check"
needs: [supported, unsupported-check, unsupported-check-freebsd]
if: ${{ needs.supported.result != 'skipped' || needs.unsupported-check.result != 'skipped' || needs.unsupported-check-freebsd.result != 'skipped' }}
runs-on: "ubuntu-latest"
steps:
- name: CI Passed
if: ${{ (needs.supported.result == 'success' || needs.supported.result == 'skipped') && (needs.unsupported-check.result == 'success' || needs.unsupported-check.result == 'skipped') && (needs.unsupported-check-freebsd.result == 'success' || needs.unsupported-check-freebsd.result == 'skipped') }}
run: |
echo "CI workflow completed successfully.";
- name: CI Failed
if: ${{ needs.supported.result == 'failure' || needs.unsupported-check.result == 'failure' || needs.unsupported-check-freebsd.result == 'failure' }}
run: |
echo "CI workflow failed.";
exit 1;
- name: CI Cancelled
if: ${{ needs.supported.result == 'cancelled' || needs.unsupported-check.result == 'cancelled' || needs.unsupported-check-freebsd.result == 'cancelled' }}
run: |
echo "CI workflow was cancelled.";
exit 1;

View File

@ -1,44 +0,0 @@
# Simple job to clear the cache used by a workflow. This automatically runs when a PR is closed/merged
# to clean up the corresponding PR's cache.
name: "clear workflow cache"
on:
workflow_dispatch:
inputs:
id:
description: "Which id to clear. Type main/master/all to clean all, and keep-main/keep-master to clean all but the main branch."
required: false
pull_request:
types:
- closed
schedule:
- cron: "0 11 * * 0"
jobs:
clear-cache:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
# We run each script twice with a small delay in between to try and catch everything.
- name: Clear cache
run: |
if [[ -n "${{ github.event.schedule }}" ]]; then
python ./scripts/clear_cache.py keep-main
sleep 5
python ./scripts/clear_cache.py keep-main
elif [[ -z "${{ github.event.inputs.id }}" ]]; then
python ./scripts/clear_cache.py ${{ github.event.pull_request.number }}
sleep 5
python ./scripts/clear_cache.py ${{ github.event.pull_request.number }}
else
python ./scripts/clear_cache.py ${{ github.event.inputs.id }}
sleep 5
python ./scripts/clear_cache.py ${{ github.event.inputs.id }}
fi

View File

@ -1,106 +0,0 @@
# Code coverage generation via cargo-llvm-cov, which is then uploaded to Codecov.
# Codecov will report back via a comment if run on a PR.
#
# Note that Codecov will report back the average all uploaded coverage files.
name: codecov
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
env:
CARGO_INCREMENTAL: 0
CARGO_HUSKY_DONT_INSTALL_HOOKS: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'ClementTsang/bottom' }}
jobs:
pre-job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1
with:
skip_after_successful_duplicate: "false"
paths: '["tests/**", "src/**", ".github/workflows/coverage.yml", ".cargo/**", "Cargo.toml", "Cargo.lock", "build.rs"]'
do_not_skip: '["workflow_dispatch", "push"]'
coverage:
needs: pre-job
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
runs-on: ${{ matrix.info.os }}
timeout-minutes: 12
strategy:
fail-fast: false
matrix:
info:
- { os: "ubuntu-latest", target: "x86_64-unknown-linux-gnu" }
- { os: "macos-14", target: "aarch64-apple-darwin", cross: false }
- { os: "windows-2022", target: "x86_64-pc-windows-msvc" }
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Set up Rust toolchain
uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
with:
toolchain: stable
- name: Enable Rust cache
uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # 2.7.8
if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork
with:
key: ${{ matrix.info.target }}
cache-all-crates: true
- name: Install cargo-llvm-cov
run: |
rustup component add llvm-tools-preview
cargo install cargo-llvm-cov --version 0.6.11 --locked
- name: Generate code coverage
run: |
cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info --locked --target=${{ matrix.info.target }}
# The token is generally not needed, but sometimes the default shared token hits limits.
# Yes this is ugly as hell. Why this is not a built-in feature of GHA, I have no idea.
- name: Upload to codecov.io (Attempt 1)
id: upload_attempt_1
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
files: lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ matrix.info.os }}
continue-on-error: true
- name: Upload to codecov.io (Attempt 2)
id: upload_attempt_2
if: steps.upload_attempt_1.outcome == 'failure'
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
files: lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ matrix.info.os }}
continue-on-error: true
- name: Upload to codecov.io (Attempt 3)
id: upload_attempt_3
if: steps.upload_attempt_2.outcome == 'failure'
uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
files: lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
flags: ${{ matrix.info.os }}
continue-on-error: true

View File

@ -1,144 +0,0 @@
# How we deploy a release. Covers binary builds. Also manages packaging for choco.
#
# Binaries are primarily built by GHA, though some Linux, M1 macOS, and FreeBSD builds are
# handled by CirrusCI.
name: deployment
on:
workflow_dispatch:
inputs:
tag:
description: "Which tag to deploy as:"
required: true
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_HUSKY_DONT_INSTALL_HOOKS: true
jobs:
initialize:
name: initialize
runs-on: ubuntu-latest
outputs:
version: ${{ env.VERSION }}
steps:
- name: Get the release version from the tag
if: env.VERSION == ''
run: |
if [[ -n "${{ github.event.inputs.tag }}" ]]; then
echo "Manual run against a tag; overriding actual tag in the environment..."
echo "VERSION=${{ github.event.inputs.tag }}" >> $GITHUB_ENV
else
echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi
- name: Validate version environment variable
run: |
echo "Version being built against is version ${{ env.VERSION }}"!
build-release:
needs: [initialize]
uses: ./.github/workflows/build_releases.yml
with:
caller: "deployment"
secrets: inherit
generate-choco:
needs: [initialize, build-release]
name: "Generate Chocolatey files"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- name: Set release version
shell: bash
run: |
echo "RELEASE_VERSION=${{ needs.initialize.outputs.version }}" >> $GITHUB_ENV
- name: Validate release version
run: |
echo "Release version: ${{ env.RELEASE_VERSION }}"
- name: Get release artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: release-*
path: release
merge-multiple: true
- name: Execute choco packaging script
run: |
python "./scripts/windows/choco/choco_packager.py" "./release/bottom_x86_64-pc-windows-msvc.zip" ${{ env.RELEASE_VERSION }} "./scripts/windows/choco/bottom.nuspec.template" "./scripts/windows/choco/chocolateyinstall.ps1.template" "bottom.nuspec" "tools/chocolateyinstall.ps1" "tools/"
zip -r choco.zip "bottom.nuspec" "tools"
- name: Move release file into release directory
shell: bash
run: |
mv choco.zip release/
- name: Save release as artifact
uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
with:
retention-days: 3
name: release-choco
path: release
upload-release:
name: upload-release
runs-on: ubuntu-latest
needs: [initialize, generate-choco, build-release]
steps:
- name: Set release version
shell: bash
run: |
echo "RELEASE_VERSION=${{ needs.initialize.outputs.version }}" >> $GITHUB_ENV
- name: Validate release version
run: |
echo "Release version: ${{ env.RELEASE_VERSION }}"
- name: Get release artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: release-*
path: release
merge-multiple: true
- name: Print out all release files
run: |
echo "Generated $(ls ./release | wc -l) files:"
du -h -d 0 ./release/*
- name: Create release and add release files
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # 2.0.8
with:
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
tag_name: ${{ env.RELEASE_VERSION }}
draft: true
fail_on_unmatched_files: true
name: ${{ env.RELEASE_VERSION }} Release
body: |
<!-- Write summary here -->
---
## Bug Fixes
## Features
## Changes
## Other
## Internal Changes
files: |
./release/*

View File

@ -1,46 +0,0 @@
# Workflow to deploy mkdocs documentation.
name: docs
on:
workflow_dispatch:
push:
branches:
- main
paths:
- "docs/**"
- ".github/workflows/docs.yml"
env:
# Assign commit authorship to official GitHub Actions bot when pushing to the `gh-pages` branch:
GIT_USER: "github-actions[bot]"
GIT_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
jobs:
build-documentation:
name: Build and deploy docs
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.12
- name: Install Python dependencies
run: pip install -r docs/requirements.txt
- name: Configure git user and email
run: |
git config --global user.name ${GIT_USER}
git config --global user.email ${GIT_EMAIL}
echo Name: $(git config --get user.name)
echo Email: $(git config --get user.email)
- name: Build and deploy docs with mike
run: |
cd docs
mike deploy nightly --push

View File

@ -1,97 +0,0 @@
# Creates nightly deployment builds for main targets. Note this does not cover package distribution channels,
# such as choco.
name: nightly
on:
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
inputs:
isMock:
description: "Mock run"
default: true
required: false
type: boolean
env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_HUSKY_DONT_INSTALL_HOOKS: true
jobs:
# Check if things should be skipped, or if this is a mock job.
initialize-job:
name: initialize-job
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- name: Check if this action should be skipped
id: skip_check
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1
with:
skip_after_successful_duplicate: "true"
do_not_skip: '["workflow_dispatch"]'
- name: Check if mock
run: |
if [[ -z "${{ github.event.inputs.isMock }}" ]]; then
echo "This is a scheduled nightly run."
elif [[ "${{ github.event.inputs.isMock }}" == "true" ]]; then
echo "This is a mock run."
else
echo "This is NOT a mock run. Watch for the generated files!"
fi
build-release:
needs: initialize-job
if: ${{ needs.initialize-job.outputs.should_skip != 'true' }}
uses: ./.github/workflows/build_releases.yml
with:
caller: "nightly"
secrets: inherit
upload-release:
name: upload-release
needs: build-release
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 1
- name: Get release artifacts
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
pattern: release-*
path: release
merge-multiple: true
- name: Print out all release files
run: |
echo "Generated $(ls ./release | wc -l) files:"
du -h -d 0 ./release/*
- name: Delete tag and release if not mock
if: github.event.inputs.isMock != 'true'
run: gh release delete nightly --cleanup-tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Sleep for a few seconds to prevent timing issues between the deletion and creation of the release
run: sleep 10
if: github.event.inputs.isMock != 'true'
- name: Add all release files and create nightly release if not mock
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # 2.0.8
if: github.event.inputs.isMock != 'true'
with:
token: ${{ secrets.GITHUB_TOKEN }}
prerelease: true
tag_name: "nightly"
draft: false
fail_on_unmatched_files: true
files: |
./release/*

View File

@ -1,102 +0,0 @@
# Actions to run after releasing a version, like:
# - Generating documentation via mkdocs
# - Notifying packaging repos
name: post-release
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: "Which tag to deploy as:"
required: true
env:
# Assign commit authorship to official GitHub Actions bot when pushing to the `gh-pages` branch:
GIT_USER: "github-actions[bot]"
GIT_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
jobs:
initialize:
name: initialize
runs-on: ubuntu-latest
outputs:
version: ${{ env.VERSION }}
steps:
- name: Get the release version from the tag
run: |
if [[ -n "${{ github.event.inputs.tag }}" ]]; then
echo "Manual run against a tag; overriding actual tag in the environment..."
echo "VERSION=${{ github.event.inputs.tag }}" >> "$GITHUB_ENV"
else
echo "VERSION=${{ github.event.release.tag_name }}" >> "$GITHUB_ENV"
fi
- name: Make sure you're not on master/main/nightly
run: |
echo ${{ env.VERSION }}
if [[ ${{ env.VERSION }} == "master" || ${{ env.VERSION }} == "main" || ${{ env.VERSION }} == "nightly" ]]; then
exit 1
fi
docs:
needs: [initialize]
runs-on: ubuntu-latest
steps:
- name: Set release version
shell: bash
run: |
echo "RELEASE_VERSION=${{ needs.initialize.outputs.version }}" >> $GITHUB_ENV
- name: Validate release version
run: |
echo "Release version: ${{ env.RELEASE_VERSION }}"
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.12
- name: Install Python dependencies
run: pip install -r docs/requirements.txt
- name: Configure git user and email
run: |
git config --global user.name ${GIT_USER}
git config --global user.email ${GIT_EMAIL}
echo Name: $(git config --get user.name)
echo Email: $(git config --get user.email)
- name: Build and deploy docs with mike as the latest stable branch
run: |
cd docs
OLD_STABLE_VERSION=$(mike list stable | grep -Po '([0-9]+.[0-9]+.[0-9]+)' | head -n1)
echo ${OLD_STABLE_VERSION}
mike retitle --push stable ${OLD_STABLE_VERSION}
mike deploy --push --update-aliases ${RELEASE_VERSION} stable
mike retitle --push ${RELEASE_VERSION} "${RELEASE_VERSION} (stable)"
chocolatey:
needs: [initialize]
runs-on: ubuntu-latest
steps:
- name: Set release version
shell: bash
run: |
echo "RELEASE_VERSION=${{ needs.initialize.outputs.version }}" >> $GITHUB_ENV
- name: Validate release version
run: |
echo "Release version: ${{ env.RELEASE_VERSION }}"
- name: Trigger choco
run: |
curl -X POST https://api.github.com/repos/ClementTsang/choco-bottom/dispatches \
-H 'Accept: application/vnd.github.everest-preview+json' \
-u ${{ secrets.BOTTOM_PACKAGE_DEPLOYMENT }} \
--data '{ "event_type": "update", "client_payload": { "version": "'"$RELEASE_VERSION"'" } }'

View File

@ -1,47 +0,0 @@
# Small CI workflow to test if mkdocs documentation can be successfully built.
name: test docs
on:
workflow_dispatch:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'ClementTsang/bottom' }}
jobs:
pre-job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1
with:
skip_after_successful_duplicate: "true"
paths: '["docs/**", ".github/workflows/docs.yml", ".github/workflows/test_docs.yml"]'
do_not_skip: '["workflow_dispatch"]'
test-build-documentation:
name: Test building docs
needs: pre-job
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.12
- name: Install Python dependencies
run: pip install -r docs/requirements.txt
- name: Build docs with mkdocs
run: |
cd docs
mkdocs build

View File

@ -1,60 +0,0 @@
# Workflow to validate the latest schema.
name: "validate schema"
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
paths:
- "schema/**"
- "scripts/schema/**"
- ".github/workflows/validate_schema.yml"
- "src/bin/schema.rs"
- "Cargo.toml"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' || github.repository != 'ClementTsang/bottom' }}
jobs:
pre-job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@f75f66ce1886f00957d99748a42c724f4330bdcf # v5.3.1
with:
skip_after_successful_duplicate: "true"
paths: '["schema/**", "scripts/schema/**", ".github/workflows/validate_schema.yml", "src/bin/schema.rs", "Cargo.toml"]'
do_not_skip: '["workflow_dispatch"]'
test-build-documentation:
name: Test validating schema
needs: pre-job
if: ${{ needs.pre-job.outputs.should_skip != 'true' }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
with:
python-version: 3.12
- name: Install Python dependencies
run: pip install -r scripts/schema/requirements.txt
- name: Test nightly validates on valid sample configs
run: |
python3 scripts/schema/validator.py -s ./schema/nightly/bottom.json -f ./sample_configs/default_config.toml
python3 scripts/schema/validator.py --uncomment -s ./schema/nightly/bottom.json -f ./sample_configs/default_config.toml
python3 scripts/schema/validator.py -s ./schema/nightly/bottom.json -f ./sample_configs/demo_config.toml
- name: Test nightly catches on a bad sample config
run: |
python3 scripts/schema/validator.py -s ./schema/nightly/bottom.json -f scripts/schema/bad_file.toml --should_fail

47
.gitignore vendored
View File

@ -2,49 +2,12 @@
# will have compiled files and executables
/target/
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
# Logging
*.log
# Flamegraph stuff
flamegraphs/
rust-unmangle
*.svg
*.data
*.data.old
# IntelliJ
.idea/
# Heaptrack files
*.zst
# For testing
sample_configs/testing*.toml
# Cargo-deny
deny.toml
# vscode
.vscode
# mkdocs
site/
# dhat heap profiling
dhat-heap.json
dhat/
# cargo vet
supply-chain/
# samply profiling
profile.json
profile.json.gz
**/venv/
# Sometimes used for scripts
.ruff_cache
.vscode

View File

@ -1,9 +1,4 @@
{
"MD013": false,
"MD041": false,
"MD033": false,
"MD040": false,
"MD024": false,
"MD025": false,
"MD046": false
"MD033": false
}

43
.travis.yml Normal file
View File

@ -0,0 +1,43 @@
language: rust
rust:
- stable
- beta
- nightly
os:
- linux
- osx
- windows
jobs:
allow_failures:
- rust: nightly
- env: TARGET=x86_64-pc-windows-gnu # Seems to cause problems. TODO: Add test for it, but keep allow fail.
fast_finish: true
before_install:
- export RUST_BACKTRACE=1
- |
if [[ $TRAVIS_OS_NAME == "linux" ]]; then
export TARGET=x86_64-unknown-linux-gnu;
elif [[ $TRAVIS_OS_NAME == "windows" ]]; then
export TARGET=x86_64-pc-windows-msvc;
elif [[ $TRAVIS_OS_NAME == "osx" ]]; then
export TARGET=x86_64-apple-darwin;
fi
before_script: rustup target add $TARGET
script:
- cargo build --verbose --target $TARGET
- cargo test --verbose --target $TARGET
# Need to cache the whole `.cargo` directory to keep .crates.toml for cargo-update to work
cache:
directories:
- /home/travis/.cargo
# But don't cache the cargo registry.
before_cache:
- rm -rf /home/travis/.cargo/git
- rm -rf /home/travis/.cargo/registry
notifications:
email:
on_success: never

View File

@ -1,905 +0,0 @@
# Changelog
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.
- [#1749](https://github.com/ClementTsang/bottom/pull/1749): Fix invalid desktop file values.
## [0.10.2] - 2024-08-05
### Features
- [#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.
### Other
- [#1394](https://github.com/ClementTsang/bottom/pull/1394): Add JSON Schema support.
## [0.9.7] - 2024-07-26
## Bug Fixes
- [#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.
### Other
- [#1206](https://github.com/ClementTsang/bottom/pull/1206): Add `.rpm` package generation.
- [#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.
- [#766](https://github.com/ClementTsang/bottom/pull/766): Add FreeBSD support.
- [#774](https://github.com/ClementTsang/bottom/pull/774): Add half page scrolling with `ctrl-u` and `ctrl-d`.
- [#784](https://github.com/ClementTsang/bottom/pull/784): Add ZFS ARC support.
- [#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.
- [#845](https://github.com/ClementTsang/bottom/pull/845), [#922](https://github.com/ClementTsang/bottom/pull/922): Add macOS M1, FreeBSD 12, and FreeBSD 13 binary build tasks.
- [#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.
### Other
- [#658](https://github.com/ClementTsang/bottom/pull/658): Update sysinfo.
## [0.6.6] - 2021-12-22
### Changes
- [#637](https://github.com/ClementTsang/bottom/pull/637): Remove duplicate guest time in process CPU calculation
### Bug Fixes
- [#637](https://github.com/ClementTsang/bottom/pull/637): Fix process CPU calculation if /proc/stat CPU line has fewer values than expected
## [0.6.5] - 2021-12-19
### Bug Fixes
- [#600](https://github.com/ClementTsang/bottom/pull/600): Address RUSTSEC-2020-0071
- [#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.
- [e04ce4f](https://github.com/ClementTsang/bottom/commit/e04ce4fa1b42e99f00cf8825bcd58da43552214e): Fix `--use_old_network_legend`.
- [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.
- [#296](https://github.com/ClementTsang/bottom/pull/296): Built-in colour themes.
- [#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.
- [#55](https://github.com/ClementTsang/bottom/issues/55): Battery monitoring widget.
- [#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.
- [#21](https://github.com/ClementTsang/bottom/issues/21): Basic mode added.
- [#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.
## [0.1.0] - 2020-01-11
Initial release.

View File

@ -1,40 +0,0 @@
# Contribution
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.

2070
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -1,266 +1,41 @@
[package]
name = "bottom"
version = "0.12.0"
version = "0.1.2"
authors = ["Clement Tsang <clementjhtsang@gmail.com>"]
edition = "2018"
repository = "https://github.com/ClementTsang/bottom"
keywords = ["cli", "monitoring-tool", "top", "bottom", "graphical"]
license = "MIT"
description = "A customizable cross-platform graphical process/system monitor for the terminal. Supports Linux, macOS, and Windows."
documentation = "https://clementtsang.github.io/bottom/stable"
categories = ["command-line-utilities"]
description = "A graphical top clone, written in Rust. Inspired by both gtop and gotop."
readme = "README.md"
default-run = "btm"
build = "build.rs"
authors = ["Clement Tsang <cjhtsang@uwaterloo.ca>"]
keywords = ["cross-platform", "monitoring", "cli", "top", "tui"]
categories = ["command-line-utilities", "visualization"]
exclude = [
".cargo-husky/",
".github/",
".idea/",
".vscode/",
"assets/",
"desktop/",
"docs/",
"flamegraphs/",
"sample_configs/",
"schema/",
"scripts/",
"wix/",
".all-contributorsrc",
".cirrus.yml",
".gitignore",
".markdownlint.json",
"CHANGELOG.md",
"clippy.toml",
"codecov.yml",
"CONTRIBUTING.md",
"Cross.toml",
"rust-toolchain.toml",
"rustfmt.toml",
]
edition = "2021"
# The oldest version I've tested that should still build - note this is not an official MSRV!
rust-version = "1.81"
[lib]
test = true
doctest = true
doc = true
[[bin]]
name = "btm"
path = "src/bin/main.rs"
doc = false
[[bin]]
name = "schema"
path = "src/bin/schema.rs"
test = false
doctest = false
doc = false
required-features = ["generate_schema"]
[features]
# Used for general builds.
battery = ["starship-battery"]
nvidia = ["nvml-wrapper"]
gpu = ["nvidia"]
zfs = []
deploy = ["battery", "gpu", "zfs"]
default = ["deploy"]
# Should not be included in builds.
logging = ["fern", "log", "time"]
generate_schema = ["schemars", "serde_json", "strum"]
[dependencies]
anyhow = "1.0.99"
backtrace = "0.3.75"
cfg-if = "1.0.3"
clap = { version = "4.5.45", features = [
"default",
"cargo",
"wrap_help",
"derive",
] }
concat-string = "1.0.1"
crossterm = "0.29.0"
ctrlc = { version = "3.4.7", features = ["termination"] }
dirs = "6.0.0"
hashbrown = "0.15.5"
humantime = "2.2.0"
indexmap = "2.10.0"
indoc = "2.0.6"
itertools = "0.14.0"
nvml-wrapper = { version = "0.11.0", optional = true, features = [
"legacy-functions",
] }
regex = "1.11.1"
serde = { version = "1.0.219", features = ["derive"] }
starship-battery = { version = "0.10.2", optional = true }
sysinfo = "=0.37.0"
timeless = "0.0.14-alpha"
toml_edit = { version = "0.22.27", features = ["serde"] }
tui = { version = "0.29.0", package = "ratatui", features = [
"unstable-rendered-line-info",
] }
unicode-ellipsis = "0.3.0"
unicode-segmentation = "1.12.0"
unicode-width = "0.2.0"
# Used for logging. Mostly a debugging tool.
fern = { version = "0.7.1", optional = true }
log = { version = "0.4.27", optional = true }
time = { version = "0.3.41", features = [
"local-offset",
"formatting",
"macros",
], optional = true }
# These are just used for JSON schema generation.
schemars = { version = "0.9.0", optional = true }
serde_json = { version = "1.0.143", optional = true }
strum = { version = "0.27.2", features = ["derive"], optional = true }
[target.'cfg(unix)'.dependencies]
libc = "0.2.175"
[target.'cfg(target_os = "linux")'.dependencies]
rustix = { version = "1.0.8", features = ["fs", "param"] }
[target.'cfg(target_os = "macos")'.dependencies]
core-foundation = "0.10.1"
mach2 = "0.4.3"
[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.61.3", features = [
"Win32_Foundation",
"Win32_Security",
"Win32_Storage_FileSystem",
"Win32_System_IO",
"Win32_System_Ioctl",
"Win32_System_ProcessStatus",
"Win32_System_Threading",
] }
[target.'cfg(target_os = "freebsd")'.dependencies]
serde_json = { version = "1.0.143" }
sysctl = { version = "0.6.0" }
filedescriptor = "0.8.3"
[dev-dependencies]
assert_cmd = "2.0.17"
cargo-husky = { version = "1.5.0", default-features = false, features = [
"user-hooks",
] }
predicates = "3.1.3"
tempfile = { version = "3.21.0", default-features = false }
[target.'cfg(all(target_arch = "x86_64", target_os = "linux"))'.dev-dependencies]
portable-pty = "0.9.0"
[build-dependencies]
clap = { version = "4.5.45", features = [
"default",
"cargo",
"wrap_help",
"derive",
] }
clap_complete = "4.5.57"
clap_complete_nushell = "4.5.8"
clap_complete_fig = "4.5.2"
clap_mangen = "0.2.29"
indoc = "2.0.6"
# Compile dependencies with optimizations enabled, even in debug mode.
[profile.dev.package."*"]
opt-level = 3
path = "src/main.rs"
[profile.release]
debug = 0
strip = "symbols"
debug = 1
opt-level = 'z' # Optimize for size.
lto = true
opt-level = 3
codegen-units = 1
[profile.profiling]
inherits = "release"
debug = true
strip = false
[dependencies]
chrono = "0.4.10"
clap = "2.33.0"
crossterm = "0.14"
failure = "0.1.6"
fern = "0.5"
futures-timer = "2.0.2"
futures = "0.3.1"
heim = "0.0.9"
log = "0.4"
regex = "1.3.1"
sysinfo = "0.9" #0.9 seems to be the last working version for my Ryzen PC...
tokio = "0.2.9"
winapi = "0.3"
tui = {version = "0.8", features = ["crossterm"], default-features = false }
lazy_static = "1.4"
[package.metadata.deb]
section = "utility"
assets = [
[
"target/release/btm",
"usr/bin/",
"755",
],
[
"LICENSE",
"usr/share/doc/btm/",
"644",
],
[
"manpage/btm.1.gz",
"usr/share/man/man1/btm.1.gz",
"644",
],
[
"completion/btm.bash",
"usr/share/bash-completion/completions/btm",
"644",
],
[
"completion/btm.fish",
"usr/share/fish/vendor_completions.d/btm.fish",
"644",
],
[
"completion/_btm",
"usr/share/zsh/vendor-completions/",
"644",
],
[
"desktop/bottom.desktop",
"usr/share/applications/bottom.desktop",
"644",
],
]
extended-description = """
By default, bottom will look for a config file in ~/.config/bottom/bottom.toml. A config file can be specified \
using `-C`. If a config file does not exist at the specified or default location, a default one will be created \
for the user there.
"""
[package.metadata.deb.variants.arm64]
depends = "libc6:arm64 (>= 2.28)"
[package.metadata.deb.variants.armhf]
depends = "libc6:armhf (>= 2.28)"
[package.metadata.wix]
output = "bottom_installer.msi"
[package.metadata.generate-rpm]
assets = [
{ source = "target/release/btm", dest = "/usr/bin/", mode = "755" },
{ source = "LICENSE", dest = "/usr/share/doc/btm/", mode = "644" },
{ source = "manpage/btm.1.gz", dest = "/usr/share/man/man1/btm.1.gz", mode = "644", doc = true },
{ source = "completion/btm.bash", dest = "/usr/share/bash-completion/completions/btm", mode = "644" },
{ source = "completion/btm.fish", dest = "/usr/share/fish/vendor_completions.d/btm.fish", mode = "644" },
{ source = "completion/_btm", dest = "/usr/share/zsh/vendor-completions/", mode = "644" },
{ source = "desktop/bottom.desktop", dest = "/usr/share/applications/bottom.desktop", mode = "644" },
]
[lints.rust]
rust_2018_idioms = "deny"
# missing_docs = "deny"
[lints.rustdoc]
broken_intra_doc_links = "deny"
missing_crate_level_docs = "deny"
[lints.clippy]
todo = "deny"
unimplemented = "deny"
missing_safety_doc = "deny"
[dev-dependencies]
assert_cmd = "0.12"
predicates = "1"

View File

@ -1,2 +0,0 @@
[build.env]
passthrough = ["RUST_BACKTRACE", "BTM_GENERATE"]

634
README.md
View File

@ -1,588 +1,128 @@
<div align="center">
<h1>bottom (btm)</h1>
# bottom
<p>
A customizable cross-platform graphical process/system monitor for the terminal.<br />Supports Linux, macOS, and Windows. Inspired by <a href=https://github.com/aksakalli/gtop>gtop</a>, <a href=https://github.com/xxxserxxx/gotop>gotop</a>, and <a href=https://github.com/htop-dev/htop>htop</a>.
</p>
[![Build Status](https://travis-ci.com/ClementTsang/bottom.svg?token=1wvzVgp94E1TZyPNs8JF&branch=master)](https://travis-ci.com/ClementTsang/bottom) [![crates.io link](https://img.shields.io/crates/v/bottom.svg)](https://crates.io/crates/bottom)
[<img src="https://img.shields.io/github/checks-status/ClementTsang/bottom/main?style=flat-square&logo=github" alt="CI status">](https://github.com/ClementTsang/bottom/actions?query=branch%3Amain)
[<img src="https://img.shields.io/crates/v/bottom.svg?style=flat-square" alt="crates.io link">](https://crates.io/crates/bottom)
[<img src="https://img.shields.io/badge/docs-stable-66c2a5?style=flat-square&labelColor=555555&logoColor=white" alt="Stable documentation">](https://clementtsang.github.io/bottom/stable)
[<img src="https://img.shields.io/badge/docs-nightly-88c0d0?style=flat-square&labelColor=555555&logoColor=white" alt="Nightly documentation">](https://clementtsang.github.io/bottom/nightly)
A graphical top clone, written in Rust. Inspired by both [gtop](https://github.com/aksakalli/gtop) and [gotop](https://github.com/cjbassi/gotop)
</div>
<div align="center">
<img src="assets/demo.gif" alt="Quick demo recording showing off bottom's searching, expanding, and process killing."/>
<p>
<sub>
Demo using the <a href="https://github.com/morhetz/gruvbox">Gruvbox</a> theme (<code>--theme gruvbox</code>), along with <a href="https://www.ibm.com/plex/">IBM Plex Mono</a> and <a href="https://sw.kovidgoyal.net/kitty/">Kitty</a>
</sub>
</p>
</div>
## Table of contents <!-- omit in toc -->
- [Features](#features)
- [Support](#support)
- [Official](#official)
- [Unofficial](#unofficial)
- [Installation](#installation)
- [Cargo](#cargo)
- [Alpine](#alpine)
- [Arch Linux](#arch-linux)
- [Debian / Ubuntu](#debian--ubuntu)
- [Exherbo Linux](#exherbo-linux)
- [Fedora / CentOS / AlmaLinux / Rocky Linux](#fedora--centos--almalinux--rocky-linux)
- [Gentoo](#gentoo)
- [Nix](#nix)
- [openSUSE](#opensuse)
- [Snap](#snap)
- [Solus](#solus)
- [Void](#void)
- [gah](#gah)
- [Homebrew](#homebrew)
- [MacPorts](#macports)
- [Chocolatey](#chocolatey)
- [Scoop](#scoop)
- [winget](#winget)
- [Windows installer](#windows-installer)
- [Conda](#conda)
- [Pre-built binaries](#pre-built-binaries)
- [Auto-completion](#auto-completion)
- [Usage](#usage)
- [Configuration](#configuration)
- [Troubleshooting](#troubleshooting)
- [Contribution](#contribution)
- [Contributors](#contributors)
- [Thanks](#thanks)
## Features
As (yet another) process/system visualization and management application, bottom supports the typical features:
- Graphical visualization widgets for:
- [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
with support for zooming in/out the current time interval displayed.
- Widgets for displaying info about:
- [Disk capacity/usage](https://clementtsang.github.io/bottom/nightly/usage/widgets/disk/)
- [Temperature sensors](https://clementtsang.github.io/bottom/nightly/usage/widgets/temperature/)
- [Battery usage](https://clementtsang.github.io/bottom/nightly/usage/widgets/battery/)
- [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:
- [Kill signals](https://clementtsang.github.io/bottom/nightly/usage/widgets/process/#process-termination)
- [Tree mode](https://clementtsang.github.io/bottom/nightly/usage/widgets/process/#tree-mode)
- [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:
- Custom and built-in colour themes
- Customizing widget behaviour
- Changing the layout of widgets
- Filtering out entries in some widgets
- And more:
- [An htop-inspired basic mode](https://clementtsang.github.io/bottom/nightly/usage/basic-mode/)
- [Expansion, which focuses on just one widget](https://clementtsang.github.io/bottom/nightly/usage/general-usage/#expansion)
- And more!
You can find more details in [the documentation](https://clementtsang.github.io/bottom/nightly/usage/general-usage/).
## Support
### Official
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/).
![Quick demo recording](assets/recording_1.gif)
## Installation
### Cargo
### Linux
Installation via `cargo` can be done by installing the [`bottom`](https://crates.io/crates/bottom) crate:
You can install by cloning and using `cargo build --release`, or use `cargo install bottom`. Other installation methods based on distros are as follows:
```bash
# You might need to update the stable version of Rust first.
# Other versions might work, but this is not guaranteed.
rustup update stable
#### Arch Linux
# Install the binary from crates.io.
cargo install bottom --locked
You can get it from the AUR by installing `bottom`.
# If you use another channel by default, you can specify
# the what channel to use like so:
cargo +stable install bottom --locked
### Windows
# --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
```
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.
Alternatively, you can use `cargo install` using the repo as the source.
### macOS
```bash
# You might need to update the stable version of Rust first.
# Other versions might work, but this is not guaranteed.
rustup update stable
macOS support will hopefully come soon<sup>TM</sup>.
# Option 1 - Download an archive from releases and install
curl -LO https://github.com/ClementTsang/bottom/archive/0.11.1.tar.gz
tar -xzvf 0.11.1.tar.gz
cargo install --path . --locked
## Support
# Option 2 - Manually clone the repo and install
git clone https://github.com/ClementTsang/bottom
cd bottom
cargo install --path . --locked
The compatibility of each widget and operating systems are, as of version 0.1.0, as follows:
# Option 3 - Install using cargo with the repo as the source
cargo install --git https://github.com/ClementTsang/bottom --locked
# You can also pass in the target-cpu=native flag to try to
# use better CPU-specific optimizations. For example:
RUSTFLAGS="-C target-cpu=native" cargo install --path . --locked
```
### Alpine
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.
Some examples of installing it this way:
```bash
# x86-64
curl -LO https://github.com/ClementTsang/bottom/releases/download/0.11.1/bottom_0.11.1-1_amd64.deb
sudo dpkg -i bottom_0.11.1-1_amd64.deb
# ARM64
curl -LO https://github.com/ClementTsang/bottom/releases/download/0.11.1/bottom_0.11.1-1_arm64.deb
sudo dpkg -i bottom_0.11.1-1_arm64.deb
# ARM
curl -LO https://github.com/ClementTsang/bottom/releases/download/0.11.1/bottom_0.11.1-1_armhf.deb
sudo dpkg -i bottom_0.11.1-1_armhf.deb
# musl-based
curl -LO https://github.com/ClementTsang/bottom/releases/download/0.11.1/bottom-musl_0.11.1-1_amd64.deb
sudo dpkg -i bottom-musl_0.11.1-1_amd64.deb
```
### Exherbo Linux
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/):
```bash
sudo dnf install --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' --setopt='terra.gpgkey=https://repos.fyralabs.com/terra$releasever/key.asc' terra-release
sudo dnf install bottom
```
`.rpm` files are also generated for x86 in the [releases](https://github.com/ClementTsang/bottom/releases) page.
For example:
```bash
curl -LO https://github.com/ClementTsang/bottom/releases/download/0.11.1/bottom-0.11.1-1.x86_64.rpm
sudo rpm -i bottom-0.11.1-1.x86_64.rpm
```
### Gentoo
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.
| OS/Widget | CPU | Memory | Disks | Temperature | Processes | Networks |
| --------- | -------- | -------- | -------- | --------------------- | --------- | --------------------------------------------- |
| Linux | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| Windows | ✓ | ✓ | ✓ | Currently not working | ✓ | Partially supported (total RX/TX unavailable) |
| macOS | Untested | Untested | Untested | Untested | Untested | Untested |
## Usage
You can run bottom using `btm`.
Run using `btm`.
- 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/).
### Command line options
You can find more information on usage in the [documentation](https://clementtsang.github.io/bottom/nightly/).
- `-h`, `--help` shows the help screen and exits.
## Configuration
- `-a`, `--avgcpu` enables also showing the average CPU usage in addition to per-core CPU usage.
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.
- `-m`, `--dot-marker` uses a dot marker instead of the default braille marker.
More details on configuration can be found [in the documentation](https://clementtsang.github.io/bottom/nightly/configuration/config-file/).
- `-c`, `--celsius` displays the temperature type in Celsius. This is the default.
## Troubleshooting
- `-f`, `--fahrenheit` displays the temperature type in Fahrenheit.
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.
- `-k`, `--kelvin` displays the temperature type in Kelvin.
## Contribution
- `-v`, `--version` displays the version number and exits.
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.
- `-d`, `--debug` enables debug logging.
### Contributors
- `-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.
Thanks to all contributors:
- `-l`, `--left_legend` will move external table legends to the left side rather than the right side. Right side is default.
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://shilangyu.github.io"><img src="https://avatars3.githubusercontent.com/u/29288116?v=4?s=100" width="100px;" alt="Marcin Wojnarowski"/><br /><sub><b>Marcin Wojnarowski</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=shilangyu" title="Code">💻</a> <a href="#platform-shilangyu" title="Packaging/porting to new platform">📦</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://neosmart.net/"><img src="https://avatars3.githubusercontent.com/u/606923?v=4?s=100" width="100px;" alt="Mahmoud Al-Qudsi"/><br /><sub><b>Mahmoud Al-Qudsi</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=mqudsi" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://andys8.de"><img src="https://avatars0.githubusercontent.com/u/13085980?v=4?s=100" width="100px;" alt="Andy"/><br /><sub><b>Andy</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=andys8" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/HarHarLinks"><img src="https://avatars0.githubusercontent.com/u/2803622?v=4?s=100" width="100px;" alt="Kim Brose"/><br /><sub><b>Kim Brose</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=HarHarLinks" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://svenstaro.org"><img src="https://avatars0.githubusercontent.com/u/1664?v=4?s=100" width="100px;" alt="Sven-Hendrik Haase"/><br /><sub><b>Sven-Hendrik Haase</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=svenstaro" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://liberapay.com/Artem4/"><img src="https://avatars0.githubusercontent.com/u/5614476?v=4?s=100" width="100px;" alt="Artem Polishchuk"/><br /><sub><b>Artem Polishchuk</b></sub></a><br /><a href="#platform-tim77" title="Packaging/porting to new platform">📦</a> <a href="https://github.com/ClementTsang/bottom/commits?author=tim77" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://ruby-journal.com/"><img src="https://avatars2.githubusercontent.com/u/135605?v=4?s=100" width="100px;" alt="Trung Lê"/><br /><sub><b>Trung Lê</b></sub></a><br /><a href="#platform-runlevel5" title="Packaging/porting to new platform">📦</a> <a href="#infra-runlevel5" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dm9pZCAq"><img src="https://avatars1.githubusercontent.com/u/46228973?v=4?s=100" width="100px;" alt="dm9pZCAq"/><br /><sub><b>dm9pZCAq</b></sub></a><br /><a href="#platform-dm9pZCAq" title="Packaging/porting to new platform">📦</a> <a href="https://github.com/ClementTsang/bottom/commits?author=dm9pZCAq" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://lukor.org"><img src="https://avatars2.githubusercontent.com/u/10536802?v=4?s=100" width="100px;" alt="Lukas Rysavy"/><br /><sub><b>Lukas Rysavy</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=LlinksRechts" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://hamberg.no/erlend"><img src="https://avatars3.githubusercontent.com/u/16063?v=4?s=100" width="100px;" alt="Erlend Hamberg"/><br /><sub><b>Erlend Hamberg</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=ehamberg" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://onee3.org"><img src="https://avatars.githubusercontent.com/u/4507647?v=4?s=100" width="100px;" alt="Frederick Zhang"/><br /><sub><b>Frederick Zhang</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=Frederick888" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/pvanheus"><img src="https://avatars.githubusercontent.com/u/4154788?v=4?s=100" width="100px;" alt="pvanheus"/><br /><sub><b>pvanheus</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=pvanheus" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/briandipalma"><img src="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 /><a href="https://github.com/ClementTsang/bottom/commits?author=briandipalma" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://dakyskye.github.io"><img src="https://avatars.githubusercontent.com/u/32128756?v=4?s=100" width="100px;" alt="Lasha Kanteladze"/><br /><sub><b>Lasha Kanteladze</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=dakyskye" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/herbygillot"><img src="https://avatars.githubusercontent.com/u/618376?v=4?s=100" width="100px;" alt="Herby Gillot"/><br /><sub><b>Herby Gillot</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=herbygillot" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yellowsquid"><img src="https://avatars.githubusercontent.com/u/46519298?v=4?s=100" width="100px;" alt="Greg Brown"/><br /><sub><b>Greg Brown</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=yellowsquid" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/TotalCaesar659"><img src="https://avatars.githubusercontent.com/u/14265316?v=4?s=100" width="100px;" alt="TotalCaesar659"/><br /><sub><b>TotalCaesar659</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=TotalCaesar659" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/grawlinson"><img src="https://avatars.githubusercontent.com/u/4408051?v=4?s=100" width="100px;" alt="George Rawlinson"/><br /><sub><b>George Rawlinson</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=grawlinson" title="Documentation">📖</a> <a href="#platform-grawlinson" title="Packaging/porting to new platform">📦</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.frogorbits.com/"><img src="https://avatars.githubusercontent.com/u/101246?v=4?s=100" width="100px;" alt="adiabatic"/><br /><sub><b>adiabatic</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=adiabatic" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://electronsweatshop.com"><img src="https://avatars.githubusercontent.com/u/354506?v=4?s=100" width="100px;" alt="Randy Barlow"/><br /><sub><b>Randy Barlow</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=bowlofeggs" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://jackson.dev"><img src="https://avatars.githubusercontent.com/u/160646?v=4?s=100" width="100px;" alt="Patrick Jackson"/><br /><sub><b>Patrick Jackson</b></sub></a><br /><a href="#ideas-patricksjackson" title="Ideas, Planning, & Feedback">🤔</a> <a href="https://github.com/ClementTsang/bottom/commits?author=patricksjackson" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mati865"><img src="https://avatars.githubusercontent.com/u/1174646?v=4?s=100" width="100px;" alt="Mateusz Mikuła"/><br /><sub><b>Mateusz Mikuła</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=mati865" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://blog.guillaume-gomez.fr"><img src="https://avatars.githubusercontent.com/u/3050060?v=4?s=100" width="100px;" alt="Guillaume Gomez"/><br /><sub><b>Guillaume Gomez</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=GuillaumeGomez" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/shurizzle"><img src="https://avatars.githubusercontent.com/u/203655?v=4?s=100" width="100px;" alt="shura"/><br /><sub><b>shura</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=shurizzle" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.wezm.net/"><img src="https://avatars.githubusercontent.com/u/21787?v=4?s=100" width="100px;" alt="Wesley Moore"/><br /><sub><b>Wesley Moore</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=wezm" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/xgdgsc"><img src="https://avatars.githubusercontent.com/u/1189869?v=4?s=100" width="100px;" alt="xgdgsc"/><br /><sub><b>xgdgsc</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=xgdgsc" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ViridiCanis"><img src="https://avatars.githubusercontent.com/u/49595344?v=4?s=100" width="100px;" alt="ViridiCanis"/><br /><sub><b>ViridiCanis</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=ViridiCanis" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jamartin9"><img src="https://avatars.githubusercontent.com/u/7027701?v=4?s=100" width="100px;" alt="Justin Martin"/><br /><sub><b>Justin Martin</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=jamartin9" title="Code">💻</a> <a href="https://github.com/ClementTsang/bottom/commits?author=jamartin9" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/DianaNites"><img src="https://avatars.githubusercontent.com/u/5275194?v=4?s=100" width="100px;" alt="Diana"/><br /><sub><b>Diana</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=DianaNites" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://hervyqa.id"><img src="https://avatars.githubusercontent.com/u/45872139?v=4?s=100" width="100px;" alt="Hervy Qurrotul Ainur Rozi"/><br /><sub><b>Hervy Qurrotul Ainur Rozi</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=hervyqa" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://mrivnak.github.io"><img src="https://avatars.githubusercontent.com/u/7389355?v=4?s=100" width="100px;" alt="Mike Rivnak"/><br /><sub><b>Mike Rivnak</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=mrivnak" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lroobrou"><img src="https://avatars.githubusercontent.com/u/35152113?v=4?s=100" width="100px;" alt="lroobrou"/><br /><sub><b>lroobrou</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=lroobrou" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://cube64128.xyz/"><img src="https://avatars.githubusercontent.com/u/18757988?v=4?s=100" width="100px;" alt="database64128"/><br /><sub><b>database64128</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=database64128" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/sou-chon"><img src="https://avatars.githubusercontent.com/u/35537528?v=4?s=100" width="100px;" alt="Chon Sou"/><br /><sub><b>Chon Sou</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=sou-chon" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Drsheppard01"><img src="https://avatars.githubusercontent.com/u/60893791?v=4?s=100" width="100px;" alt="DrSheppard"/><br /><sub><b>DrSheppard</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=Drsheppard01" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/RaresCon"><img src="https://avatars.githubusercontent.com/u/95525840?v=4?s=100" width="100px;" alt="Rareș Constantin"/><br /><sub><b>Rareș Constantin</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=RaresCon" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://felipesuri.com"><img src="https://avatars.githubusercontent.com/u/50281523?v=4?s=100" width="100px;" alt="felipesuri"/><br /><sub><b>felipesuri</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=felipesuri" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/spital"><img src="https://avatars.githubusercontent.com/u/11034264?v=4?s=100" width="100px;" alt="spital"/><br /><sub><b>spital</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=spital" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://bikodbg.com/"><img src="https://avatars.githubusercontent.com/u/1389811?v=4?s=100" width="100px;" alt="Michael Bikovitsky"/><br /><sub><b>Michael Bikovitsky</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=mbikovitsky" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dvalter"><img src="https://avatars.githubusercontent.com/u/38795282?v=4?s=100" width="100px;" alt="Dmitry Valter"/><br /><sub><b>Dmitry Valter</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=dvalter" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/aragonnetje6"><img src="https://avatars.githubusercontent.com/u/69118097?v=4?s=100" width="100px;" alt="Grace Stok"/><br /><sub><b>Grace Stok</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=aragonnetje6" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yshui"><img src="https://avatars.githubusercontent.com/u/366851?v=4?s=100" width="100px;" alt="Yuxuan Shui"/><br /><sub><b>Yuxuan Shui</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=yshui" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://zongwenqing.com"><img src="https://avatars.githubusercontent.com/u/43934749?v=4?s=100" width="100px;" alt="Wenqing Zong"/><br /><sub><b>Wenqing Zong</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=WenqingZong" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://gabelluardo.github.io"><img src="https://avatars.githubusercontent.com/u/42920247?v=4?s=100" width="100px;" alt="Gabriele Belluardo"/><br /><sub><b>Gabriele Belluardo</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=gabelluardo" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://zebulon.dev/"><img src="https://avatars.githubusercontent.com/u/14242997?v=4?s=100" width="100px;" alt="Zeb Piasecki"/><br /><sub><b>Zeb Piasecki</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=zebp" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://freed-wu.github.io/"><img src="https://avatars.githubusercontent.com/u/32936898?v=4?s=100" width="100px;" alt="wzy"/><br /><sub><b>wzy</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=Freed-Wu" title="Code">💻</a> <a href="https://github.com/ClementTsang/bottom/commits?author=Freed-Wu" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://johnlin.ca/"><img src="https://avatars.githubusercontent.com/u/66440371?v=4?s=100" width="100px;" alt="john-s-lin"/><br /><sub><b>john-s-lin</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=john-s-lin" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/lyuha"><img src="https://avatars.githubusercontent.com/u/4014016?v=4?s=100" width="100px;" alt="Lee Wonjoon"/><br /><sub><b>Lee Wonjoon</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=lyuha" title="Code">💻</a> <a href="https://github.com/ClementTsang/bottom/commits?author=lyuha" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.davlgd.fr"><img src="https://avatars.githubusercontent.com/u/1110600?v=4?s=100" width="100px;" alt="David Legrand"/><br /><sub><b>David Legrand</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=davlgd" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/MichalBryxi"><img src="https://avatars.githubusercontent.com/u/847473?v=4?s=100" width="100px;" alt="Michal Bryxí"/><br /><sub><b>Michal Bryxí</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=MichalBryxi" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://mpia.de/~hviding/"><img src="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 /><a href="https://github.com/ClementTsang/bottom/commits?author=TheSkyentist" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://cosmichorror.dev"><img src="https://avatars.githubusercontent.com/u/30302768?v=4?s=100" width="100px;" alt="CosmicHorror"/><br /><sub><b>CosmicHorror</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=CosmicHorrorDev" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.woods.am/"><img src="https://avatars.githubusercontent.com/u/7113557?v=4?s=100" width="100px;" alt="Ben Woods"/><br /><sub><b>Ben Woods</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=woodsb02" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://cgdct.moe"><img src="https://avatars.githubusercontent.com/u/20411956?v=4?s=100" width="100px;" alt="Stephen Huan"/><br /><sub><b>Stephen Huan</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=stephen-huan" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/jasongwartz"><img src="https://avatars.githubusercontent.com/u/10981911?v=4?s=100" width="100px;" alt="Jason Gwartz"/><br /><sub><b>Jason Gwartz</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=jasongwartz" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/llc0930"><img src="https://avatars.githubusercontent.com/u/14966910?v=4?s=100" width="100px;" alt="llc0930"/><br /><sub><b>llc0930</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=llc0930" title="Code">💻</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://chronovore.dev"><img src="https://avatars.githubusercontent.com/u/614231?v=4?s=100" width="100px;" alt="Ada Ahmed"/><br /><sub><b>Ada Ahmed</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=yretenai" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Wateir"><img src="https://avatars.githubusercontent.com/u/78731687?v=4?s=100" width="100px;" alt="Wateir"/><br /><sub><b>Wateir</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=Wateir" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/al42and"><img src="https://avatars.githubusercontent.com/u/933873?v=4?s=100" width="100px;" alt="Andrey Alekseenko"/><br /><sub><b>Andrey Alekseenko</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=al42and" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://fgimian.github.io/"><img src="https://avatars.githubusercontent.com/u/1811813?v=4?s=100" width="100px;" alt="Fotis Gimian"/><br /><sub><b>Fotis Gimian</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=fgimian" title="Code">💻</a> <a href="https://github.com/ClementTsang/bottom/commits?author=fgimian" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://sigmasquadron.net"><img src="https://avatars.githubusercontent.com/u/174749595?v=4?s=100" width="100px;" alt="Fernando Rodrigues"/><br /><sub><b>Fernando Rodrigues</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=SigmaSquadron" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://mtoohey.com"><img src="https://avatars.githubusercontent.com/u/36740602?v=4?s=100" width="100px;" alt="Matthew Toohey"/><br /><sub><b>Matthew Toohey</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=mtoohey31" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://meander.site"><img src="https://avatars.githubusercontent.com/u/11584387?v=4?s=100" width="100px;" alt="Julius Enriquez"/><br /><sub><b>Julius Enriquez</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=win8linux" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/benjamb"><img src="https://avatars.githubusercontent.com/u/8291297?v=4?s=100" width="100px;" alt="Ben Brown"/><br /><sub><b>Ben Brown</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=benjamb" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nyurik"><img src="https://avatars.githubusercontent.com/u/1641515?v=4?s=100" width="100px;" alt="Yuri Astrakhan"/><br /><sub><b>Yuri Astrakhan</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=nyurik" title="Code">💻</a> <a href="https://github.com/ClementTsang/bottom/commits?author=nyurik" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://kachick.github.io/"><img src="https://avatars.githubusercontent.com/u/1180335?v=4?s=100" width="100px;" alt="Kenichi Kamiya"/><br /><sub><b>Kenichi Kamiya</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=kachick" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/yahlia"><img src="https://avatars.githubusercontent.com/u/40295453?v=4?s=100" width="100px;" alt="yahlia"/><br /><sub><b>yahlia</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=yahlia" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/Bucket-Bucket-Bucket"><img src="https://avatars.githubusercontent.com/u/107044719?v=4?s=100" width="100px;" alt="Bucket-Bucket-Bucket"/><br /><sub><b>Bucket-Bucket-Bucket</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=Bucket-Bucket-Bucket" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://marek.sierocinscy.pl"><img src="https://avatars.githubusercontent.com/u/2142811?v=4?s=100" width="100px;" alt="Marek Sierociński"/><br /><sub><b>Marek Sierociński</b></sub></a><br /><a href="https://github.com/ClementTsang/bottom/commits?author=marverix" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>
- `-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.
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
- `g`, `--group` will group together processes with the same name by default (equivalent to pressing `Tab`).
<!-- ALL-CONTRIBUTORS-LIST:END -->
### Keybindings
## Thanks
#### General
- This project is very much inspired by [gotop](https://github.com/xxxserxxx/gotop),
[gtop](https://github.com/aksakalli/gtop), and [htop](https://github.com/htop-dev/htop/).
- `q`, `Ctrl-c` to quit.
- This application was written with [many](https://github.com/ClementTsang/bottom/blob/main/Cargo.toml),
[_many_ libraries](https://github.com/ClementTsang/bottom/blob/main/Cargo.lock), as well as many services and
programs, all built on top of the work of many talented people. bottom would not exist without all of this.
- `Ctrl-r` to reset the screen and reset all collected data.
- And of course, thank you again to all contributors and package maintainers!
- `f` to freeze the screen from updating with new data. Press `f` again to unfreeze. Note that monitoring will still continue in the background.
- I also really appreciate anyone who has used bottom, and those
who go out of their way to report bugs or suggest ways to improve things. I hope
it's been a useful tool for others.
- `Ctrl+Up/k`, `Ctrl+Down/j`, `Ctrl+Left/h`, `Ctrl+Right/l` to navigate between panels.
- To those who support my work financially via donations, thank you so much.
- `Esc` to close a dialog window.
- Also thanks to JetBrains for providing access to tools that I use to develop bottom
as part of their [open source support program](https://jb.gg/OpenSourceSupport).
- `?` to get a help screen explaining the controls. Note all controls except `Esc` to close the dialog will be disabled while this is open.
<a href="https://jb.gg/OpenSourceSupport">
<img src="https://resources.jetbrains.com/storage/products/company/brand/logos/jetbrains.svg" alt="JetBrains logo" width="150" />
</a>
#### Scrollable Tables
- `Up` and `Down` scrolls through the list if the panel is a table (Temperature, Disks, Processes).
- `gg` or `Home` to jump to the first entry of the current table.
- `G` (`Shift+g`) or `End` to jump to the last entry of the current table.
#### Processes
- `dd` to kill the selected process
- `c` to sort by CPU usage. Sorts in descending order by default. Press again to reverse sorting order.
- `m` to sort by memory usage. Sorts in descending order by default. Press again to reverse sorting order.
- `p` to sort by PID. Sorts in ascending order by default. Press again to reverse sorting order.
- `n` to sort by process name. Sorts in ascending order by default. Press again to reverse sorting order.
- `Tab` to group together processes with the same name. Disables PID sorting. `dd` will now kill all processes covered by that name.
### Mouse actions
- Scrolling with the mouse will scroll through the currently selected list, similar to using the up/down arrow keys.
## Thanks, kudos, and all the like
- This project is very much inspired by both [gotop](https://github.com/cjbassi/gotop) and [gtop](https://github.com/aksakalli/gtop) .
- This application was written with the following libraries:
- [chrono](https://github.com/chronotope/chrono)
- [clap](https://github.com/clap-rs/clap)
- [crossterm](https://github.com/TimonPost/crossterm)
- [failure](https://github.com/rust-lang-nursery/failure)
- [fern](https://github.com/daboross/fern)
- [futures-rs](https://github.com/rust-lang-nursery/futures-rs)
- [futures-timer](https://github.com/rustasync/futures-timer)
- [heim](https://github.com/heim-rs/heim)
- [log](https://github.com/rust-lang-nursery/log)
- [sysinfo](https://github.com/GuillaumeGomez/sysinfo)
- [tokio](https://github.com/tokio-rs/tokio)
- [tui-rs](https://github.com/fdehau/tui-rs)
- [winapi](https://github.com/retep998/winapi-rs)
- [lazy_static](https://github.com/rust-lang-nursery/lazy-static.rs)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 MiB

BIN
assets/recording_1.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 670 KiB

119
build.rs
View File

@ -1,119 +0,0 @@
//! General build script used by bottom to generate completion files and set binary version.
#[expect(dead_code)]
#[path = "src/options/args.rs"]
mod args;
use std::{
env, fs, io,
path::{Path, PathBuf},
};
use clap::{Command, CommandFactory};
use clap_complete::{Generator, generate_to, shells::Shell};
use clap_complete_fig::Fig;
use clap_complete_nushell::Nushell;
use crate::args::BottomArgs;
fn create_dir(dir: &Path) -> io::Result<()> {
fs::create_dir_all(dir).inspect_err(|err| {
eprintln!(
"Couldn't create a directory at {} ({:?}). Aborting.",
dir.display(),
err
)
})
}
fn generate_completions<G>(to_generate: G, cmd: &mut Command, out_dir: &Path) -> io::Result<PathBuf>
where
G: Generator,
{
generate_to(to_generate, cmd, "btm", out_dir)
}
fn btm_generate() -> io::Result<()> {
const ENV_KEY: &str = "BTM_GENERATE";
match env::var_os(ENV_KEY) {
Some(var) if !var.is_empty() => {
let completion_dir =
option_env!("COMPLETION_DIR").unwrap_or("./target/tmp/bottom/completion/");
let manpage_dir = option_env!("MANPAGE_DIR").unwrap_or("./target/tmp/bottom/manpage/");
let completion_out_dir = PathBuf::from(completion_dir);
let manpage_out_dir = PathBuf::from(manpage_dir);
create_dir(&completion_out_dir)?;
create_dir(&manpage_out_dir)?;
// Generate completions
let mut app = BottomArgs::command();
generate_completions(Shell::Bash, &mut app, &completion_out_dir)?;
generate_completions(Shell::Zsh, &mut app, &completion_out_dir)?;
generate_completions(Shell::Fish, &mut app, &completion_out_dir)?;
generate_completions(Shell::PowerShell, &mut app, &completion_out_dir)?;
generate_completions(Shell::Elvish, &mut app, &completion_out_dir)?;
generate_completions(Fig, &mut app, &completion_out_dir)?;
generate_completions(Nushell, &mut app, &completion_out_dir)?;
// Generate manpage
let app = app.name("btm");
let man = clap_mangen::Man::new(app);
let mut buffer: Vec<u8> = Default::default();
man.render(&mut buffer)?;
fs::write(manpage_out_dir.join("btm.1"), buffer)?;
}
_ => {}
}
println!("cargo:rerun-if-env-changed={ENV_KEY}");
Ok(())
}
fn extract_sha(sha: Option<&str>) -> Option<&str> {
sha.and_then(|sha: &str| sha.get(0..8))
}
fn output_nightly_version(version: &str, git_hash: &str) {
println!("cargo:rustc-env=NIGHTLY_VERSION={version}-nightly-{git_hash}");
}
fn nightly_version() {
const ENV_KEY: &str = "BTM_BUILD_RELEASE_CALLER";
match env::var_os(ENV_KEY) {
Some(var) if !var.is_empty() && var == "ci" => {
let version = env!("CARGO_PKG_VERSION");
if let Some(hash) = extract_sha(option_env!("CIRRUS_CHANGE_IN_REPO")) {
// May be set if we're building with Cirrus CI.
output_nightly_version(version, hash);
} else if let Some(hash) = extract_sha(option_env!("GITHUB_SHA")) {
// May be set if we're building with GHA.
output_nightly_version(version, hash);
} else if let Ok(output) = std::process::Command::new("git")
.args(["rev-parse", "--short=8", "HEAD"])
.output()
{
// If we're not building in either, we do the lazy thing and fall back to
// manually grabbing info using git as a command.
let hash = String::from_utf8(output.stdout).unwrap();
output_nightly_version(version, &hash);
}
}
_ => {}
}
println!("cargo:rerun-if-env-changed={ENV_KEY}");
println!("cargo:rerun-if-env-changed=CIRRUS_CHANGE_IN_REPO");
}
fn main() -> io::Result<()> {
btm_generate()?;
nightly_version();
Ok(())
}

View File

@ -1,3 +0,0 @@
cognitive-complexity-threshold = 100
type-complexity-threshold = 500
too-many-arguments-threshold = 8

View File

@ -1,7 +0,0 @@
coverage:
status:
project:
default:
target: auto
threshold: 30%
patch: off

View File

@ -1,10 +0,0 @@
[Desktop Entry]
Name=bottom
Version=1.5
GenericName=System Monitor
Comment=A customizable cross-platform graphical process/system monitor for the terminal.
Exec=btm
Terminal=true
Type=Application
Categories=System;ConsoleOnly;Monitor;
StartupNotify=false

3
docs/.gitignore vendored
View File

@ -1,3 +0,0 @@
site/
venv/
.cache/

View File

@ -1,53 +0,0 @@
# Extended Documentation
This is where the extended documentation resides, hosted on GitHub Pages. We use [MkDocs](https://www.mkdocs.org/),
[Material for MkDocs](https://squidfunk.github.io/mkdocs-material/), and [mike](https://github.com/jimporter/mike).
Documentation is currently built using Python 3.11, though it should work fine with older versions.
## Running locally
One way is to just run `serve.sh`. Alternatively, the manual steps are, assuming your current working directory
is the bottom repo:
```bash
# Change directories to the documentation.
cd docs/
# Create and activate venv.
python -m venv venv
source venv/bin/activate
# Install requirements
pip install -r requirements.txt
# Run mkdocs
venv/bin/mkdocs serve
```
## Deploying
Deploying is done via [mike](https://github.com/jimporter/mike) in order to get versioning. Typically,
this is done through CI, but can be done manually if needed.
### Nightly docs
```bash
cd docs
mike deploy nightly --push
```
### Stable docs
```bash
cd docs
# Rename the previous stable version
mike retitle --push stable $OLD_STABLE_VERSION
# Set the newest version as the most recent stable version
mike deploy --push --update-aliases $RELEASE_VERSION stable
# Append a "(stable)" string to the end.
mike retitle --push $RELEASE_VERSION "$RELEASE_VERSION (stable)"
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

View File

@ -1,103 +0,0 @@
# Command-line Options
The following options can be provided to bottom in the command line to change the behaviour of the program. You can also
see information on these options by running `btm -h`, or run `btm --help` to display more detailed information on each option:
## General Options
| Option | Behaviour |
| ----------------------------------- | ---------------------------------------------------------- |
| `--autohide_time` | Temporarily shows the time scale in graphs. |
| `-b`, `--basic` | Hides graphs and uses a more basic look. |
| `-C`, `--config_location <PATH>` | Sets the location of the config file. |
| `-t`, `--default_time_value <TIME>` | Default time value for graphs. |
| `--default_widget_count <N>` | Sets the N'th selected widget type as the default. |
| `--default_widget_type <WIDGET>` | Sets the default widget type. Use --help for more info. |
| `--disable_click` | Disables mouse clicks. |
| `--disable_keys` | Disables keyboard shortcuts, INCLUDING the ones that stop |
| | bottom. |
| `-m`, `--dot_marker` | Uses a dot marker for graphs. |
| `-e`, `--expanded` | Expand the default widget upon starting the app. |
| `--hide_table_gap` | Hides spacing between table headers and entries. |
| `--hide_time` | Hides the time scale from being shown. |
| `-r`, `--rate <TIME>` | Sets how often data is refreshed. |
| `--retention <TIME>` | How far back data will be stored up to. |
| `--show_table_scroll_position` | Shows the list scroll position tracker in the widget title |
| | for table widgets. |
| `-d`, `--time_delta <TIME>` | The amount of time changed upon zooming. |
## Process Options
| Option | Behaviour |
| --------------------------- | -------------------------------------------------------------------------------------- |
| `-S, --case_sensitive` | Enables case sensitivity by default when searching. |
| `-u, --current_usage` | Calculates process CPU usage as a percentage of current usage rather than total usage. |
| `--disable_advanced_kill` | Hides additional stopping options on Unix-like systems. |
| `--get_threads` | Also gather process thread information. |
| `-g, --group_processes` | Groups processes with the same name by default. No effect if `--tree` is set. |
| `--hide_k_threads` | Hide kernel threads by default. |
| `--process_memory_as_value` | Defaults to showing process memory usage by value. |
| `--process_command` | Shows the full command name instead of the process name by default. |
| `-R, --regex` | Enables regex by default while searching. |
| `-T, --tree` | Makes the process widget use tree mode by default. |
| `--tree_collapse` | Collapse process tree by default. |
| `-n, --unnormalized_cpu` | Show process CPU% usage without averaging over the number of CPU cores. |
| `-W, --whole_word` | Enables whole-word matching by default while searching. |
## Temperature Options
| Option | Behaviour |
| ------------------ | --------------------------------------------- |
| `-c, --celsius` | Use Celsius as the temperature unit. Default. |
| `-f, --fahrenheit` | Use Fahrenheit as the temperature unit. |
| `-k, --kelvin` | Use Kelvin as the temperature unit. |
## CPU Options
| Option | Behaviour |
| --------------------- | ------------------------------------------------- |
| `--cpu_left_legend` | Puts the CPU chart legend on the left side. |
| `--default_cpu_entry` | Sets which CPU entry type is selected by default. |
| `-a, --hide_avg_cpu` | Hides the average CPU usage entry. |
## Memory Options
| Option | Behaviour |
| ---------------------------- | --------------------------------------------------------- |
| `--memory_legend <POSITION>` | Where to place the legend for the memory chart widget. |
| `--enable_cache_memory` | Enable collecting and displaying cache and buffer memory. |
## Network Options
| Option | Behaviour |
| ----------------------------- | ------------------------------------------------------- |
| `--network_legend <POSITION>` | Where to place the legend for the network chart widget. |
| `--network_use_bytes` | Displays the network widget using bytes. |
| `--network_use_binary_prefix` | Displays the network widget with binary prefixes. |
| `--network_use_log` | Displays the network widget with a log scale. |
| `--use_old_network_legend` | (DEPRECATED) Uses a separate network legend. |
## Battery Options
| Option | Behaviour |
| ----------- | ----------------------------------------------- |
| `--battery` | Shows the battery widget in non-custom layouts. |
## GPU Options
| Option | Behaviour |
| --------------- | ----------------------------------------------------------------- |
| `--disable_gpu` | Disable collecting and displaying NVIDIA and AMD GPU information. |
## Style Options
| Option | Behaviour |
| ------------------ | ---------------------------------------------------------------- |
| `--theme <SCHEME>` | Use a built-in color theme, use '--help' for info on the colors. |
## Other Options
| Option | Behaviour |
| ----------------- | ------------------------------------------------- |
| `-h`, `--help` | Prints help info (for more details use `--help`.) |
| `-V`, `--version` | Prints version information. |

View File

@ -1,11 +0,0 @@
# CPU
## Default CPU Graph Selection
You can configure which CPU graph is shown by default when starting up bottom by setting `cpu.default`.
```toml
[cpu]
# One of "all" (default), "average"/"avg"
default = "average"
```

View File

@ -1,67 +0,0 @@
# Disk Table
## Columns
You can configure which columns are shown by the disk table widget by setting the `columns` setting:
```toml
[disk]
# Pick which columns you want to use in any order.
columns = ["Disk", "Mount", "Used", "Free", "Total", "Used%", "R/s", "W/s"]
```
## Filtering Entries
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:
![Disk no filter](../../assets/screenshots/config/disk-filtering/disk_no_filter.webp)
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:
![Disk widget with just disk name filter](../../assets/screenshots/config/disk-filtering/disk_name_filter.webp)
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:
![Disk widget with disk name and mount filter](../../assets/screenshots/config/disk-filtering/disk_name_mount_filter.webp)

View File

@ -1,55 +0,0 @@
# Flags
!!! Warning
This section is in progress, and is just copied from the old documentation.
You can configure flags by putting them in `[flags]` table. Example:
```toml
[flags]
hide_avg_cpu = true
```
Most of the [command line flags](../command-line-options.md) have config file equivalents to avoid having to type them out
each time:
| Field | Type | Functionality |
| ---------------------------- | ------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
| `hide_avg_cpu` | Boolean | Hides the average CPU usage. |
| `dot_marker` | Boolean | Uses a dot marker for graphs. |
| `cpu_left_legend` | Boolean | Puts the CPU chart legend to the left side. |
| `current_usage` | Boolean | Sets process CPU% to be based on current CPU%. |
| `group_processes` | Boolean | Groups processes with the same name by default. |
| `case_sensitive` | Boolean | Enables case sensitivity by default. |
| `whole_word` | Boolean | Enables whole-word matching by default. |
| `regex` | Boolean | Enables regex by default. |
| `basic` | Boolean | Hides graphs and uses a more basic look. |
| `use_old_network_legend` | Boolean | DEPRECATED - uses the older network legend. |
| `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. |
| `disable_click` | Boolean | Disables mouse clicks. |
| `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. |
| `hide_k_threads` | Boolean | Hide kernel threads by default. |

View File

@ -1,21 +0,0 @@
# Config File
For persistent configuration, and for certain configuration options, bottom supports config files.
## Default Config File
If no config file argument is given, it will automatically look for a config file at these locations:
| OS | Default Config Location |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| macOS | `$HOME/Library/Application Support/bottom/bottom.toml`<br/> `$HOME/.config/bottom/bottom.toml` <br/> `$XDG_CONFIG_HOME/bottom/bottom.toml` |
| Linux | `$HOME/.config/bottom/bottom.toml` <br/> `$XDG_CONFIG_HOME/bottom/bottom.toml` |
| Windows | `C:\Users\<USER>\AppData\Roaming\bottom\bottom.toml` |
If the config file doesn't exist at the path, bottom will automatically try to create a new config file at the location
with default values.
## JSON Schema
The configuration file also has [JSON Schema](https://json-schema.org/) support to make it easier to manage, if your
IDE/editor supports it.

View File

@ -1,57 +0,0 @@
# Layout
!!! Warning
This section is in progress, and is just copied from the old documentation.
bottom supports customizable layouts via the config file. Currently, layouts are controlled by using TOML objects and arrays.
For example, given the sample layout:
```toml
[[row]]
[[row.child]]
type="cpu"
[[row]]
ratio=2
[[row.child]]
ratio=4
type="mem"
[[row.child]]
ratio=3
[[row.child.child]]
type="temp"
[[row.child.child]]
type="disk"
```
This would give a layout that has two rows, with a 1:2 ratio. The first row has only the CPU widget.
The second row is split into two columns with a 4:3 ratio. The first column contains the memory widget.
The second column is split into two rows with a 1:1 ratio. The first is the temperature widget, the second is the disk widget.
This is what the layout would look like when run:
![Sample layout](../../assets/screenshots/config/layout/sample_layout.webp)
Each `[[row]]` represents a _row_ in the layout. A row can have any number of `child` values. Each `[[row.child]]`
represents either a _column or a widget_. A column can have any number of `child` values as well. Each `[[row.child.child]]`
represents a _widget_. A widget is represented by having a `type` field set to a string.
The following `type` values are supported:
| | |
| -------------------------------- | ------------------------ |
| `"cpu"` | CPU chart and legend |
| `"mem", "memory"` | Memory chart |
| `"net", "network"` | Network chart and legend |
| `"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.

View File

@ -1,26 +0,0 @@
# Network
## Filtering Entries
You can filter out what entries to show by configuring `[network.interface_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 entry with a name that matches `/dev/sda<NUMBERS>`, or specifically `/dev/nvme0n1p2`.
```toml
[network.interface_filter]
# Whether to ignore any matches. Defaults to true.
is_list_ignored = true
# A list of filters to try and match.
list = ["virbr0.*"]
# 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
```

View File

@ -1,11 +0,0 @@
# Processes
## Columns
You can configure which columns are shown by the process widget by setting the `columns` setting:
```toml
[processes]
# Pick which columns you want to use in any order.
columns = ["cpu%", "mem%", "pid", "name", "read", "write", "tread", "twrite", "state", "user", "time", "gmem%", "gpu%"]
```

View File

@ -1,168 +0,0 @@
# Styling
Various parts of the bottom can be styled, using either built-in themes or custom theming.
## Precedence
As there are a few ways styles can be applied to bottom, the order of which styles are prioritized are, in order of
highest precedence to lowest precedence:
1. Built-in themes set via command-line args (e.g. `btm --theme gruvbox`)
2. Custom themes set via config file
3. Built-in themes set via config file
If nothing is set, it will fall back to the default theme.
## Built-in styles
bottom has a few built-in themes:
- Default
- [Nord](https://www.nordtheme.com/)
- [Gruvbox](https://github.com/morhetz/gruvbox)
These themes all also have light variants to support terminals using lighter colours.
To set the theme from the command line:
```bash
btm --theme gruvbox
```
To set the theme using the config file:
```toml
[styles]
theme = "gruvbox"
```
## Custom styling
bottom's components can also be individually styled by the user to control the colour of the text style.
### Colours
You can configure the colours for components with strings that are either hex colours (e.g. `"#ffffff"`), RGB colours
(e.g. `"255, 255, 255"`), or named colours. Named colours are one of the following strings:
- `"Black"`
- `"Red"`
- `"Green"`
- `"Yellow"`
- `"Blue"`
- `"Magenta"`
- `"Cyan"`
- `"Gray"`
- `"DarkGray"`
- `"LightRed"`
- `"LightGreen"`
- `"LightYellow"`
- `"LightBlue"`
- `"LightMagenta"`
- `"LightCyan"`
- `"White"`
### Text
Text can generally be styled using the following TOML table:
```toml
[field]
# The foreground colour of text.
color = "black"
# The background colour of text.
bg_color = "blue"
# Whether to make the text bold.
bold = false
# Inline table version
field = { color = "black", bg_color = "blue", bold = false }
```
All fields are optional; by default if `bg_color` is not set then there will be no background color.
If you _just_ want to style text by setting the foreground colour, for brevity, then you can also just set the field
to be the colour itself. For example:
```toml
[styles.widgets]
selected_text = "#fff"
```
### Configuration
#### CPU
These can be set under `[styles.cpu]`:
| Config field | Details | Examples |
| ----------------- | ---------------------------------------------------------------- | -------------------------------------------- |
| `all_entry_color` | The colour of the "All" CPU label | `all_entry_color = "Red"` |
| `avg_entry_color` | The colour of the average CPU label and graph line | `avg_entry_color = "255, 0, 255"` |
| `cpu_core_colors` | Colour of each CPU threads' label and graph line. Read in order. | `cpu_core_colors = ["Red", "Blue", "Green"]` |
#### Memory
These can be set under `[styles.memory]`:
| Config field | Details | Examples |
| ------------- | ------------------------------------------------------------------------------ | --------------------------------------- |
| `ram_color` | The colour of the RAM label and graph line | `ram_color = "Red"` |
| `cache_color` | The colour of the cache label and graph line. Does not do anything on Windows. | `cache_color = "#ffffff"` |
| `swap_color` | The colour of the swap label and graph line | `swap_color = "255, 0, 255"` |
| `arc_color` | The colour of the ARC label and graph line | `arc_color = "Blue"` |
| `gpu_colors` | Colour of each GPU's memory label and graph line. Read in order. | `gpu_colors = ["Red", "Blue", "Green"]` |
#### Network
These can be set under `[styles.network]`:
| Config field | Details | Examples |
| ---------------- | --------------------------------------------------------- | ---------------------------- |
| `rx_color` | The colour of the RX (download) label and graph line | `rx_color = "Red"` |
| `tx_color` | The colour of the TX (upload) label and graph line | `tx_color = "#ffffff"` |
| `rx_total_color` | The colour of the total RX (download) label in basic mode | `rx_total_color = "0, 0, 0"` |
| `tx_total_color` | The colour of the total TX (upload) label in basic mode | `tx_total_color = "#000"` |
#### Battery
These can be set under `[styles.battery]`:
| Config field | Details | Examples |
| ---------------------- | ------------------------------------------------------------------------ | ---------------------------------- |
| `high_battery_color` | The colour of the battery widget bar when the battery is over 50% | `high_battery_color = "Red"` |
| `medium_battery_color` | The colour of the battery widget bar when the battery between 10% to 50% | `medium_battery_color = "#ffffff"` |
| `low_battery_color` | The colour of the battery widget bar when the battery is under 10% | `low_battery_color = "0, 0, 0"` |
#### Tables
These can be set under `[styles.tables]`:
| Config field | Details | Examples |
| ------------ | ------------------------------ | -------------------------------------------------------------- |
| `headers` | Text styling for table headers | `headers = { color = "red", bg_color = "black", bold = true }` |
#### Graphs
These can be set under `[styles.graphs]`:
| Config field | Details | Examples |
| ------------- | -------------------------------------------- | ------------------------------------------------------------------- |
| `graph_color` | The general colour of the parts of the graph | `graph_color = "white"` |
| `legend_text` | Text styling for graph's legend text | `legend_text = { color = "black", bg_color = "blue", bold = true }` |
#### General widget settings
These can be set under `[styles.widgets]`:
| Config field | Details | Examples |
| ----------------------- | -------------------------------------------------------------------------------------------- | --------------------------------------------------------------------- |
| `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 }` |

View File

@ -1,25 +0,0 @@
# Temperature Table
## Filtering Entries
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.
whole_word = false
```

View File

@ -1,63 +0,0 @@
# Build Process
!!! Warning
This section is currently somewhat WIP.
!!! Warning
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.
- `--locked` to lock the dependency versions.
- The following env variables set:
- `BTM_GENERATE: true`
- `COMPLETION_DIR: "target/tmp/bottom/completion/"`
- `MANPAGE_DIR: "target/tmp/bottom/manpage/"`
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.

View File

@ -1,53 +0,0 @@
# Deploy Process
!!! Warning
This section is currently WIP.
!!! Warning
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:
- [Chocolatey](https://community.chocolatey.org/packages/bottom)
- [crates.io](https://crates.io/crates/bottom)
## Nightly
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:
```bash
cargo publish
```

View File

@ -1,9 +0,0 @@
# Development Environment
!!! Warning
This section is currently WIP.
!!! Warning
This section is intended for people who wish to work on/build/distribute bottom, not general users.

View File

@ -1,9 +0,0 @@
# Logging
!!! Warning
This section is currently WIP.
!!! Warning
This section is intended for people who wish to work on/build/distribute bottom, not general users.

View File

@ -1,9 +0,0 @@
# Testing
!!! Warning
This section is currently WIP.
!!! Warning
This section is intended for people who wish to work on/build/distribute bottom, not general users.

View File

@ -1,57 +0,0 @@
# Documentation
## When should documentation changes be done?
- 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).

View File

@ -1,35 +0,0 @@
# Issues, Pull Requests, and Discussions
## Discussions
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.

View File

@ -1,70 +0,0 @@
# Packaging and Distribution
Package maintainers are always welcome and appreciated! Here's some info on how one can help with package distribution
and bottom.
## Pre-built binaries
The latest stable release can be found [here](https://github.com/ClementTsang/bottom/releases/latest), where you can
find pre-built binaries in either a `tar.gz` or `zip` format. Binaries here also include automatically generated shell
completion files for zsh, bash, fish, and Powershell, which you may want to also install during the packaging
process.
You can also find a nightly build in the [releases page](https://github.com/ClementTsang/bottom/releases), built every
day at 00:00 UTC off of the `main` branch.
In both cases, we use a combination of GitHub Actions and CirrusCI (mainly for FreeBSD and macOS M1) to create our
release binaries. [`build_releases.yml`](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/build_releases.yml)
contains the GitHub Action workflow used to do both of these, if reference is needed.
## Building manually
If you want to manually build bottom rather than distributing a pre-built binary, you'll need the most recent version
of stable Rust, which you can get with:
```bash
rustup update stable
```
You'll then want to build with:
```bash
cargo build --release --locked
```
### Manpage and completion generation
bottom uses a [`build.rs`](https://github.com/ClementTsang/bottom/blob/main/build.rs) script to automatically generate
a manpage and shell completions for the following shells:
- Bash
- Zsh
- Fish
- Powershell
- Elvish
If you want to generate manpages and/or completion files, set the `BTM_GENERATE` env var to a non-empty value. For
example, run something like this:
```bash
BTM_GENERATE=true cargo build --release --locked
```
This will automatically generate completion and manpage files in `target/tmp/bottom/`. If you wish to regenerate the
files, modify/delete either these files or set `BTM_GENERATE` to some other non-empty value to retrigger the build
script.
You may override the default diretories used to generate both completion and manpage files by specifying the
`COMPLETION_DIR` and `MANPAGE_DIR` environment variables respectively.
For more information, you may want to look at either the [`build.rs`](https://github.com/ClementTsang/bottom/blob/main/build.rs)
file or the [binary build CI workflow](https://github.com/ClementTsang/bottom/blob/main/.github/workflows/build_releases.yml).
## Adding an installation source
Once you've finished your installation source, if you want to mention it in the main bottom repo, fork the repo and add
the installation method and any details to the [`README.md`](https://github.com/ClementTsang/bottom/blob/main/README.md)
file under the [Installation](https://github.com/ClementTsang/bottom#installation) section, as well as a corresponding
table of contents entry. Once that's done, open a pull request - these will usually be approved of very quickly.
You can find more info on the contribution process [here](issues-and-pull-requests.md#pull-requests).

View File

@ -1,44 +0,0 @@
---
hide:
- navigation
- toc
title: Home
---
# `bottom`
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.

View File

@ -1 +0,0 @@
{% extends "base.html" %}

View File

@ -1,12 +0,0 @@
:root {
--md-primary-fg-color: #268bd2;
--md-accent-fg-color: #81a1c1;
}
.md-typeset__table {
min-width: 100%;
}
.md-typeset table:not([class]) {
display: table;
}

View File

@ -1,34 +0,0 @@
# Official support
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._

View File

@ -1,16 +0,0 @@
# Unofficial support
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))
## Known problems
None at the moment.

View File

@ -1,173 +0,0 @@
# Troubleshooting
## The graph points look broken/strange
It's possible that your graphs don't look great out of the box due to the reliance on
[braille characters](https://en.wikipedia.org/wiki/Braille_Patterns) to draw them. This could cause problems if
your terminal's font does not support them, or your terminal is not configured properly to draw them.
<figure>
<img src="../assets/screenshots/troubleshooting/no_braille.webp" alt="Example of a terminal with no braille font."/>
<figcaption><sub>An example of missing braille fonts in Powershell</sub></figcaption>
</figure>
Some possible solutions are included below.
### Use dot markers instead
One alternative is to use the `--dot_marker` option to render graph charts using dots instead of the braille characters,
which generally seems better supported out of the box, at the expense of looking less intricate:
<figure>
<img src="../assets/screenshots/troubleshooting/dots.webp" alt="Example of running bottom with the dot marker flag"/>
<figcaption><sub>Example using <code>btm --dot_marker</code></sub></figcaption>
</figure>
### Use a font that supports braille fonts
Another (better) alternative is to install a font that supports braille fonts, and configure your terminal emulator to
use it. For example, installing something like [UBraille](https://yudit.org/download/fonts/UBraille/) or
[Iosevka](https://github.com/be5invis/Iosevka) and ensuring your terminal uses it should work.
#### Linux/macOS/Unix
Solutions mostly depend on what terminal emulator you are using, so unfortunately, I can't give specific instructions.
Here are some possible solutions:
- Uninstalling `gnu-free-fonts` if installed, as that is known to cause problems with braille markers
- Installing a font like `ttf-symbola` or `ttf-ubraille` for your terminal emulator to try and automatically fall back to
- Configuring your terminal emulator to use specific fonts for the `U+2800` to `U+28FF` range.
- For example for kitty, do `symbol_map U+2800-U+28FF Symbola`.
For some more possible solutions:
- Check out [this issue](https://github.com/cjbassi/gotop/issues/18) from gotop about the same issue.
- See ratatui's [FAQ](https://ratatui.rs/faq/#some-characters-appear-to-be-missing--look-weird) (ratatui is the underlying
library bottom uses to draw things).
#### Windows and Powershell
**Note: I would advise backing up your registry beforehand if you aren't sure what you are doing!**
Let's say you're installing [Iosevka](https://github.com/be5invis/Iosevka). The steps you can take are:
1. Install the font itself.
2. Open the registry editor, which you can do either by `Win+R` and opening `regedit`, or just opening it from the Start Menu.
3. In the registry editor, go to
```
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont
```
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>
<img src="../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>
<img src="../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>
<img src="../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:
| OS | Default Config Location |
| ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| macOS | `$HOME/Library/Application Support/bottom/bottom.toml`<br/> `~/.config/bottom/bottom.toml` <br/> `$XDG_CONFIG_HOME/bottom/bottom.toml` |
| Linux | `~/.config/bottom/bottom.toml` <br/> `$XDG_CONFIG_HOME/bottom/bottom.toml` |
| Windows | `C:\Users\<USER>\AppData\Roaming\bottom\bottom.toml` |
If you want to use a config file in another location, use the `--config` or `-C` flags along with the path to the configuration file, like so:
```bash
btm -C path_to_config
```
## My installation through snap has some widgets that are blank/show no data
Make sure bottom is given the correct permissions in order to collect data. [Snapcraft](https://snapcraft.io/docs/interface-management)
explains how to do so, but the TL;DR is:
```bash
sudo snap connect bottom:mount-observe
sudo snap connect bottom:hardware-observe
sudo snap connect bottom:system-observe
sudo snap connect bottom:process-control
```

View File

@ -1,14 +0,0 @@
# Auto-Complete
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.

View File

@ -1,36 +0,0 @@
# Basic Mode
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>
<img src="../../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.

View File

@ -1,68 +0,0 @@
# General Usage
You can run bottom with:
```bash
btm
```
For help regarding the command-line options, use:
```bash
# For a simple overview of flags
btm -h
# For more details
btm --help
```
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.
| Binding | Action |
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| ++q++ , ++ctrl+c++ | Quit |
| ++esc++ | Close dialog windows, search, widgets, or exit expanded mode |
| ++ctrl+r++ | Reset display and any collected data |
| ++f++ | Freeze/unfreeze updating with new data |
| ++question++ | Open help menu |
| ++e++ | Toggle expanding the currently selected widget |
| ++ctrl+up++ <br/> ++shift+up++ <br/> ++K++ <br/> ++W++ | Select the widget above |
| ++ctrl+down++ <br/> ++shift+down++ <br/> ++J++ <br/> ++S++ | Select the widget below |
| ++ctrl+left++ <br/> ++shift+left++ <br/> ++H++ <br/> ++A++ | Select the widget on the left |
| ++ctrl+right++ <br/> ++shift+right++ <br/> ++L++ <br/> ++D++ | Select the widget on the right |
| ++up++ , ++k++ | Move up within a widget |
| ++down++ , ++j++ | Move down within a widget |
| ++left++ <br/> ++h++ <br/> ++alt+h++ | Move left within a widget |
| ++right++ <br/> ++l++ <br/> ++alt+l++ | Move right within a widget |
| ++g+g++ , ++home++ | Jump to the first entry |
| ++G++ , ++end++ | Jump to the last entry |
| ++page-up++ , ++page-down++ | Scroll up/down a table by a page |
| ++ctrl+u++ | Scroll up a table by half a page |
| ++ctrl+d++ | Scroll down a table by half a page |
## Mouse bindings
| Binding | Action |
| ----------- | ------------------ |
| ++lbutton++ | Selects the widget |

View File

@ -1,40 +0,0 @@
# Battery Widget
!!! Warning
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>
<img src="../../../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.
| Binding | Action |
| ------------------------------------- | ---------------------------------------------------------- |
| ++left++ <br/> ++h++ <br/> ++alt+h++ | Moves to the battery entry to the left of the current one |
| ++right++ <br/> ++l++ <br/> ++alt+l++ | Moves to the battery entry to the right of the current one |
## Mouse bindings
| Binding | Action |
| ----------- | ----------------------- |
| ++lbutton++ | Selects a battery entry |

View File

@ -1,55 +0,0 @@
# CPU Widget
The CPU widget displays a visual representation of CPU usage over a time range.
<figure>
<img src="../../../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.
### Graph
| Binding | Action |
| --------- | --------------------------------------- |
| ++plus++ | Zoom in on chart (decrease time range) |
| ++minus++ | Zoom out on chart (increase time range) |
| ++equal++ | Reset zoom |
### Legend
| Binding | Action |
| ------------------ | ------------------------------------- |
| ++up++ , ++k++ | Move up within a widget |
| ++down++ , ++j++ | Move down within a widget |
| ++g+g++ , ++home++ | Jump to the first entry in the legend |
| ++G++ , ++end++ | Jump to the last entry in the legend |
## Mouse bindings
### Graph
| Binding | Action |
| ------------ | -------------------------------------------------------------- |
| ++"Scroll"++ | Scrolling up or down zooms in or out of the graph respectively |
### Legend
| Binding | Action |
| ------------ | ------------------------------------------------- |
| ++"Scroll"++ | Scroll through options to display in the graph |
| ++lbutton++ | Selects a CPU thread/average to show in the graph |

View File

@ -1,45 +0,0 @@
# Disk Widget
The disk widget provides a table of useful disk and partition information, like I/O per second and total usage.
<figure>
<img src="../../../assets/screenshots/disk.webp" alt="A picture of an expanded disk widget."/>
</figure>
## Features
The disk widget provides the following information:
- Disk name
- Disk mount location
- Amount of space used
- Amount of space left
- Total amount of space
- Percentage of space used
- Read per second
- Write per second
## Key bindings
Note that key bindings are generally case-sensitive.
| Binding | Action |
| ------------------ | ------------------------------------------------------------------- |
| ++up++ , ++k++ | Move up within a widget |
| ++down++ , ++j++ | Move down within a widget |
| ++g+g++ , ++home++ | Jump to the first entry in the table |
| ++G++ , ++end++ | Jump to the last entry in the table |
| ++d++ | Sort by disk, press again to reverse sorting order |
| ++m++ | Sort by mount, press again to reverse sorting order |
| ++u++ | Sort by amount used, press again to reverse sorting order |
| ++n++ | Sort by amount free, press again to reverse sorting order |
| ++t++ | Sort by total space available, press again to reverse sorting order |
| ++p++ | Sort by percentage used, press again to reverse sorting order |
| ++r++ | Sort by read rate, press again to reverse sorting order |
| ++w++ | Sort by write rate, press again to reverse sorting order |
## Mouse bindings
| Binding | Action |
| ----------- | ----------------------------- |
| ++lbutton++ | Selects an entry in the table |

View File

@ -1,51 +0,0 @@
# Memory Widget
The memory widget provides a visual representation of RAM and swap usage over time.
<figure>
<img src="../../../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.
| Binding | Action |
| --------- | --------------------------------------- |
| ++plus++ | Zoom in on chart (decrease time range) |
| ++minus++ | Zoom out on chart (increase time range) |
| ++equal++ | Reset zoom |
## Mouse bindings
| Binding | Action |
| ------------ | -------------------------------------------------------------- |
| ++"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)):
```
MemTotal - MemFree - Buffers - (Cached + SReclaimable - Shmem)
```
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
match.

View File

@ -1,34 +0,0 @@
# Network Widget
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>
<img src="../../../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.
| Binding | Action |
| --------- | --------------------------------------- |
| ++plus++ | Zoom in on chart (decrease time range) |
| ++minus++ | Zoom out on chart (increase time range) |
| ++equal++ | Reset zoom |
## Mouse bindings
| Binding | Action |
| ------------ | -------------------------------------------------------------- |
| ++"Scroll"++ | Scrolling up or down zooms in or out of the graph respectively |

View File

@ -1,280 +0,0 @@
# Process Widget
The process widget displays a table containing information regarding a running process, along with sorting,
searching, and process control features.
<figure>
<img src="../../../assets/screenshots/process/process_default.webp" alt="A picture of an expanded process widget by default."/>
</figure>
## Features
The process widget has three main components:
- The main process table
- The search sub-widget (opened with ++ctrl+f++ or ++slash++)
- The sort menu sub-widget (opened with ++s++ or ++f6++)
By default, the main process table displays the following information for each process:
- PID
- Name of the process
- CPU use percentage (note this is averaged out per available thread by default)
- Memory use percentage
- Disk reads per second
- Disk writes per second
- Total amount read from disk
- Total amount written from disk
- User
- Process state
- Process uptime
<!-- 2-space indent here because mdx_truly_sane_lists interferes, see https://github.com/squidfunk/mkdocs-material/discussions/3763#discussioncomment-2833731 -->
!!! info indent
On Windows, the I/O counters will report _all_ reads/writes, not just disk. See
[here](https://docs.rs/sysinfo/latest/sysinfo/struct.Process.html#method.disk_usage)
for more details.
With the feature flag (`--disable_gpu` on Linux/Windows to disable) and gpu process columns enabled in the configuration:
- GPU memory use percentage
- GPU core utilization percentage
See [the processes configuration page](../../configuration/config-file/processes.md) on how to customize which columns
are shown.
### Sorting
The table can be sorted by clicking on the table headers, which will either sort the table by that column, or if already
sorting by that column, reverse the sorting order.
Alternatively, one can sort using the sort menu sub-widget, which is brought up using ++s++ or ++f6++, and can be controlled by arrow keys or the mouse.
<figure>
<img src="../../../assets/screenshots/process/process_sort_menu.webp" alt="A picture of an expanded process widget with the sort menu open."/>
</figure>
### Grouping
Pressing ++tab++ in the table will group entries with the same name together. The PID column will be replaced with the number of entries in each group, and usage
is added together when displayed.
<figure>
<img src="../../../assets/screenshots/process/process_grouped.webp" alt="A picture of grouped mode in a process widget."/>
</figure>
!!! info
Note that the process state and user columns are disabled in this mode.
!!! info
Note that if tree mode is also active, processes cannot be grouped together due to the behaviour of the two modes
somewhat clashing. This also reflects with default modes like `group_processes`.
### Process termination
Pressing ++d+d++ or ++f9++ will allow you to terminate the currently selected process/process group. On Unix-like
operating systems, you are also able to control which specific signals to send (e.g. `SIGKILL`, `SIGTERM`).
<figure>
<img src="../../../assets/screenshots/process/process_kill_linux.webp" alt="A picture of the process kill menu on Linux."/>
<figcaption><sub>The process termination menu on Linux</sub></figcaption>
</figure>
If you're on Windows, or if the `disable_advanced_kill` flag is set in the options or command-line (only available on
Linux, macOS, and FreeBSD), then a simpler termination screen with just yes or no options will be shown.
<figure>
<img src="../../../assets/screenshots/process/process_kill_simple.webp" alt="A picture of the process kill menu on Windows."/>
<figcaption><sub>The process termination menu on Windows</sub></figcaption>
</figure>
### Tree mode
Pressing ++t++ or ++f5++ in the table toggles tree mode in the process widget, displaying processes in regard to their parent-child process relationships.
<figure>
<img src="../../../assets/screenshots/process/process_tree.webp" alt="A picture of tree mode in a process widget."/>
</figure>
A process in tree mode can also be "collapsed", hiding its children and any descendants, using the either the ++minus++,
++plus++, or ++left++ keys, or clicking on an entry. It can be expanded by using the ++minus++, ++plus++, or ++right++
keys, or by clicking on the entry again.
!!! info
Note that if tree mode is active, processes cannot be grouped together due to the behaviour of the two modes
somewhat clashing. This also reflects with default modes like `group_processes`.
### Full command
You can show the full command instead of just the process name by pressing ++P++.
<figure>
<img src="../../../assets/screenshots/process/process_full.webp" alt="A picture of a process widget using full commands."/>
</figure>
### Search
Pressing ++slash++ or ++ctrl+f++ will open up the search sub-widget. By default, just typing in something will search by the process name.
<figure>
<img src="../../../assets/screenshots/process/search/search.webp" alt="A picture of searching for a process with a simple search."/>
</figure>
This search can be further enhanced by matching by case, matching the entire word, or by regex.
<figure>
<img src="../../../assets/screenshots/process/search/regex.webp" alt="A picture of searching for a process with a search condition that uses regex."/>
</figure>
We are able to also search for multiple things/conditions.
<figure>
<img src="../../../assets/screenshots/process/search/or.webp" alt="A picture of searching for a process with a search condition that uses the or operator."/>
</figure>
And if our search uses a keyword, we need to use quotation marks around the term to properly search it.
<figure>
<img src="../../../assets/screenshots/process/search/quotes.webp" alt="A picture of searching for a process with a search condition that needs quotation marks."/>
</figure>
Lastly, we can refine our search even further based on the other columns, like PID, CPU usage, etc., as well as grouping together conditions.
<figure>
<img src="../../../assets/screenshots/process/search/cpu.webp" alt="A picture of searching for a process with a search condition that uses the CPU keyword."/>
</figure>
You can also paste search queries (e.g. ++shift+insert++, ++ctrl+shift+v++).
#### Keywords
Note all keywords are case-insensitive. To search for a process/command that collides with a keyword, surround the term with quotes (e.x. `"cpu"`).
| Keywords | Example | Description |
| ------------------------------- | ------------------------------------- | -------------------------------------------------------------------------------- |
| | `btm` | Matches by process or command name; supports regex |
| `pid` | `pid=1044` | Matches by PID; supports regex |
| `cpu` <br/> `cpu%` | `cpu > 0.5` | Matches the CPU column; supports comparison operators |
| `memb` | `memb > 1000 b` | Matches the memory column in terms of bytes; supports comparison operators |
| `mem` <br/> `mem%` | `mem < 0.5` | Matches the memory column in terms of percent; supports comparison operators |
| `read` <br/> `r/s` <br/> `rps` | `read = 1 mb` | Matches the read/s column in terms of bytes; supports comparison operators |
| `write` <br/> `w/s` <br/> `wps` | `write >= 1 kb` | Matches the write/s column in terms of bytes; supports comparison operators |
| `tread` <br/> `t.read` | `tread <= 1024 gb` | Matches he total read column in terms of bytes; supports comparison operators |
| `twrite` <br/> `t.write` | `twrite > 1024 tb` | Matches the total write column in terms of bytes; supports comparison operators |
| `user` | `user=root` | Matches by user; supports regex |
| `state` | `state=running` | Matches by state; supports regex |
| `()` | `(<COND 1> AND <COND 2>) OR <COND 3>` | Group together a condition |
| `gmem` | `gmem > 1000 b` | Matches the gpu memory column in terms of bytes; supports comparison operators |
| `gmem%` | `gmem% < 0.5` | Matches the gpu memory column in terms of percent; supports comparison operators |
| `gpu%` | `gpu% > 0` | Matches the gpu usage column in terms of percent; supports comparison operators |
#### Comparison operators
| Keywords | Description |
| -------- | -------------------------------------------------------------- |
| `=` | Checks if the values are equal |
| `>` | Checks if the left value is strictly greater than the right |
| `<` | Checks if the left value is strictly less than the right |
| `>=` | Checks if the left value is greater than or equal to the right |
| `<=` | Checks if the left value is less than or equal to the right |
#### Logical operators
Note all operators are case-insensitive, and the `and` operator takes precedence over the `or` operator.
| Keywords | Usage | Description |
| ------------------------------------ | ------------------------------------------------------------------------------ | --------------------------------------------------- |
| `and` <br/> `&&` <br/> `<Space>` | `<COND 1> and <COND 2>` <br/> `<COND 1> && <COND 2>` <br/> `<COND 1> <COND 2>` | Requires both conditions to be true to match |
| `or` <br/> <code>&#124;&#124;</code> | `<COND 1> or <COND 2>` <br/> `<COND 1> &#124;&#124; <COND 2>` | Requires at least one condition to be true to match |
#### Units
All units are case-insensitive.
| Keywords | Description |
| -------- | ----------- |
| `B` | Bytes |
| `KB` | Kilobytes |
| `MB` | Megabytes |
| `GB` | Gigabytes |
| `TB` | Terabytes |
| `KiB` | Kibibytes |
| `MiB` | Mebibytes |
| `GiB` | Gibibytes |
| `TiB` | Tebibytes |
## Key bindings
Note that key bindings are generally case-sensitive.
### Process table
| Binding | Action |
| --------------------------------------------------- | ---------------------------------------------------------------- |
| ++up++ , ++k++ | Move up within a widget |
| ++down++ , ++j++ | Move down within a widget |
| ++g+g++ , ++home++ | Jump to the first entry in the table |
| ++G++ , ++end++ | Jump to the last entry in the table |
| ++d+d++ , ++f9++ | Send a kill signal to the selected process |
| ++c++ | Sort by CPU usage, press again to reverse sorting order |
| ++m++ | Sort by memory usage, press again to reverse sorting order |
| ++p++ | Sort by PID name, press again to reverse sorting order |
| ++n++ | Sort by process name, press again to reverse sorting order |
| ++tab++ | Toggle grouping processes with the same name |
| ++P++ | Toggle between showing the full command or just the process name |
| ++ctrl+f++ , ++slash++ | Toggle showing the search sub-widget |
| ++s++ , ++f6++, ++delete++ (++fn+delete++ on macOS) | Toggle showing the sort sub-widget |
| ++I++ | Invert the current sort |
| ++"%"++ | Toggle between values and percentages for memory usage |
| ++t++ , ++f5++ | Toggle tree mode |
| ++M++ | Sort by gpu memory usage, press again to reverse sorting order |
| ++C++ | Sort by gpu usage, press again to reverse sorting order |
| ++z++ | Toggle the hiding of kernel threads |
### Sort sub-widget
| Binding | Action |
| ------------------ | ------------------------------------- |
| ++up++ , ++k++ | Move up within a widget |
| ++down++ , ++j++ | Move down within a widget |
| ++g+g++ , ++home++ | Jump to the first entry in the table |
| ++G++ , ++end++ | Jump to the last entry in the table |
| ++esc++ | Close the sort sub-widget |
| ++enter++ | Sorts the corresponding process table |
### Search sub-widget
| Binding | Action |
| ------------------------------------- | -------------------------------------------- |
| ++left++ <br/> ++h++ <br/> ++alt+h++ | Moves the cursor left |
| ++right++ <br/> ++l++ <br/> ++alt+l++ | Moves the cursor right |
| ++esc++ | Close the search widget (retains the filter) |
| ++ctrl+a++ | Skip to the start of the search query |
| ++ctrl+e++ | Skip to the end of the search query |
| ++ctrl+u++ | Clear the current search query |
| ++ctrl+w++ | Delete a word behind the cursor |
| ++ctrl+h++ | Delete the character behind the cursor |
| ++backspace++ | Delete the character behind the cursor |
| ++delete++ (++fn+delete++ on macOS) | Delete the character at the cursor |
| ++alt+c++ , ++f1++ | Toggle matching case |
| ++alt+w++ , ++f2++ | Toggle matching the entire word |
| ++alt+r++ , ++f3++ | Toggle using regex |
## Mouse bindings
### Process table
| Binding | Action |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| ++"Scroll"++ | Selects a CPU thread/average to show in the graph |
| ++lbutton++ | Table header: Sorts/reverse sorts the table by the column <br/> Table entry: Selects an entry in the table, if in tree mode, collapses/expands the entry's children |
### Sort sub-widget
| Binding | Action |
| ----------- | ----------------------------- |
| ++lbutton++ | Selects an entry in the table |

Some files were not shown because too many files have changed in this diff Show More