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

Allow sorting by any column #183

Merged
merged 8 commits into from
Aug 16, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
Update documentation
  • Loading branch information
ClementTsang committed Aug 14, 2020
commit 9153021a68c9644dedb2bb4ffae3ce31e97b1be0
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ A cross-platform graphical process/system monitor with a customizable interface
- [CPU bindings](#cpu-bindings)
- [Process bindings](#process-bindings)
- [Process search bindings](#process-search-bindings)
- [Process sort bindings](#process-sort-bindings)
- [Battery bindings](#battery-bindings)
- [Process searching keywords](#process-searching-keywords)
- [Supported keywords](#supported-keywords)
Expand Down Expand Up @@ -222,6 +223,8 @@ Run using `btm`.
| `Tab` | Group/un-group processes with the same name |
| `Ctrl-f`, `/` | Open process search widget |
| `P` | Toggle between showing the full path or just the process name |
| `s, F6` | Open process column sort widget |
| `I` | Invert current sort |

#### Process search bindings

Expand All @@ -240,6 +243,16 @@ Run using `btm`.
| `Left` | Move cursor left |
| `Right` | Move cursor right |

### Process sort bindings

| | |
| -------------- | ------------------------------- |
| `Down`, `j` | Scroll down in list |
| `Up`, `k` | Scroll up in list |
| `Mouse scroll` | Scroll through sort widget |
| `Esc` | Close the sort widget |
| `Enter` | Sort by current selected column |

#### Battery bindings

| | |
Expand Down
10 changes: 6 additions & 4 deletions src/constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ pub const CPU_HELP_TEXT: [&str; 2] = [
"Mouse scroll Scrolling over an CPU core/average shows only that entry on the chart",
];

// TODO [Help]: Search in help?
// TODO [Help]: Move to using tables for easier formatting?
pub const PROCESS_HELP_TEXT: [&str; 11] = [
"3 - Process widget",
"dd Kill the selected process",
Expand All @@ -99,8 +101,8 @@ pub const PROCESS_HELP_TEXT: [&str; 11] = [
"Tab Group/un-group processes with the same name",
"Ctrl-f, / Open process search widget",
"P Toggle between showing the full path or just the process name",
"s, F6 Manage column to sort by",
"I Invert current sorting",
"s, F6 Open process column sort widget",
"I Invert current sort",
];

pub const SEARCH_HELP_TEXT: [&str; 43] = [
Expand Down Expand Up @@ -151,8 +153,8 @@ pub const SEARCH_HELP_TEXT: [&str; 43] = [

pub const SORT_HELP_TEXT: [&str; 6] = [
"5 - Sort widget",
"Up Scroll up in list",
"Down Scroll down in list",
"Down, 'j' Scroll down in list",
"Up, 'k' Scroll up in list",
"Mouse scroll Scroll through sort widget",
"Esc Close the sort widget",
"Enter Sort by current selected column",
Expand Down