Updated documentation.

This commit is contained in:
ClementTsang 2020-01-17 19:59:01 -05:00
parent 4c7b3ee239
commit 2832ddebb0
2 changed files with 18 additions and 9 deletions

View File

@ -76,7 +76,9 @@ Run using `btm`.
- `-u`, `--current_usage` will make a process' CPU usage be based on the current total CPU usage, rather than assuming 100% CPU usage. Only affects Linux for now.
- `g`, `--group` will group together processes with the same name by default (equivalent to pressing `Tab`).
- `-g`, `--group` will group together processes with the same name by default (equivalent to pressing `Tab`).
- `-s`, `--simple_search` will default the search to simple search rather than regex search.
### Keybindings
@ -122,6 +124,10 @@ Run using `btm`.
- `Ctrl-p` or `Ctrl-n` to switch between searching for PID and name respectively.
- `Ctrl-s` to toggle between a simple search and a regex search.
- `Ctrl-a` and `Ctrl-e` to jump to the start and end of the search bar respectively.
- `Esc` or `Ctrl-f` to close.
Note that `q` is disabled while in the search widget.

View File

@ -30,7 +30,7 @@ const WINDOWS_NETWORK_HEADERS: [&str; 2] = ["RX", "TX"];
const FORCE_MIN_THRESHOLD: usize = 5;
lazy_static! {
static ref HELP_TEXT: [Text<'static>; 17] = [
static ref HELP_TEXT: [Text<'static>; 20] = [
Text::raw("\nGeneral Keybindings\n"),
Text::raw("q, Ctrl-c to quit. Note if you are currently in the search widget, `q` will not work.\n"),
Text::raw("Ctrl-r to reset all data.\n"),
@ -48,7 +48,10 @@ lazy_static! {
Text::raw("p to sort by PID.\n"),
Text::raw("n to sort by process name.\n"),
Text::raw("Tab to group together processes with the same name.\n"),
Text::raw("Ctrl-f to toggle searching for a process. / to just open it. Use Ctrl-p and Ctrl-n to toggle between searching for PID and name.\n"),
Text::raw("Ctrl-f to toggle searching for a process. / to just open it.\n"),
Text::raw("Use Ctrl-p and Ctrl-n to toggle between searching for PID and name.\n"),
Text::raw("Use Ctrl-a and Ctrl-e to set the cursor to the start and end of the bar respectively.\n"),
Text::raw("Use Ctrl-s to toggle between simple and regex search.\n"),
Text::raw("\nFor startup flags, type in \"btm -h\".")
];
static ref COLOUR_LIST: Vec<Color> = gen_n_colours(constants::NUM_COLOURS);
@ -158,9 +161,9 @@ pub fn draw_data<B: backend::Backend>(
.margin(1)
.constraints(
[
Constraint::Percentage(27),
Constraint::Percentage(50),
Constraint::Percentage(23),
Constraint::Percentage(22),
Constraint::Percentage(60),
Constraint::Percentage(18),
]
.as_ref(),
)
@ -171,9 +174,9 @@ pub fn draw_data<B: backend::Backend>(
.margin(0)
.constraints(
[
Constraint::Percentage(30),
Constraint::Percentage(40),
Constraint::Percentage(30),
Constraint::Percentage(20),
Constraint::Percentage(60),
Constraint::Percentage(20),
]
.as_ref(),
)