Repository: ClementTsang/bottom Branch: main Commit: ca74694ffc7d Files: 285 Total size: 1.6 MB Directory structure: gitextract_vx6kr0uy/ ├── .all-contributorsrc ├── .cargo/ │ └── config.toml ├── .cirrus.yml ├── .github/ │ ├── ISSUE_TEMPLATE/ │ │ ├── bug_report.yml │ │ ├── config.yml │ │ ├── feature_request.yml │ │ └── packaging.yml │ ├── actions/ │ │ └── test-bsd-target/ │ │ └── action.yml │ ├── ci/ │ │ └── rust_version.txt │ ├── pull_request_template.md │ └── workflows/ │ ├── bsd_vm_check.yml │ ├── build_releases.yml │ ├── ci.yml │ ├── clear_workflow_cache.yml │ ├── coverage.yml │ ├── deployment.yml │ ├── docs.yml │ ├── nightly.yml │ ├── post_release.yml │ ├── publish_github_pages.yml │ ├── test_docs.yml │ └── validate_schema.yml ├── .gitignore ├── .markdownlint.json ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Cargo.toml ├── Cross.toml ├── LICENSE ├── README.md ├── build.rs ├── clippy.toml ├── codecov.yml ├── desktop/ │ └── bottom.desktop ├── docs/ │ ├── .gitignore │ ├── README.md │ ├── content/ │ │ ├── configuration/ │ │ │ ├── command-line-options.md │ │ │ └── config-file/ │ │ │ ├── cpu.md │ │ │ ├── disk-table.md │ │ │ ├── flags.md │ │ │ ├── index.md │ │ │ ├── layout.md │ │ │ ├── network.md │ │ │ ├── processes.md │ │ │ ├── styling.md │ │ │ └── temperature-table.md │ │ ├── contribution/ │ │ │ ├── development/ │ │ │ │ ├── build_process.md │ │ │ │ ├── deploy_process.md │ │ │ │ ├── dev_env.md │ │ │ │ ├── logging.md │ │ │ │ └── testing.md │ │ │ ├── documentation.md │ │ │ ├── issues-and-pull-requests.md │ │ │ └── packaging-and-distribution.md │ │ ├── index.md │ │ ├── nightly-release.md │ │ ├── stylesheets/ │ │ │ └── extra.css │ │ ├── support/ │ │ │ ├── official.md │ │ │ └── unofficial.md │ │ ├── troubleshooting.md │ │ └── usage/ │ │ ├── autocomplete.md │ │ ├── basic-mode.md │ │ ├── general-usage.md │ │ └── widgets/ │ │ ├── battery.md │ │ ├── cpu.md │ │ ├── disk.md │ │ ├── memory.md │ │ ├── network.md │ │ ├── process.md │ │ └── temperature.md │ ├── hooks/ │ │ ├── nightly_banner.py │ │ └── nightly_redirect.py │ ├── mike.sh │ ├── mkdocs.yml │ ├── overrides/ │ │ └── main.html │ ├── requirements.txt │ └── serve.sh ├── rustfmt.toml ├── sample_configs/ │ ├── default_config.toml │ └── demo_config.toml ├── schema/ │ ├── README.md │ ├── nightly/ │ │ └── bottom.json │ ├── v0.10/ │ │ └── bottom.json │ ├── v0.11/ │ │ └── bottom.json │ ├── v0.12.0/ │ │ └── bottom.json │ └── v0.9/ │ └── bottom.json ├── scripts/ │ ├── ci/ │ │ ├── bsd_tests.sh │ │ ├── ci_bsd.sh │ │ ├── cirrus_release.py │ │ └── configure_git.sh │ ├── clear_cache.py │ ├── hooks/ │ │ ├── README.md │ │ └── pre-push │ ├── schema/ │ │ ├── bad_file.toml │ │ ├── generate.sh │ │ ├── nightly.sh │ │ ├── requirements.txt │ │ └── validator.py │ └── windows/ │ └── choco/ │ ├── bottom.nuspec.template │ ├── choco_packager.py │ └── chocolateyinstall.ps1.template ├── src/ │ ├── app/ │ │ ├── data/ │ │ │ ├── mod.rs │ │ │ ├── process.rs │ │ │ ├── store.rs │ │ │ ├── temperature.rs │ │ │ └── time_series.rs │ │ ├── filter.rs │ │ ├── layout_manager.rs │ │ └── states.rs │ ├── app.rs │ ├── bin/ │ │ ├── main.rs │ │ └── schema.rs │ ├── canvas/ │ │ ├── components/ │ │ │ ├── data_table/ │ │ │ │ ├── column.rs │ │ │ │ ├── data_type.rs │ │ │ │ ├── draw.rs │ │ │ │ ├── props.rs │ │ │ │ ├── sortable.rs │ │ │ │ ├── state.rs │ │ │ │ └── styling.rs │ │ │ ├── data_table.rs │ │ │ ├── mod.rs │ │ │ ├── pipe_gauge.rs │ │ │ ├── time_graph/ │ │ │ │ ├── base.rs │ │ │ │ ├── variants/ │ │ │ │ │ ├── auto_y_axis.rs │ │ │ │ │ └── percent.rs │ │ │ │ ├── variants.rs │ │ │ │ ├── vendored/ │ │ │ │ │ ├── canvas.rs │ │ │ │ │ ├── grid.rs │ │ │ │ │ └── points.rs │ │ │ │ └── vendored.rs │ │ │ ├── time_graph.rs │ │ │ └── widget_carousel.rs │ │ ├── dialogs/ │ │ │ ├── help_dialog.rs │ │ │ ├── mod.rs │ │ │ └── process_kill_dialog.rs │ │ ├── drawing_utils.rs │ │ └── widgets/ │ │ ├── battery_display.rs │ │ ├── cpu_basic.rs │ │ ├── cpu_graph.rs │ │ ├── disk_table.rs │ │ ├── mem_basic.rs │ │ ├── mem_graph.rs │ │ ├── mod.rs │ │ ├── network_basic.rs │ │ ├── network_graph.rs │ │ ├── process_table.rs │ │ └── temperature_table.rs │ ├── canvas.rs │ ├── collection/ │ │ ├── amd/ │ │ │ └── amd_gpu_marketing.rs │ │ ├── amd.rs │ │ ├── batteries.rs │ │ ├── cpu/ │ │ │ └── sysinfo.rs │ │ ├── cpu.rs │ │ ├── disks/ │ │ │ ├── freebsd.rs │ │ │ ├── io_counters.rs │ │ │ ├── other.rs │ │ │ ├── unix/ │ │ │ │ ├── file_systems.rs │ │ │ │ ├── linux/ │ │ │ │ │ ├── counters.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── partition.rs │ │ │ │ ├── macos/ │ │ │ │ │ ├── counters.rs │ │ │ │ │ ├── io_kit/ │ │ │ │ │ │ ├── bindings.rs │ │ │ │ │ │ ├── io_disks.rs │ │ │ │ │ │ ├── io_iterator.rs │ │ │ │ │ │ └── io_object.rs │ │ │ │ │ ├── io_kit.rs │ │ │ │ │ └── mod.rs │ │ │ │ ├── other/ │ │ │ │ │ ├── bindings.rs │ │ │ │ │ ├── mod.rs │ │ │ │ │ └── partition.rs │ │ │ │ └── usage.rs │ │ │ ├── unix.rs │ │ │ ├── windows/ │ │ │ │ └── bindings.rs │ │ │ ├── windows.rs │ │ │ └── zfs_io_counters.rs │ │ ├── disks.rs │ │ ├── error.rs │ │ ├── linux/ │ │ │ └── utils.rs │ │ ├── memory/ │ │ │ ├── arc.rs │ │ │ ├── sysinfo.rs │ │ │ └── windows.rs │ │ ├── memory.rs │ │ ├── network/ │ │ │ └── sysinfo.rs │ │ ├── network.rs │ │ ├── nvidia.rs │ │ ├── processes/ │ │ │ ├── freebsd.rs │ │ │ ├── linux/ │ │ │ │ ├── mod.rs │ │ │ │ └── process.rs │ │ │ ├── macos/ │ │ │ │ └── sysctl_bindings.rs │ │ │ ├── macos.rs │ │ │ ├── unix/ │ │ │ │ ├── process_ext.rs │ │ │ │ └── user_table.rs │ │ │ ├── unix.rs │ │ │ └── windows.rs │ │ ├── processes.rs │ │ ├── temperature/ │ │ │ ├── linux.rs │ │ │ └── sysinfo.rs │ │ └── temperature.rs │ ├── collection.rs │ ├── constants.rs │ ├── event.rs │ ├── lib.rs │ ├── options/ │ │ ├── args.rs │ │ ├── config/ │ │ │ ├── cpu.rs │ │ │ ├── disk.rs │ │ │ ├── flags.rs │ │ │ ├── ignore_list.rs │ │ │ ├── layout.rs │ │ │ ├── network.rs │ │ │ ├── process.rs │ │ │ ├── style/ │ │ │ │ ├── battery.rs │ │ │ │ ├── borders.rs │ │ │ │ ├── cpu.rs │ │ │ │ ├── graphs.rs │ │ │ │ ├── memory.rs │ │ │ │ ├── network.rs │ │ │ │ ├── tables.rs │ │ │ │ ├── themes/ │ │ │ │ │ ├── default.rs │ │ │ │ │ ├── gruvbox.rs │ │ │ │ │ └── nord.rs │ │ │ │ ├── themes.rs │ │ │ │ ├── utils.rs │ │ │ │ └── widgets.rs │ │ │ ├── style.rs │ │ │ └── temperature.rs │ │ ├── config.rs │ │ └── error.rs │ ├── options.rs │ ├── utils/ │ │ ├── cancellation_token.rs │ │ ├── conversion.rs │ │ ├── data_units.rs │ │ ├── general.rs │ │ ├── logging.rs │ │ ├── process_killer.rs │ │ └── strings.rs │ └── widgets/ │ ├── battery_info.rs │ ├── cpu_graph.rs │ ├── disk_table.rs │ ├── mem_graph.rs │ ├── mod.rs │ ├── network_graph.rs │ ├── process_table/ │ │ ├── process_columns.rs │ │ ├── process_data.rs │ │ ├── query/ │ │ │ ├── and.rs │ │ │ ├── attribute.rs │ │ │ ├── error.rs │ │ │ ├── or.rs │ │ │ └── prefix.rs │ │ ├── query.rs │ │ └── sort_table.rs │ ├── process_table.rs │ └── temperature_table.rs ├── tests/ │ ├── integration/ │ │ ├── arg_tests.rs │ │ ├── invalid_config_tests.rs │ │ ├── layout_movement_tests.rs │ │ ├── main.rs │ │ ├── util.rs │ │ └── valid_config_tests.rs │ ├── invalid_configs/ │ │ ├── duplicate_temp_type.toml │ │ ├── empty_layout.toml │ │ ├── invalid_colour_hex.toml │ │ ├── invalid_colour_hex_2.toml │ │ ├── invalid_colour_hex_3.toml │ │ ├── invalid_colour_name.toml │ │ ├── invalid_colour_rgb.toml │ │ ├── invalid_colour_rgb_2.toml │ │ ├── invalid_colour_string.toml │ │ ├── invalid_default_widget_count.toml │ │ ├── invalid_disk_column.toml │ │ ├── invalid_layout_widget_type.toml │ │ ├── invalid_process_column.toml │ │ ├── lone_default_widget_count.toml │ │ └── toml_mismatch_type.toml │ └── valid_configs/ │ ├── all_proc.toml │ ├── cpu_doughnut.toml │ ├── empty_config.toml │ ├── filtering.toml │ ├── many_proc.toml │ ├── os_specific/ │ │ └── linux.toml │ ├── proc_columns.toml │ ├── styling.toml │ ├── styling_2.toml │ └── theme.toml └── wix/ ├── License.rtf └── main.wxs ================================================ FILE CONTENTS ================================================ ================================================ FILE: .all-contributorsrc ================================================ { "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" ] }, { "login": "Tommimon", "name": "Tommaso Montanari", "avatar_url": "https://avatars.githubusercontent.com/u/37435103?v=4", "profile": "https://github.com/Tommimon", "contributions": [ "design", "ideas" ] }, { "login": "jylenhof", "name": "Jean-Yves LENHOF", "avatar_url": "https://avatars.githubusercontent.com/u/36410287?v=4", "profile": "http://blog.lenhof.eu.org", "contributions": [ "doc" ] }, { "login": "Saphereye", "name": "Adarsh Das", "avatar_url": "https://avatars.githubusercontent.com/u/59739923?v=4", "profile": "http://saphereye.github.io", "contributions": [ "code", "doc" ] }, { "login": "oxyzenQ", "name": "rezky_nightky", "avatar_url": "https://avatars.githubusercontent.com/u/130107241?v=4", "profile": "https://github.com/oxyzenQ", "contributions": [ "doc" ] }, { "login": "gitgoggles", "name": "gitgoggles", "avatar_url": "https://avatars.githubusercontent.com/u/101480183?v=4", "profile": "https://github.com/gitgoggles", "contributions": [ "code" ] }, { "login": "thunze", "name": "Tom", "avatar_url": "https://avatars.githubusercontent.com/u/22795263?v=4", "profile": "https://github.com/thunze", "contributions": [ "maintenance" ] }, { "login": "ggaddy", "name": "G", "avatar_url": "https://avatars.githubusercontent.com/u/13815367?v=4", "profile": "https://github.com/ggaddy", "contributions": [ "doc" ] }, { "login": "lpnh", "name": "Filipe Paniguel", "avatar_url": "https://avatars.githubusercontent.com/u/90577992?v=4", "profile": "https://github.com/lpnh", "contributions": [ "doc" ] }, { "login": "WqyJh", "name": "Qiying Wang", "avatar_url": "https://avatars.githubusercontent.com/u/15232241?v=4", "profile": "https://www.jianshu.com/u/f5754cd2e83d", "contributions": [ "code" ] } ], "contributorsPerLine": 7, "projectName": "bottom", "projectOwner": "ClementTsang", "repoType": "github", "repoHost": "https://github.com", "skipCi": false, "commitConvention": "angular", "commitType": "docs" } ================================================ FILE: .cargo/config.toml ================================================ [target.x86_64-pc-windows-msvc] rustflags = ["-C", "target-feature=+crt-static"] [target.i686-pc-windows-msvc] rustflags = ["-C", "target-feature=+crt-static"] ================================================ FILE: .cirrus.yml ================================================ %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 --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 ================================================ FILE: .github/ISSUE_TEMPLATE/bug_report.yml ================================================ 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://bottom.pages.dev/nightly/troubleshooting), [the known problems list](https://bottom.pages.dev/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.12.3 - 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. ================================================ FILE: .github/ISSUE_TEMPLATE/config.yml ================================================ blank_issues_enabled: true contact_links: - name: Open a discussion about: | Got a question about using bottom? Need help troubleshooting something? Or maybe just want to talk about something related to bottom? Feel free to open a discussion! url: https://github.com/ClementTsang/bottom/discussions/new ================================================ FILE: .github/ISSUE_TEMPLATE/feature_request.yml ================================================ 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://bottom.pages.dev/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. ================================================ FILE: .github/ISSUE_TEMPLATE/packaging.yml ================================================ 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://bottom.pages.dev/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? ================================================ FILE: .github/actions/test-bsd-target/action.yml ================================================ name: Test BSD Target description: Run tests for a BSD target using VMs, with retries on failure. Needed as cross doesn't support them (https://github.com/cross-rs/cross/wiki/FAQ#running-bsd-tests). inputs: target: description: "Rust target triple (e.g., x86_64-unknown-freebsd)" required: true os-version: description: "OS release version (e.g., 13.2 for FreeBSD)" required: false runs: using: composite steps: - name: FreeBSD Test (Attempt 1) uses: vmactions/freebsd-vm@c9f815bc7aa0d34c9fdd0619b034a32d6ca7b57e # v1.4.2 if: ${{ inputs.target == 'x86_64-unknown-freebsd' }} with: release: "${{ inputs.os-version }}" envs: "RUST_BACKTRACE CARGO_INCREMENTAL CARGO_PROFILE_DEV_DEBUG CARGO_HUSKY_DONT_INSTALL_HOOKS" usesh: true run: sh ./scripts/ci/bsd_tests.sh ${{ inputs.target }} id: freebsd_attempt_1 continue-on-error: true - name: FreeBSD Test (Attempt 2) uses: vmactions/freebsd-vm@c9f815bc7aa0d34c9fdd0619b034a32d6ca7b57e # v1.4.2 if: ${{ inputs.target == 'x86_64-unknown-freebsd' && steps.freebsd_attempt_1.outcome == 'failure' }} with: release: "${{ inputs.os-version }}" envs: "RUST_BACKTRACE CARGO_INCREMENTAL CARGO_PROFILE_DEV_DEBUG CARGO_HUSKY_DONT_INSTALL_HOOKS" usesh: true run: sh ./scripts/ci/bsd_tests.sh ${{ inputs.target }} id: freebsd_attempt_2 continue-on-error: true - name: FreeBSD Test (Attempt 3) uses: vmactions/freebsd-vm@c9f815bc7aa0d34c9fdd0619b034a32d6ca7b57e # v1.4.2 if: ${{ inputs.target == 'x86_64-unknown-freebsd' && steps.freebsd_attempt_2.outcome == 'failure' }} with: release: "${{ inputs.os-version }}" envs: "RUST_BACKTRACE CARGO_INCREMENTAL CARGO_PROFILE_DEV_DEBUG CARGO_HUSKY_DONT_INSTALL_HOOKS" usesh: true run: sh ./scripts/ci/bsd_tests.sh ${{ inputs.target }} id: freebsd_attempt_3 - name: NetBSD Test (Attempt 1) uses: vmactions/netbsd-vm@e04aec09540429f9cebb0e7941f7cd0c0fc3b44f # v1.3.6 if: ${{ inputs.target == 'x86_64-unknown-netbsd' }} with: release: "${{ inputs.os-version }}" envs: "RUST_BACKTRACE CARGO_INCREMENTAL CARGO_PROFILE_DEV_DEBUG CARGO_HUSKY_DONT_INSTALL_HOOKS" usesh: true run: sh ./scripts/ci/bsd_tests.sh ${{ inputs.target }} id: netbsd_attempt_1 continue-on-error: true - name: NetBSD Test (Attempt 2) uses: vmactions/netbsd-vm@e04aec09540429f9cebb0e7941f7cd0c0fc3b44f # v1.3.6 if: ${{ inputs.target == 'x86_64-unknown-netbsd' && steps.netbsd_attempt_1.outcome == 'failure' }} with: release: "${{ inputs.os-version }}" envs: "RUST_BACKTRACE CARGO_INCREMENTAL CARGO_PROFILE_DEV_DEBUG CARGO_HUSKY_DONT_INSTALL_HOOKS" usesh: true run: sh ./scripts/ci/bsd_tests.sh ${{ inputs.target }} id: netbsd_attempt_2 continue-on-error: true - name: NetBSD Test (Attempt 3) uses: vmactions/netbsd-vm@e04aec09540429f9cebb0e7941f7cd0c0fc3b44f # v1.3.6 if: ${{ inputs.target == 'x86_64-unknown-netbsd' && steps.netbsd_attempt_2.outcome == 'failure' }} with: release: "${{ inputs.os-version }}" envs: "RUST_BACKTRACE CARGO_INCREMENTAL CARGO_PROFILE_DEV_DEBUG CARGO_HUSKY_DONT_INSTALL_HOOKS" usesh: true run: sh ./scripts/ci/bsd_tests.sh ${{ inputs.target }} id: netbsd_attempt_3 ================================================ FILE: .github/ci/rust_version.txt ================================================ 1.94.0 ================================================ FILE: .github/pull_request_template.md ================================================ ## Description _A description of the change, what it does, and why it was made. If relevant (e.g. UI changes), **please also provide screenshots/recordings**:_ ## Issue _If applicable, what issue does this address?_ Closes: # ## Testing _If relevant, please state how this was tested (including steps):_ _If this change affects the program, please also indicate which platforms were tested:_ - [ ] _Windows_ - [ ] _macOS (specify version below)_ - [ ] _Linux (specify distro below)_ - [ ] _Other (specify below)_ ## Checklist _Ensure **all** of these are met:_ - [ ] _If this is a code change, areas your change affects have been linted using (`cargo fmt`)_ - [ ] _If this is a code change, your changes pass `cargo clippy --all -- -D warnings`_ - [ ] _If this is a code change, new tests were added if relevant_ - [ ] _If this is a code change, your changes pass `cargo test`_ - [ ] _The change has been tested to work (see above) and doesn't appear to break other things_ - [ ] _Documentation has been updated if needed (`README.md`, help menu, docs, configs, etc.)_ - [ ] _There are no merge conflicts_ - [ ] _You have reviewed the changes first_ - [ ] _The pull request passes the provided CI pipeline_ ## Other _Anything else that maintainers should know about this PR:_ ================================================ FILE: .github/workflows/bsd_vm_check.yml ================================================ # Run BSD VM jobs with manually-implemented retries. name: "BSD VM Check" on: workflow_call: inputs: os-target: type: string description: "BSD target (x86_64-unknown-freebsd, x86_64-unknown-netbsd, or x86_64-unknown-openbsd)" required: true os-version: type: string description: "Release version" required: true # Duplicated because GHA doesn't support passing env vars through without making them all inputs or something. env: RUST_BACKTRACE: 1 CARGO_INCREMENTAL: 0 CARGO_PROFILE_DEV_DEBUG: 0 CARGO_HUSKY_DONT_INSTALL_HOOKS: true jobs: bsd-vm-test: runs-on: ubuntu-24.04 timeout-minutes: 20 steps: - name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: fetch-depth: 1 - name: OpenBSD Test (Attempt 1) uses: vmactions/openbsd-vm@9a8e4351a4a0dc6238e7c69276dcbf6c03bea576 # v1.3.6 if: ${{ inputs.os-target == 'x86_64-unknown-openbsd' }} with: release: "${{ inputs.os-version }}" envs: "RUST_BACKTRACE CARGO_INCREMENTAL CARGO_PROFILE_DEV_DEBUG CARGO_HUSKY_DONT_INSTALL_HOOKS" usesh: true run: sh ./scripts/ci/ci_bsd.sh ${{ inputs.os-target }} id: openbsd_attempt_1 continue-on-error: true - name: OpenBSD Test (Attempt 2) uses: vmactions/openbsd-vm@9a8e4351a4a0dc6238e7c69276dcbf6c03bea576 # v1.3.6 if: ${{ inputs.os-target == 'x86_64-unknown-openbsd' && steps.openbsd_attempt_1.outcome == 'failure' }} with: release: "${{ inputs.os-version }}" envs: "RUST_BACKTRACE CARGO_INCREMENTAL CARGO_PROFILE_DEV_DEBUG CARGO_HUSKY_DONT_INSTALL_HOOKS" usesh: true run: sh ./scripts/ci/ci_bsd.sh ${{ inputs.os-target }} id: openbsd_attempt_2 continue-on-error: true - name: OpenBSD Test (Attempt 3) uses: vmactions/openbsd-vm@9a8e4351a4a0dc6238e7c69276dcbf6c03bea576 # v1.3.6 if: ${{ inputs.os-target == 'x86_64-unknown-openbsd' && steps.openbsd_attempt_2.outcome == 'failure' }} with: release: "${{ inputs.os-version }}" envs: "RUST_BACKTRACE CARGO_INCREMENTAL CARGO_PROFILE_DEV_DEBUG CARGO_HUSKY_DONT_INSTALL_HOOKS" usesh: true run: sh ./scripts/ci/ci_bsd.sh ${{ inputs.os-target }} id: openbsd_attempt_3 - name: Check result if: ${{ failure() }} run: exit 1 ================================================ FILE: .github/workflows/build_releases.yml ================================================ # Builds the following releases: # - Binaries # - Binaries via VMs # - Cirrus binaries (currently just Linux 2.17) # - MSI installer for Windows (.msi) # - .deb releases # - .rpm releases # # Note that for musl targets, we use cross to avoid having to set up the dependencies for musl. # # TODO: Break this up into scripts instead. # TODO: Trigger this in CI as well if this file changes, so I don't have to spam nightly builds. 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/" CROSS_VERSION: "git:588b3c99db52b5a9c5906fab96cfadcf1bde7863" permissions: id-token: write contents: read attestations: write 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) - { target: "x86_64-unknown-linux-gnu", os: "ubuntu-22.04", cross: false, generate-other-artifacts: true, } - { target: "i686-unknown-linux-gnu", os: "ubuntu-22.04", cross: true, } - { target: "x86_64-unknown-linux-musl", os: "ubuntu-22.04", cross: true, } - { target: "i686-unknown-linux-musl", os: "ubuntu-22.04", cross: true, } - { target: "aarch64-unknown-linux-gnu", os: "ubuntu-22.04-arm", cross: false, } - { target: "aarch64-unknown-linux-musl", os: "ubuntu-22.04", cross: true, } # macOS (x86-64 and aarch64) - { target: "x86_64-apple-darwin", os: "macos-15-intel", cross: false, } - { target: "aarch64-apple-darwin", os: "macos-15", cross: false } # Windows (x86-64, x86) - { target: "x86_64-pc-windows-msvc", os: "windows-2022", cross: false, } - { target: "i686-pc-windows-msvc", os: "windows-2022", cross: false } - { target: "x86_64-pc-windows-gnu", os: "windows-2022", cross: false, } # ======= Unsupported targets ======= # armv7 - { target: "armv7-unknown-linux-gnueabihf", os: "ubuntu-22.04", cross: true, } - { target: "armv7-unknown-linux-musleabihf", os: "ubuntu-22.04", cross: true, } # PowerPC 64 LE - { target: "powerpc64le-unknown-linux-gnu", os: "ubuntu-22.04", cross: true, } # Risc-V 64gc - { target: "riscv64gc-unknown-linux-gnu", os: "ubuntu-22.04", cross: true, } # Android - { target: "aarch64-linux-android", os: "ubuntu-24.04", cross: true, no-default-features: true, } # Loongarch - { target: "loongarch64-unknown-linux-gnu", os: "ubuntu-22.04", cross: true, } # Windows ARM, may promote to official. - { target: "aarch64-pc-windows-msvc", os: "windows-11-arm", cross: false, } # FreeBSD - { target: "x86_64-unknown-freebsd", os: "ubuntu-22.04", cross: true, } # NetBSD - { target: "x86_64-unknown-netbsd", os: "ubuntu-22.04", cross: true } steps: - name: Checkout repository if: matrix.info.container == '' uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: fetch-depth: 1 # TODO: Make this and the toolchain step a separate wrapper action? - name: Read Rust version shell: bash run: | VER=$(cat .github/ci/rust_version.txt) echo "RUST_VERSION=$VER" >> $GITHUB_ENV echo "$VER" - name: Set up Rust toolchain if: matrix.info.container == '' uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 with: toolchain: ${{ matrix.info.rust || env.RUST_VERSION }} 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: Set features shell: bash run: | if [[ "${{ matrix.info.no-default-features }}" == "true" ]]; then BUILD_FEATURES="--no-default-features" else BUILD_FEATURES="--features deploy" fi echo "Will build with the following features: $BUILD_FEATURES" echo "BUILD_FEATURES=$BUILD_FEATURES" >> $GITHUB_ENV - name: Build uses: ClementTsang/cargo-action@2438cc5f3ba4e971289fffca2a00dedea6911f14 # v0.0.7 env: BTM_GENERATE: true BTM_BUILD_RELEASE_CALLER: ${{ inputs.caller }} with: command: build args: --release --locked --target=${{ matrix.info.target }} ${{ env.BUILD_FEATURES }} use-cross: ${{ matrix.info.cross }} cross-version: ${{ matrix.info.cross-version || env.CROSS_VERSION }} - name: Move automatically generated completion/manpage shell: bash run: | mv "$COMPLETION_DIR" completion mv "$MANPAGE_DIR" manpage - name: Determine signing slug for Windows signing id: get-signing-slug if: startsWith(matrix.info.os, 'windows') shell: bash run: | mkdir -p signed if [[ ${{ inputs.caller }} == "nightly" ]]; then echo "slug=test-signing" >> $GITHUB_OUTPUT else echo "slug=release-signing" >> $GITHUB_OUTPUT fi - name: Upload unsigned Windows artifact id: upload-unsigned-artifact if: startsWith(matrix.info.os, 'windows') uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 with: retention-days: 1 name: "unsigned-${{ matrix.info.target }}" path: target/${{ matrix.info.target }}/release/btm.exe - name: Sign Windows artifacts if: startsWith(matrix.info.os, 'windows') uses: signpath/github-action-submit-signing-request@3f9250c56651ff692d6729a2fbb0603a42d7d322 # v2.0 with: api-token: "${{ secrets.SIGNPATH_API_TOKEN }}" organization-id: "06b1a1ff-74e1-4d9d-93b1-fa8180c67727" project-slug: "bottom" signing-policy-slug: "${{ steps.get-signing-slug.outputs.slug }}" github-artifact-id: "${{ steps.upload-unsigned-artifact.outputs.artifact-id }}" wait-for-completion: true output-artifact-directory: "signed" - name: Bundle release and completion (Windows) if: startsWith(matrix.info.os, 'windows') shell: bash run: | mv signed/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: ${{ !(startsWith(matrix.info.os, 'windows')) }} 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-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: Read Rust version shell: bash run: | VER=$(cat .github/ci/rust_version.txt) echo "RUST_VERSION=$VER" >> $GITHUB_ENV echo "$VER" - name: Set up Rust toolchain uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 with: toolchain: ${{ env.RUST_VERSION }} 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-24.04" 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/ci/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: ${{ matrix.info.os || 'ubuntu-24.04' }} timeout-minutes: 12 strategy: fail-fast: false matrix: 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: false, dpkg: arm64, os: "ubuntu-22.04-arm", } # The cross images don't work with ARM runners, unfortunately. We could build it on x86 with cross # and then copy it over to an ARM runner but that's kind of annoying, so I'll skip this for now. # TODO: Maybe improve how we do the .deb software building step? - { target: "aarch64-unknown-linux-musl", 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: "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: Read Rust version shell: bash run: | VER=$(cat .github/ci/rust_version.txt) echo "RUST_VERSION=$VER" >> $GITHUB_ENV echo "$VER" - name: Set up Rust toolchain uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 with: toolchain: ${{ matrix.info.rust || env.RUST_VERSION }} target: ${{ matrix.info.target }} - name: Build uses: ClementTsang/cargo-action@2438cc5f3ba4e971289fffca2a00dedea6911f14 # v0.0.7 env: BTM_GENERATE: true BTM_BUILD_RELEASE_CALLER: ${{ inputs.caller }} with: command: build args: --release --locked --features deploy --target ${{ matrix.info.target }} use-cross: ${{ matrix.info.cross || false }} cross-version: ${{ env.CROSS_VERSION }} - 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 (non-container) if: ${{ matrix.info.container == '' }} 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 (container) if: ${{ matrix.info.container != '' }} 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-24.04 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: Read Rust version shell: bash run: | VER=$(cat .github/ci/rust_version.txt) echo "RUST_VERSION=$VER" >> $GITHUB_ENV echo "$VER" - name: Set up Rust toolchain uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 with: toolchain: ${{ matrix.info.rust || env.RUST_VERSION }} target: ${{ matrix.info.target }} - name: Build uses: ClementTsang/cargo-action@2438cc5f3ba4e971289fffca2a00dedea6911f14 # v0.0.7 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 --features deploy --target ${{ matrix.info.target }} cross-version: ${{ env.CROSS_VERSION }} - 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.20.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 generated rpm file id: verify run: | RPM_FILE=$(find bottom-*.rpm) rpm -qip $RPM_FILE # Save for future jobs echo "RPM_FILE=$RPM_FILE" >> $GITHUB_OUTPUT - name: Check generated rpm file signatures run: | rpm --checksig --verbose ${{ steps.verify.outputs.RPM_FILE }} # Validate modern signature digest exist, see https://github.com/ClementTsang/bottom/issues/1848 rpm --checksig --verbose ${{ steps.verify.outputs.RPM_FILE }} | grep -q "SHA256" - name: Test installing generated rpm file run: | yum localinstall -y ${{ steps.verify.outputs.RPM_FILE }} btm -V - 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 test-installing: name: "Test Installing" runs-on: ${{ matrix.info.os }} container: ${{ matrix.info.container }} timeout-minutes: 12 strategy: fail-fast: false matrix: info: - { os: "ubuntu-22.04", target: "x86_64-unknown-linux-gnu" } - { os: "macos-15", target: "aarch64-apple-darwin" } - { os: "windows-2022", target: "x86_64-pc-windows-msvc" } steps: - name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: fetch-depth: 1 - name: Read Rust version shell: bash run: | VER=$(cat .github/ci/rust_version.txt) echo "RUST_VERSION=$VER" >> $GITHUB_ENV echo "$VER" - name: Set up Rust toolchain uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 with: toolchain: ${{ matrix.info.rust || env.RUST_VERSION }} target: ${{ matrix.info.target }} - name: Install (locked) shell: bash run: | cargo install --path . --locked btm -V cargo uninstall bottom - name: Install (not locked) shell: bash run: | cargo install --path . btm -V cargo uninstall bottom ================================================ FILE: .github/workflows/ci.yml ================================================ # 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 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/" CROSS_VERSION: "git:588b3c99db52b5a9c5906fab96cfadcf1bde7863" 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-24.04 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", ".github/ci/**", "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. 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-24.04", target: "x86_64-unknown-linux-gnu", cross: false, } - { os: "ubuntu-24.04-arm", target: "aarch64-unknown-linux-gnu", cross: false, } - { os: "macos-15", target: "x86_64-apple-darwin", cross: false } - { os: "macos-15", 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: Read Rust version shell: bash run: | VER=$(cat .github/ci/rust_version.txt) echo "RUST_VERSION=$VER" >> $GITHUB_ENV echo "$VER" - name: Set up Rust toolchain uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 with: toolchain: ${{ env.RUST_VERSION }} components: rustfmt, clippy target: ${{ matrix.info.target }} - name: Enable Rust cache uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # 2.8.1 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: Run tests uses: ClementTsang/cargo-action@2438cc5f3ba4e971289fffca2a00dedea6911f14 # v0.0.7 with: command: test args: --no-fail-fast --locked ${{ matrix.features }} --target=${{ matrix.info.target }} -- --nocapture --quiet use-cross: ${{ matrix.info.cross }} cross-version: ${{ env.CROSS_VERSION }} env: RUST_BACKTRACE: full - name: Run clippy uses: ClementTsang/cargo-action@2438cc5f3ba4e971289fffca2a00dedea6911f14 # v0.0.7 with: command: clippy args: ${{ matrix.features }} --all-targets --workspace --locked --target=${{ matrix.info.target }} -- -D warnings use-cross: ${{ matrix.info.cross }} cross-version: ${{ env.CROSS_VERSION }} env: RUST_BACKTRACE: full # Run checks for unsupported platforms. # # Each target specifies a list of checks to run via the 'checks' array property. # Available checks: # - format: Run cargo fmt --check # - clippy: Clippy with all features (warnings allowed) # - clippy-deny: Clippy with all features (deny on warnings, implies clippy) # - clippy-no-features: Clippy with no features (warnings allowed) # - test: Run cargo test # # Note: 'clippy-deny' implies 'clippy' and is mutually exclusive with it. # Also, 'clippy' and 'clippy-deny' cannot be combined with 'clippy-no-features'. # # 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-24.04", target: "i686-unknown-linux-gnu", cross: true, checks: ["format", "clippy-deny", "test"], } - { os: "ubuntu-24.04", target: "x86_64-unknown-linux-musl", cross: false, checks: ["format", "clippy-deny", "test"], } - { os: "ubuntu-24.04", target: "i686-unknown-linux-musl", cross: true, checks: ["format", "clippy-deny", "test"], } - { os: "windows-2022", target: "i686-pc-windows-msvc", cross: false, checks: ["format", "clippy-deny", "test"], } - { os: "windows-2022", target: "x86_64-pc-windows-gnu", cross: false, checks: ["format", "clippy-deny", "test"], } # Windows ARM # TODO: Promote to official? - { os: "windows-11-arm", target: "aarch64-pc-windows-msvc", cross: false, checks: ["format", "clippy-deny", "test"], } # Beta - { os: "ubuntu-24.04", target: "x86_64-unknown-linux-gnu", cross: false, rust: "beta", checks: ["format", "clippy-deny", "test"], } - { os: "macos-15", target: "aarch64-apple-darwin", cross: false, rust: "beta", checks: ["format", "clippy-deny", "test"], } - { os: "windows-2022", target: "x86_64-pc-windows-msvc", cross: false, rust: "beta", checks: ["format", "clippy-deny", "test"], } # armv7 - { os: "ubuntu-24.04", target: "armv7-unknown-linux-gnueabihf", cross: true, checks: ["clippy-no-features"], } # armv6 - { os: "ubuntu-24.04", target: "arm-unknown-linux-gnueabihf", cross: true, checks: ["clippy-no-features"], } # PowerPC 64 LE - { os: "ubuntu-24.04", target: "powerpc64le-unknown-linux-gnu", cross: true, checks: ["clippy-no-features"], } # Risc-V 64gc - { os: "ubuntu-24.04", target: "riscv64gc-unknown-linux-gnu", cross: true, checks: ["clippy-no-features"], } # Loongarch - { os: "ubuntu-24.04", target: "loongarch64-unknown-linux-gnu", cross: true, checks: ["clippy-no-features"], } # Android ARM64 - { os: "ubuntu-24.04", target: "aarch64-linux-android", cross: true, checks: ["clippy-no-features"], } # FreeBSD - { os: "ubuntu-24.04", target: "x86_64-unknown-freebsd", cross: true, os-version: "15.0", checks: ["format", "clippy", "test"], } # NetBSD - { os: "ubuntu-24.04", target: "x86_64-unknown-netbsd", cross: true, os-version: "10.1", checks: ["clippy", "test"], } 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: Read Rust version shell: bash run: | VER=$(cat .github/ci/rust_version.txt) echo "RUST_VERSION=$VER" >> $GITHUB_ENV echo "$VER" - name: Set up Rust toolchain uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 with: toolchain: ${{ matrix.info.rust || env.RUST_VERSION }} target: ${{ matrix.info.target }} components: ${{ contains(matrix.info.checks, 'format') && 'rustfmt, clippy' || 'clippy' }} - name: Enable Rust cache uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # 2.8.1 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 if: ${{ contains(matrix.info.checks, 'format') }} run: cargo fmt --all -- --check - name: Run tests uses: ClementTsang/cargo-action@2438cc5f3ba4e971289fffca2a00dedea6911f14 # v0.0.7 if: ${{ contains(matrix.info.checks, 'test') && !contains(matrix.info.target, 'bsd') }} with: command: test args: --no-fail-fast --locked --target=${{ matrix.info.target }} -- --nocapture --quiet use-cross: ${{ matrix.info.cross }} cross-version: ${{ matrix.info.cross-version || env.CROSS_VERSION }} env: RUST_BACKTRACE: full # *BSD targets run tests in a VM due to cross limitations. - name: Run tests (BSD) if: ${{ contains(matrix.info.checks, 'test') && contains(matrix.info.target, 'bsd') }} uses: ./.github/actions/test-bsd-target with: target: ${{ matrix.info.target }} os-version: ${{ matrix.info.os-version }} - name: Set up clippy configuration shell: bash run: | if [[ "${{ contains(matrix.info.checks, 'clippy') && contains(matrix.info.checks, 'clippy-deny') }}" == "true" ]]; then echo "Error: Cannot have both 'clippy' and 'clippy-deny'. 'clippy-deny' implies 'clippy' with stricter warnings." exit 1 fi if [[ "${{ contains(matrix.info.checks, 'clippy-deny') && contains(matrix.info.checks, 'clippy-no-features') }}" == "true" ]]; then echo "Error: Cannot have both 'clippy-deny' (all-features) and 'clippy-no-features'. They are mutually exclusive." exit 1 fi if [[ "${{ contains(matrix.info.checks, 'clippy') && contains(matrix.info.checks, 'clippy-no-features') }}" == "true" ]]; then echo "Error: Cannot have both 'clippy' (all-features) and 'clippy-no-features' in the same checks array. They are mutually exclusive." exit 1 fi # Determine deny vs warn flags if [[ "${{ contains(matrix.info.checks, 'clippy-deny') }}" == "true" ]]; then echo "CLIPPY_FLAGS_EXTRA=-D warnings" >> $GITHUB_ENV else echo "CLIPPY_FLAGS_EXTRA=" >> $GITHUB_ENV fi # Determine all-features (default) vs no-features if [[ "${{ contains(matrix.info.checks, 'clippy-no-features') }}" == "true" ]]; then echo "FEATURE_FLAGS=--no-default-features" >> $GITHUB_ENV else echo "FEATURE_FLAGS=" >> $GITHUB_ENV fi - name: Run clippy uses: ClementTsang/cargo-action@2438cc5f3ba4e971289fffca2a00dedea6911f14 # v0.0.7 if: ${{ contains(matrix.info.checks, 'clippy') || contains(matrix.info.checks, 'clippy-deny') || contains(matrix.info.checks, 'clippy-no-features') }} with: command: clippy args: --all-targets --workspace --target=${{ matrix.info.target }} --locked ${{ env.FEATURE_FLAGS }} -- ${{ env.CLIPPY_FLAGS_EXTRA }} use-cross: ${{ matrix.info.cross }} cross-version: ${{ matrix.info.cross-version || env.CROSS_VERSION }} # # Check BSD platforms using a VM layer. # check-bsd-vm: # needs: pre-job # if: ${{ needs.pre-job.outputs.should_skip != 'true' }} # strategy: # fail-fast: false # matrix: # info: # # OpenBSD is not very well-supported, given that it's tier 3. We skip clippy and only run basic tests + fmt. # # We also use `--no-default-features` when building as starship-battery does not support OpenBSD. # # Cross also doesn't support OpenBSD, so we will do it with VMs here too. # - { os_release: "7.8", target: "x86_64-unknown-openbsd" } # Supports Rust 1.90 # uses: ./.github/workflows/bsd_vm_check.yml # with: # os-target: ${{ matrix.info.target }} # os-version: ${{ matrix.info.os_release }} completion: name: "CI Pass Check" needs: [supported, unsupported-check] if: ${{ needs.supported.result != 'skipped' || needs.unsupported-check.result != 'skipped' }} runs-on: "ubuntu-24.04" steps: - name: CI Passed if: ${{ (needs.supported.result == 'success' || needs.supported.result == 'skipped') && (needs.unsupported-check.result == 'success' || needs.unsupported-check.result == 'skipped') }} run: | echo "CI workflow completed successfully."; - name: CI Failed if: ${{ needs.supported.result == 'failure' || needs.unsupported-check.result == 'failure' }} run: | echo "CI workflow failed."; exit 1; - name: CI Cancelled if: ${{ needs.supported.result == 'cancelled' || needs.unsupported-check.result == 'cancelled' }} run: | echo "CI workflow was cancelled."; exit 1; ================================================ FILE: .github/workflows/clear_workflow_cache.yml ================================================ # 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: if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork runs-on: ubuntu-24.04 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 ================================================ FILE: .github/workflows/coverage.yml ================================================ # 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-24.04 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", ".github/ci", ".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-24.04", 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: Read Rust version shell: bash run: | VER=$(cat .github/ci/rust_version.txt) echo "RUST_VERSION=$VER" >> $GITHUB_ENV echo "$VER" - name: Set up Rust toolchain uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 with: toolchain: ${{ env.RUST_VERSION }} - name: Enable Rust cache uses: Swatinem/rust-cache@f13886b937689c021905a6b90929199931d60db1 # 2.8.1 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.22 --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 retrying is not a built-in feature of GHA, I have no idea. - name: Upload to codecov.io (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 }} id: upload_attempt_1 continue-on-error: true - name: Upload to codecov.io (Attempt 2) 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 }} if: steps.upload_attempt_1.outcome == 'failure' id: upload_attempt_2 continue-on-error: true - name: Upload to codecov.io (Attempt 3) 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 }} if: steps.upload_attempt_2.outcome == 'failure' id: upload_attempt_3 ================================================ FILE: .github/workflows/deployment.yml ================================================ # 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-24.04 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-24.04 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-24.04 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: | --- ## Bug Fixes ## Features ## Changes ## Other ## Internal Changes ## New Contributors --- **Full Changelog:** files: | ./release/* ================================================ FILE: .github/workflows/docs.yml ================================================ # Workflow to deploy mkdocs documentation. name: docs on: workflow_dispatch: workflow_call: inputs: nightly: description: "Optional nightly redirect override" default: "" required: false type: string 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-24.04 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: ./scripts/ci/configure_git.sh - name: Build and deploy docs with mike env: MKDOCS_NIGHTLY_RELEASE_OVERRIDE: ${{ inputs.nightly || '' }} run: | cd docs mike deploy nightly --push publish-gh-pages: needs: [build-documentation] uses: ./.github/workflows/publish_github_pages.yml secrets: inherit ================================================ FILE: .github/workflows/nightly.yml ================================================ # 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-24.04 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-24.04 outputs: TAG_NAME: ${{ steps.tag_release_name.outputs.TAG_NAME }} 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: Create and set tag name and release name if: github.event.inputs.isMock != 'true' id: tag_release_name run: | COMMIT_HASH=$(git rev-parse --short=8 HEAD) TIME=$(date +%s) TAG_NAME=$(echo "nightly-$COMMIT_HASH-$TIME") echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV echo "TAG_NAME=$$TAG_NAME" >> "$GITHUB_OUTPUT" echo "$TAG_NAME" DATE=$(date '+%Y-%m-%d') RELEASE_NAME=$(echo "Nightly ($DATE)") echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_ENV echo "$RELEASE_NAME" # Delete all but last three nightly runs, as well as nightly runs that are a duplicate of today. - name: Delete old tags and release if not mock if: github.event.inputs.isMock != 'true' run: | echo "Deleting any nightly runs with the same name as today's nightly run..." while true; do TO_DELETE_NIGHTLY=$(gh release list --json name,tagName,publishedAt | jq --arg RELEASE_NAME "$RELEASE_NAME" -c '[.[] | select (.tagName | contains("nightly-")) | select (.name == $RELEASE_NAME)][0] | .tagName' | tr -d '"') if [[ "$TO_DELETE_NIGHTLY" != "null" && "$TO_DELETE_NIGHTLY" == *"nightly-"* ]]; then echo "Will delete nightly release with tag '$TO_DELETE_NIGHTLY'"; gh release delete $TO_DELETE_NIGHTLY --cleanup-tag || { echo "couldn't delete previous nightly release, halting"; break; } else echo "no nightly releases left, done"; break; fi done echo "Now pruning all but the last two nightly runs (so we end up with 3 releases after)..." while true; do # Very gross trick - keep deleting the 3rd nightly element ([2]) until null. TO_DELETE_NIGHTLY=$(gh release list --json name,tagName,publishedAt | jq --arg RELEASE_NAME "$RELEASE_NAME" -c '[.[] | select (.tagName | contains("nightly-"))][2] | .tagName' | tr -d '"') if [[ "$TO_DELETE_NIGHTLY" != "null" && "$TO_DELETE_NIGHTLY" == *"nightly-"* ]]; then echo "Will delete nightly release with tag '$TO_DELETE_NIGHTLY'"; gh release delete $TO_DELETE_NIGHTLY --cleanup-tag || { echo "couldn't delete previous nightly release, halting"; break; } else echo "no nightly releases left, done"; break; fi done env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # As a workaround to immutable releases, we create it as a draft first, then manually publish it after. - 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: ${{ env.TAG_NAME }} draft: true fail_on_unmatched_files: true name: ${{ env.RELEASE_NAME }} files: | ./release/* - name: Publish the draft release if: github.event.inputs.isMock != 'true' run: gh release edit "$TAG_NAME" --draft=false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} docs: needs: [initialize-job, upload-release] if: ${{ needs.initialize-job.outputs.should_skip != 'true' && github.event.inputs.isMock != 'true' }} uses: ./.github/workflows/docs.yml secrets: inherit with: nightly: ${{needs.job1.outputs.output1}} ================================================ FILE: .github/workflows/post_release.yml ================================================ # 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-24.04 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-24.04 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: ./scripts/ci/configure_git.sh - name: Build and deploy docs with mike as the latest stable branch run: | cd docs mike deploy --push --update-aliases ${RELEASE_VERSION} stable publish-gh-pages: needs: [docs] uses: ./.github/workflows/publish_github_pages.yml secrets: inherit chocolatey: needs: [initialize] runs-on: ubuntu-24.04 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"'" } }' ================================================ FILE: .github/workflows/publish_github_pages.yml ================================================ # Workflow to publish to GitHub Pages. Based on the normal # job (e.g. https://github.com/ClementTsang/bottom/actions/runs/19805277892), # but re-implemented so I can pin hashes. # # This action uses actions/upload-pages-artifact, which uses actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 (v4.6.2). name: Publish GitHub Pages on: workflow_dispatch: workflow_call: jobs: build: runs-on: ubuntu-24.04 steps: - name: Checkout repository uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 with: ref: gh-pages submodules: recursive fetch-depth: 1 - name: Upload artifact id: upload uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0 with: path: "./" deploy: runs-on: ubuntu-24.04 needs: build if: github.ref == 'refs/heads/main' environment: name: github-pages url: ${{ steps.deploy.outputs.page_url }} permissions: pages: write id-token: write steps: - name: Deploy to GitHub Pages id: deploy uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5 ================================================ FILE: .github/workflows/test_docs.yml ================================================ # 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-24.04 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-24.04 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 ================================================ FILE: .github/workflows/validate_schema.yml ================================================ # 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-24.04 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", ".github/ci", "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-24.04 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 ================================================ FILE: .gitignore ================================================ # Generated by Cargo # will have compiled files and executables /target/ # These are backup files generated by rustfmt **/*.rs.bk # Logging *.log # Flamegraph stuff flamegraphs/ rust-unmangle ./*.svg flamegraph.svg *.data *.data.old # IntelliJ .idea/ # Heaptrack files *.zst # For testing sample_configs/testing*.toml # Cargo-deny deny.toml # Editors .vscode .zed .idea # 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 ================================================ FILE: .markdownlint.json ================================================ { "MD013": false, "MD041": false, "MD033": false, "MD040": false, "MD024": false, "MD025": false, "MD046": false, "MD059": false, } ================================================ FILE: CHANGELOG.md ================================================ # 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 hard rules, though the project will generally try to follow them. --- ## [0.12.4]/[0.13.0] - Unreleased ### Features - [#1938](https://github.com/ClementTsang/bottom/pull/1938), [#1980](https://github.com/ClementTsang/bottom/pull/1980): Report average packet size and packet rate. ### Other - [#1955](https://github.com/ClementTsang/bottom/pull/1955): Fix mirrored documentation deploy to GitHub Pages. - [#1957](https://github.com/ClementTsang/bottom/pull/1957): Fix CI bug around deploying docs on release. - [#1958](https://github.com/ClementTsang/bottom/pull/1958): Fix cosmetic banner issue on docs page. ## [0.12.3] - 2026-01-01 ### Bug Fixes - [#1943](https://github.com/ClementTsang/bottom/pull/1943): Fix a crash caused by multibyte UTF8 chars in process names. ### Other - [#1939](https://github.com/ClementTsang/bottom/pull/1935): Update Fedora install instructions. ## [0.12.2] - 2025-12-25 ### Bug Fixes - [#1933](https://github.com/ClementTsang/bottom/pull/1933): Fix a memory leak in Windows while getting process priority information. ## [0.12.1] - 2025-12-25 ### Other - [#1920](https://github.com/ClementTsang/bottom/pull/1920), [#1921](https://github.com/ClementTsang/bottom/pull/1921): Fix issues with installing via Cargo when locked dependencies aren't used. ## [0.12.0] - 2025-12-25 ### Features - [#1830](https://github.com/ClementTsang/bottom/pull/1830): Add spacebar shortcut to toggle process tree expansion. - [#1861](https://github.com/ClementTsang/bottom/pull/1861): Add read-only mode, where things like killing processes is disabled. - [#1890](https://github.com/ClementTsang/bottom/pull/1890): Add enter key shortcut to close process search widget. - [#1881](https://github.com/ClementTsang/bottom/pull/1881): Add nice (UNIX-only) and priority columns to the process widget. ### Bug Fixes - [#1910](https://github.com/ClementTsang/bottom/pull/1910): Fix a bug around quote parsing in the process widget's search. ### Other - [#1888](https://github.com/ClementTsang/bottom/pull/1888): Make automatically generated `.deb` package conflict with the official one. - [#1891](https://github.com/ClementTsang/bottom/pull/1891): Fix typos in codebase. - [#1896](https://github.com/ClementTsang/bottom/pull/1896): Rename Linux icon to avoid collision with generic "bottom" icon. - [#1913](https://github.com/ClementTsang/bottom/pull/1913): Add `loongarch64-unknown-linux-gnu` binary build target in CI. - [#1914](https://github.com/ClementTsang/bottom/pull/1914): Add `aarch64-linux-android` binary build target in CI (with no default features). ## [0.11.4] - 2025-11-16 ### Bug Fixes - [#1859](https://github.com/ClementTsang/bottom/pull/1859): Ensure average CPU is drawn on top in "All" mode. - [#1867](https://github.com/ClementTsang/bottom/pull/1867): Fix network graph y-axis height cache not updating correctly. - [#1867](https://github.com/ClementTsang/bottom/pull/1867): Fix network graph y-axis occasionally starting with a range of zero. ### Other - [#1863](https://github.com/ClementTsang/bottom/pull/1863): Replace bottom icon with a square version. - [#1865](https://github.com/ClementTsang/bottom/pull/1865): Improve help dialog width calculation. ## [0.11.3] - 2025-11-06 ### Features - [#1812](https://github.com/ClementTsang/bottom/pull/1812): Add `free_arc` option to subtract ARC from total memory usage. ### Bug Fixes - [#1833](https://github.com/ClementTsang/bottom/pull/1833): Sort disk I/O using actual value rather than string representation. - [#1812](https://github.com/ClementTsang/bottom/pull/1812): Fix ARC collection on FreeBSD. - [#1846](https://github.com/ClementTsang/bottom/pull/1846): Fix displayed average CPU value being wrong in graphs. ### Other - [#1838](https://github.com/ClementTsang/bottom/pull/1838): Add icon for application. ## [0.11.2] - 2025-10-07 ### 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. - [#1772](https://github.com/ClementTsang/bottom/pull/1772): Support hiding kernel threads. ### 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. - [#1811](https://github.com/ClementTsang/bottom/pull/1811): Fix drawing average CPU in basic mode when dedicated row is enabled. - [#1817](https://github.com/ClementTsang/bottom/pull/1817): Fix builds for FreeBSD on ARM/PowerPC due to `libc::c_char` data type being different. - [#1821](https://github.com/ClementTsang/bottom/pull/1821): Use alpha version of ratatui version which fixes drawing at high resolutions. - [#1827](https://github.com/ClementTsang/bottom/pull/1827): Fix crash for Windows where the network widget could cause a crash if the program started too quickly after boot under certain settings. ### Other - [#1801](https://github.com/ClementTsang/bottom/pull/1801): Build and check Windows ARM. - [#1816](https://github.com/ClementTsang/bottom/pull/1816): Optimize username cloning on Unix. ## [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//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 `` 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 `` 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. ================================================ FILE: CONTRIBUTING.md ================================================ # 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 necessary 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://bottom.pages.dev/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://bottom.pages.dev/nightly/contribution/issues-and-pull-requests/). ### Documentation For contributing to documentation, see [here](https://bottom.pages.dev/nightly/contribution/documentation/). ### Packaging If you want to become a package maintainer, see [here](https://bottom.pages.dev/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. ================================================ FILE: Cargo.toml ================================================ [package] name = "bottom" version = "0.12.3" repository = "https://github.com/ClementTsang/bottom" license = "MIT" description = "A customizable cross-platform graphical process/system monitor for the terminal. Supports Linux, macOS, and Windows." documentation = "https://bottom.pages.dev/stable" readme = "README.md" default-run = "btm" build = "build.rs" authors = ["Clement Tsang "] 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", "debug.log", "flamegraph.svg", "profile.json.gz", "rustfmt.toml", ] edition = "2024" # The oldest version I've tested that should still build - note this is not an official MSRV! rust-version = "1.85" [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.101" cfg-if = "1.0.4" clap = { version = "4.5.57", features = ["default", "cargo", "wrap_help", "derive"] } concat-string = "1.0.1" crossterm = "0.29.0" ctrlc = { version = "3.5.0", features = ["termination"] } dirs = "6.0.0" humantime = "2.3.0" indexmap = "2.13.0" indoc = "2.0.7" itertools = "0.14.0" nohash = "0.2.0" nvml-wrapper = { version = "0.11.0", optional = true, features = ["legacy-functions"] } ratatui-core = "0.1.0" regex = "1.12.3" rustc-hash = "2.1.1" serde = { version = "1.0.228", features = ["derive"] } starship-battery = { version = "0.10.3", optional = true } sysinfo = "=0.38.0" timeless = "0.0.14-alpha" toml_edit = { version = "0.24.0", features = ["serde"] } tui = { version = "0.30.0", package = "ratatui", features = [ "unstable-rendered-line-info", "layout-cache", "crossterm", ] } unicode-ellipsis = "0.3.0" unicode-segmentation = "1.12.0" unicode-width = "0.2.2" # Used for logging. Mostly a debugging tool. fern = { version = "0.7.1", optional = true } log = { version = "0.4.29", optional = true } time = { version = "0.3.47", features = ["local-offset", "formatting", "macros"], optional = true } # These are just used for JSON schema generation. schemars = { version = "1.2.1", optional = true } serde_json = { version = "1.0.149", optional = true } strum = { version = "0.27.2", features = ["derive"], optional = true } [target.'cfg(unix)'.dependencies] libc = "0.2.180" [target.'cfg(target_os = "linux")'.dependencies] rustix = { version = "1.1.2", features = ["fs", "param"] } [target.'cfg(target_os = "macos")'.dependencies] core-foundation = "0.10.1" mach2 = "0.6.0" [target.'cfg(target_os = "windows")'.dependencies] windows = { version = "0.62.2", features = [ "Win32_Foundation", "Win32_Security", "Win32_Storage_FileSystem", "Win32_System_IO", "Win32_System_Ioctl", "Win32_System_Performance", "Win32_System_ProcessStatus", "Win32_System_Threading", ] } [target.'cfg(target_os = "freebsd")'.dependencies] serde_json = { version = "1.0.145" } sysctl = { version = "0.7.1" } filedescriptor = "0.8.3" [dev-dependencies] assert_cmd = "2.1.2" predicates = "3.1.3" tempfile = { version = "3.23.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.57", features = ["default", "cargo", "wrap_help", "derive"] } clap_complete = "4.5.62" clap_complete_nushell = "4.5.10" clap_complete_fig = "4.5.2" clap_mangen = "0.2.31" indoc = "2.0.7" # Compile dependencies with optimizations enabled, even in debug mode. [profile.dev.package."*"] opt-level = 3 [profile.release] debug = 0 strip = "symbols" lto = true opt-level = 3 codegen-units = 1 [profile.profiling] inherits = "release" debug = true strip = false [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", ], [ "assets/icons/bottom-system-monitor.svg", "/usr/share/icons/hicolor/scalable/apps/bottom-system-monitor.svg", "644", ], ] conflicts = "btm" 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" product-icon = "assets/icons/bottom.ico" [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" }, { source = "assets/icons/bottom-system-monitor.svg", dest = "/usr/share/icons/hicolor/scalable/apps/bottom-system-monitor.svg", mode = "644" }, ] [lints.rust] rust_2018_idioms = "deny" # missing_docs = "deny" [lints.rustdoc] broken_intra_doc_links = "deny" private_intra_doc_links = "deny" missing_crate_level_docs = "deny" [lints.clippy] todo = "deny" unimplemented = "deny" missing_safety_doc = "deny" unwrap_used = "deny" ================================================ FILE: Cross.toml ================================================ [build.env] passthrough = ["RUST_BACKTRACE", "BTM_GENERATE"] [target.x86_64-unknown-netbsd] pre-build = [ "apt-get update && apt-get install -y --no-install-recommends curl xz-utils && td=$(mktemp -d) && mkdir -p \"$td/netbsd\" && curl -4 --retry 3 -sSfL 'http://ftp.netbsd.org/pub/NetBSD/NetBSD-9.3/amd64/binary/sets/base.tar.xz' | tar -C \"$td/netbsd\" -xJ ./usr/lib ./lib && curl -4 --retry 3 -sSfL 'http://ftp.netbsd.org/pub/NetBSD/NetBSD-9.3/amd64/binary/sets/comp.tar.xz' | tar -C \"$td/netbsd\" -xJ ./usr/lib && cp \"$td\"/netbsd/usr/lib/libkvm* /usr/local/x86_64-unknown-netbsd/lib/ && rm -rf \"$td\"", ] ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2019 Clement Tsang Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================

bottom (btm)

A customizable cross-platform graphical process/system monitor for the terminal.
Supports Linux, macOS, and Windows. Inspired by gtop, gotop, and htop.

[CI status](https://github.com/ClementTsang/bottom/actions?query=branch%3Amain) [crates.io link](https://crates.io/crates/bottom) [Stable documentation](https://bottom.pages.dev/stable) [Nightly documentation](https://bottom.pages.dev/nightly) [Doc mirror on GitHub Pages](https://clementtsang.github.io/bottom/stable)
Quick demo recording showing off bottom's searching, expanding, and process killing.

Demo using the Gruvbox theme (--theme gruvbox), along with IBM Plex Mono and Kitty

## Table of contents - [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) - [COPR](#copr) - [Terra](#terra) - [RPM](#rpm) - [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) - [mise](#mise) - [Pre-built binaries](#pre-built-binaries) - [Auto-completion](#auto-completion) - [Usage](#usage) - [Configuration](#configuration) - [Troubleshooting](#troubleshooting) - [Documentation](#documentation) - [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://bottom.pages.dev/nightly/usage/widgets/cpu/) over time, at an average and per-core level - [RAM and swap usage](https://bottom.pages.dev/nightly/usage/widgets/memory/) over time - [Network I/O usage](https://bottom.pages.dev/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://bottom.pages.dev/nightly/usage/widgets/disk/) - [Temperature sensors](https://bottom.pages.dev/nightly/usage/widgets/temperature/) - [Battery usage](https://bottom.pages.dev/nightly/usage/widgets/battery/) - [A process widget](https://bottom.pages.dev/nightly/usage/widgets/process/) for displaying, sorting, and searching info about processes, as well as support for: - [Kill signals](https://bottom.pages.dev/nightly/usage/widgets/process/#process-termination) - [Tree mode](https://bottom.pages.dev/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://bottom.pages.dev/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://bottom.pages.dev/nightly/usage/basic-mode/) - [Expansion, which focuses on just one widget](https://bottom.pages.dev/nightly/usage/general-usage/#expansion) - And more! You can find more details in [the documentation](https://bottom.pages.dev/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://bottom.pages.dev/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`, `loongarch64`) - Android (`arm64`) - Windows (`arm64`) For more details on unsupported platforms and known problems, check out [the documentation](https://bottom.pages.dev/nightly/support/unofficial/). ## Installation ### Cargo Installation via `cargo` can be done by installing the [`bottom`](https://crates.io/crates/bottom) crate: ```bash # You might need to update the stable version of Rust first. # Other versions might work, but this is not guaranteed. rustup update stable # Install the binary from crates.io. cargo install bottom --locked # If you use another channel by default, you can specify # the what channel to use like so: cargo +stable install bottom --locked # --locked may be omitted if you wish to not use the # locked crate versions in Cargo.lock. However, be # aware that this may cause problems with dependencies. cargo install bottom ``` Alternatively, you can use `cargo install` using the repo as the source. ```bash # You might need to update the stable version of Rust first. # Other versions might work, but this is not guaranteed. rustup update stable # Option 1 - Download an archive from releases and install curl -LO https://github.com/ClementTsang/bottom/archive/0.12.3.tar.gz tar -xzvf 0.12.3.tar.gz cargo install --path . --locked # Option 2 - Manually clone the repo and install git clone https://github.com/ClementTsang/bottom cd bottom cargo install --path . --locked # 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://bottom.pages.dev/nightly/nightly-release) 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.12.3/bottom_0.12.3-1_amd64.deb sudo dpkg -i bottom_0.12.3-1_amd64.deb # ARM64 curl -LO https://github.com/ClementTsang/bottom/releases/download/0.12.3/bottom_0.12.3-1_arm64.deb sudo dpkg -i bottom_0.12.3-1_arm64.deb # ARM curl -LO https://github.com/ClementTsang/bottom/releases/download/0.12.3/bottom_0.12.3-1_armhf.deb sudo dpkg -i bottom_0.12.3-1_armhf.deb # musl-based curl -LO https://github.com/ClementTsang/bottom/releases/download/0.12.3/bottom-musl_0.12.3-1_amd64.deb sudo dpkg -i bottom-musl_0.12.3-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 #### COPR > [!WARNING] > > `atim/bottom` seems to be unmaintained and may be outdated ([relevant issue](https://github.com/ClementTsang/bottom/issues/1904)) bottom is available on [COPR](https://copr.fedorainfracloud.org/coprs/atim/bottom/): ```bash sudo dnf copr enable atim/bottom -y sudo dnf install bottom ``` #### Terra 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 `.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.12.3/bottom-0.12.3-1.x86_64.rpm sudo dnf install ./bottom-0.12.3-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 The formula is 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 manually install bottom as a Windows program by downloading and using the `.msi` file from the [latest release](https://github.com/ClementTsang/bottom/releases/latest). ### 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 ``` ### mise bottom is available in [mise](https://github.com/jdx/mise). You can install it like so: ``` mise use -g bottom@latest ``` ### Pre-built binaries You can also use the pre-built release binaries: - [Latest stable release](https://github.com/ClementTsang/bottom/releases/latest) - [Latest nightly release](https://bottom.pages.dev/nightly/nightly-release) 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](). - For Elvish, the completion file is `btm.elv`. - For Fig, the completion file is `btm.ts`. - For Nushell, source `btm.nu`. The individual auto-completion files are also included in the stable/nightly releases as `completion.tar.gz` if needed. ## Usage You can run bottom 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://bottom.pages.dev/nightly/). You can find more information on usage in the [documentation](https://bottom.pages.dev/nightly/). ## Configuration 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. More details on configuration can be found [in the documentation](https://bottom.pages.dev/nightly/configuration/config-file/). ## Troubleshooting If some things aren't working, give the [troubleshooting page](https://bottom.pages.dev/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. ## Documentation The main documentation page can be found at , using Cloudflare Pages. If needed, a mirror hosted using Github Pages is also available at . ## Contribution 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. ### Contributors Thanks to all contributors:
Marcin Wojnarowski
Marcin Wojnarowski

💻 📦
Mahmoud Al-Qudsi
Mahmoud Al-Qudsi

💻
Andy
Andy

💻
Kim Brose
Kim Brose

💻
Sven-Hendrik Haase
Sven-Hendrik Haase

📖
Artem Polishchuk
Artem Polishchuk

📦 📖
Trung Lê
Trung Lê

📦 🚇
dm9pZCAq
dm9pZCAq

📦 📖
Lukas Rysavy
Lukas Rysavy

💻
Erlend Hamberg
Erlend Hamberg

💻
Frederick Zhang
Frederick Zhang

💻
pvanheus
pvanheus

💻
Brian Di Palma
Brian Di Palma

📖
Lasha Kanteladze
Lasha Kanteladze

📖
Herby Gillot
Herby Gillot

📖
Greg Brown
Greg Brown

💻
TotalCaesar659
TotalCaesar659

📖
George Rawlinson
George Rawlinson

📖 📦
adiabatic
adiabatic

📖
Randy Barlow
Randy Barlow

💻
Patrick Jackson
Patrick Jackson

🤔 📖
Mateusz Mikuła
Mateusz Mikuła

💻
Guillaume Gomez
Guillaume Gomez

💻
shura
shura

💻
Wesley Moore
Wesley Moore

💻
xgdgsc
xgdgsc

📖
ViridiCanis
ViridiCanis

💻
Justin Martin
Justin Martin

💻 📖
Diana
Diana

💻
Hervy Qurrotul Ainur Rozi
Hervy Qurrotul Ainur Rozi

📖
Mike Rivnak
Mike Rivnak

📖
lroobrou
lroobrou

💻
database64128
database64128

💻
Chon Sou
Chon Sou

💻
DrSheppard
DrSheppard

📖
Rareș Constantin
Rareș Constantin

💻
felipesuri
felipesuri

📖
spital
spital

💻
Michael Bikovitsky
Michael Bikovitsky

💻
Dmitry Valter
Dmitry Valter

💻
Grace Stok
Grace Stok

💻
Yuxuan Shui
Yuxuan Shui

💻
Wenqing Zong
Wenqing Zong

💻
Gabriele Belluardo
Gabriele Belluardo

💻
Zeb Piasecki
Zeb Piasecki

💻
wzy
wzy

💻 📖
john-s-lin
john-s-lin

📖
Lee Wonjoon
Lee Wonjoon

💻 📖
David Legrand
David Legrand

📖
Michal Bryxí
Michal Bryxí

📖
Raphael Erik Hviding
Raphael Erik Hviding

💻
CosmicHorror
CosmicHorror

💻
Ben Woods
Ben Woods

📖
Stephen Huan
Stephen Huan

💻
Jason Gwartz
Jason Gwartz

📖
llc0930
llc0930

💻
Ada Ahmed
Ada Ahmed

💻
Wateir
Wateir

📖
Andrey Alekseenko
Andrey Alekseenko

💻
Fotis Gimian
Fotis Gimian

💻 📖
Fernando Rodrigues
Fernando Rodrigues

📖
Matthew Toohey
Matthew Toohey

💻
Julius Enriquez
Julius Enriquez

📖
Ben Brown
Ben Brown

💻
Yuri Astrakhan
Yuri Astrakhan

💻 📖
Kenichi Kamiya
Kenichi Kamiya

💻
yahlia
yahlia

💻
Bucket-Bucket-Bucket
Bucket-Bucket-Bucket

💻
Marek Sierociński
Marek Sierociński

📖
Tommaso Montanari
Tommaso Montanari

🎨 🤔
Jean-Yves LENHOF
Jean-Yves LENHOF

📖
Adarsh Das
Adarsh Das

💻 📖
rezky_nightky
rezky_nightky

📖
gitgoggles
gitgoggles

💻
Tom
Tom

🚧
G
G

📖
Filipe Paniguel
Filipe Paniguel

📖
Qiying Wang
Qiying Wang

💻
## Thanks - 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/). - 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. - And of course, thank you again to all contributors and package maintainers! - 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. - To those who support my work financially via donations, thank you so much. - 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). JetBrains logo - Also thanks to [SignPath.io](https://about.signpath.io/) for providing a free code signing service, and to the [SignPath Foundation](https://signpath.org/) for the certificate. ================================================ FILE: build.rs ================================================ //! General build script used by bottom to generate completion files and set binary version. #![expect(clippy::unwrap_used)] #[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(to_generate: G, cmd: &mut Command, out_dir: &Path) -> io::Result 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 = 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(()) } ================================================ FILE: clippy.toml ================================================ cognitive-complexity-threshold = 100 type-complexity-threshold = 500 too-many-arguments-threshold = 8 allow-unwrap-in-consts = true allow-unwrap-in-tests = true ================================================ FILE: codecov.yml ================================================ coverage: status: project: default: target: auto threshold: 30% patch: off ================================================ FILE: desktop/bottom.desktop ================================================ [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 Icon=bottom-system-monitor ================================================ FILE: docs/.gitignore ================================================ site/ venv/ .cache/ hooks/__pycache__/ ================================================ FILE: docs/README.md ================================================ # 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)" ``` ================================================ FILE: docs/content/configuration/command-line-options.md ================================================ # 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 ` | Sets the location of the config file. | | `-t`, `--default_time_value