Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: state refactor #571

Closed
wants to merge 42 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
f73ea0d
refactor: Start state refactor
ClementTsang May 23, 2021
5749c32
deps: Update crossterm + tui-rs, along with event handling code
ClementTsang Aug 14, 2021
fceae8d
refactor: clean up some states and code
ClementTsang Aug 14, 2021
4f0eb7b
refactor: Create basic widget system
ClementTsang Aug 15, 2021
e657fec
refactor: Create new main widgets
ClementTsang Aug 18, 2021
64c6d0c
refactor + change: write new movement logic
ClementTsang Aug 23, 2021
88ebcab
refactor: add glue to prep for the transition
ClementTsang Aug 23, 2021
b5e6dea
refactor: more glue code to build layout
ClementTsang Aug 25, 2021
189be96
refactor: rename files from mod to their directory names
ClementTsang Aug 25, 2021
dd7e183
refactor: rip out trait system for drawing widgets
ClementTsang Aug 25, 2021
0afc371
refactor: start moving over drawing system
ClementTsang Aug 26, 2021
6b69e37
refactor: start moving over the event system
ClementTsang Aug 27, 2021
b72e76a
refactor: separate out sorted and non-sorted text tables
ClementTsang Aug 28, 2021
2bff04d
refactor: port over graph widgets
ClementTsang Aug 28, 2021
64d47d5
refactor: add network drawing cache system
ClementTsang Aug 29, 2021
74293aa
refactor: another pass on sorting and columns
ClementTsang Aug 29, 2021
1ec203c
refactor: Add data updating to process widget
ClementTsang Aug 29, 2021
48c572d
refactor: change up event handling logistics
ClementTsang Aug 29, 2021
3fa5060
bug: fix bug causing click bounds to fail
ClementTsang Aug 30, 2021
27736b7
refactor: Add sort capabilities to processes
ClementTsang Aug 30, 2021
b1889b0
refactor: add text input
ClementTsang Aug 31, 2021
204b4dc
refactor: add back grouping and command
ClementTsang Aug 31, 2021
eddc9a1
refactor: move basic mode over
ClementTsang Aug 31, 2021
fa00dec
refactor: move over battery widget
ClementTsang Sep 5, 2021
18af6b0
refactor: delete a bunch of old unused code
ClementTsang Sep 5, 2021
9ef38cb
refactor: add back widget titles
ClementTsang Sep 7, 2021
d8a6a23
refactor: use a builder for block building
ClementTsang Sep 8, 2021
955840b
refactor: Add back scroll position and expanded
ClementTsang Sep 8, 2021
587987a
refactor: add back original behaviour for closing search/sort in proc
ClementTsang Sep 9, 2021
e7b9c72
refactor: add general keybinds, fix buggy movement
ClementTsang Sep 9, 2021
7ee85a8
refactor: finish help menu
ClementTsang Sep 22, 2021
abcca77
refactor: add process search conditions and error
ClementTsang Sep 25, 2021
35ec66e
refactor: cover almost all keybinds except killing processes
ClementTsang Sep 26, 2021
5c87974
refactor: delete a ton of unused code
ClementTsang Sep 26, 2021
b6ca3e0
other: fix merge conflicts
ClementTsang Sep 26, 2021
9089231
refactor: delete more stuff
ClementTsang Sep 26, 2021
f02daa0
refactor: various bug fixes and code removal
ClementTsang Sep 27, 2021
5833cb8
Merge branch 'master' into state_refactor
ClementTsang Oct 31, 2021
cc66f1f
refactor: mostly add back tree mode for process
ClementTsang Nov 21, 2021
16babea
refactor: Remove some dead code
ClementTsang Nov 21, 2021
e89d46e
refactor: Add CPU load back
ClementTsang Nov 24, 2021
1593847
refactor: switch to iterative tree building for proc
ClementTsang Nov 24, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## 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.
- [#557](https://github.com/ClementTsang/bottom/pull/557): Add '/s' to network usage legend to indicate "per second".

## Bug Fixes

Expand Down
150 changes: 107 additions & 43 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bottom"
version = "0.6.4"
version = "0.7.0"
authors = ["Clement Tsang <cjhtsang@uwaterloo.ca>"]
edition = "2018"
repository = "https://github.com/ClementTsang/bottom"
Expand All @@ -25,8 +25,6 @@ doc = false
[profile.release]
debug = 0
lto = true
# debug = true
# lto = false
opt-level = 3
codegen-units = 1

Expand All @@ -36,27 +34,30 @@ default = ["fern", "log", "battery"]
[dependencies]
anyhow = "1.0.40"
backtrace = "0.3.59"
crossterm = "0.18.2"
crossterm = "0.22.1"
ctrlc = { version = "3.1.9", features = ["termination"] }
clap = "2.33"
cfg-if = "1.0"
dirs = "3.0.2"
enum_dispatch = "0.3.7"
float-ord = "0.3.2"
futures = "0.3.14"
futures-timer = "3.0.2"
fxhash = "0.2.1"
indexmap = "1.6.2"
indextree = "4.3.1"
itertools = "0.10.0"
once_cell = "1.5.2"
regex = "1.5.4"
rustc-hash = "1.1.0"
serde = { version = "1.0.125", features = ["derive"] }
# Sysinfo is still used in Linux for the ProcessStatus
sysinfo = "0.18.2"
thiserror = "1.0.24"
textwrap = "0.14.2"
time = { version = "0.3.3", features = ["formatting", "local-offset", "macros"] }
toml = "0.5.8"
tui = { version = "0.14.0", features = ["crossterm"], default-features = false }
typed-builder = "0.9.0"
unicode-segmentation = "1.7.1"
tui = { version = "0.16.0", features = ["crossterm"], default-features = false }
unicode-segmentation = "1.8.0"
unicode-width = "0.1"

# For debugging only... disable on release builds with for now? TODO: Redo this.
Expand Down
3 changes: 2 additions & 1 deletion clippy.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
cognitive-complexity-threshold = 100
type-complexity-threshold = 500
type-complexity-threshold = 500
too-many-arguments-threshold = 10
2 changes: 0 additions & 2 deletions docs/content/configuration/command-line-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ The following flags can be provided to bottom in the command line to change the
| `-C, --config <CONFIG PATH>` | Sets the location of the config file. |
| `-u, --current_usage` | Sets process CPU% to be based on current CPU%. |
| `-t, --default_time_value <MS>` | Default time value for graphs in ms. |
| `--default_widget_count <INT>` | Sets the n'th selected widget type as the default. |
| `--default_widget_type <WIDGET TYPE>` | Sets the default widget type, use --help for more info. |
| `--disable_advanced_kill` | Hides advanced options to stop a process on Unix-like systems. |
| `--disable_click` | Disables mouse clicks. |
| `-m, --dot_marker` | Uses a dot marker for graphs. |
Expand Down
4 changes: 2 additions & 2 deletions docs/content/usage/general-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ Note that key bindings are generally case-sensitive.
| ------------------------------------------------------------ | ------------------------------------------------------------ |
| ++q++ , ++ctrl+c++ | Quit |
| ++esc++ | Close dialog windows, search, widgets, or exit expanded mode |
| ++ctrl+r++ | Reset display and any collected data |
| ++f++ | Freeze/unfreeze updating with new data |
| ++ctrl+r++ | Resets any collected data |
| ++f++ | Toggles freezing, stopping new data from being shown |
| ++question++ | Open help menu |
| ++e++ | Toggle expanding the currently selected widget |
| ++ctrl+up++ <br/> ++shift+up++ <br/> ++K++ <br/> ++W++ | Select the widget above |
Expand Down
Loading