mirror of
https://github.com/ClementTsang/bottom
synced 2024-11-10 14:44:18 +00:00
feature: Add alt-h and alt-l to move left/right within widget
This commit is contained in:
parent
ecd5a003cf
commit
bb45763b39
4 changed files with 17 additions and 12 deletions
|
@ -15,6 +15,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
- [#114](https://github.com/ClementTsang/bottom/pull/114): Process state per process.
|
||||
|
||||
- [#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).
|
||||
|
||||
### Changes
|
||||
|
||||
- Changed default colours for highlighted borders and table headers to light blue - this is mostly to deal with Powershell colour conflicts.
|
||||
|
@ -42,8 +46,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
- [#70](https://github.com/ClementTsang/bottom/issues/70): Redesigned help menu to allow for scrolling.
|
||||
|
||||
- [#134](https://github.com/ClementTsang/bottom/pull/134): Added `hjkl` movement to delete dialog.
|
||||
|
||||
- [#59](https://github.com/ClementTsang/bottom/issues/59): Moved maximization key to `e`, renamed feature to _expanding_ the widget. Done to allow for the `<Enter>` key to be used later for a more intuitive usage.
|
||||
|
||||
- [#59](https://github.com/ClementTsang/bottom/issues/59): Redesigned search menu and query.
|
||||
|
|
14
README.md
14
README.md
|
@ -226,10 +226,10 @@ Run using `btm`.
|
|||
|
||||
#### Battery bindings
|
||||
|
||||
| | |
|
||||
| ------- | -------------------------- |
|
||||
| `Left` | Go to the next battery |
|
||||
| `Right` | Go to the previous battery |
|
||||
| | |
|
||||
| -------------- | -------------------------- |
|
||||
| `Left, Alt-h` | Go to the next battery |
|
||||
| `Right, Alt-l` | Go to the previous battery |
|
||||
|
||||
## Features
|
||||
|
||||
|
@ -255,9 +255,9 @@ In addition, bottom also currently has the following features:
|
|||
|
||||
### Process filtering
|
||||
|
||||
On any process widget, hit `/` to bring up a search bar. If the layout has
|
||||
multiple process widgets, note this search is independent of other widgets. Searching
|
||||
supports regex, matching case, and matching entire words. Use `Tab` to toggle between
|
||||
<!--FIXME: [QUERY] Update this documentation...-->
|
||||
|
||||
On any process widget, hit `/` to bring up a search bar. If the layout has multiple process widgets, note this search is independent of other widgets. Searching supports regex, matching case, and matching entire words. Use `Tab` to toggle between
|
||||
searching by PID and by process name.
|
||||
|
||||
### Zoom
|
||||
|
|
|
@ -52,7 +52,7 @@ pub const HELP_CONTENTS_TEXT: [&str; 6] = [
|
|||
pub const GENERAL_HELP_TEXT: [&str; 20] = [
|
||||
"1 - General bindings\n",
|
||||
"q, Ctrl-c Quit\n",
|
||||
"Esc Close dialog windows, search, widgets, or exit maximized mode\n",
|
||||
"Esc Close dialog windows, search, widgets, or exit expanded mode\n",
|
||||
"Ctrl-r Reset display and any collected data\n",
|
||||
"f Freeze/unfreeze updating with new data\n",
|
||||
"Ctrl-Arrow \n",
|
||||
|
@ -90,6 +90,7 @@ pub const PROCESS_HELP_TEXT: [&str; 8] = [
|
|||
"Ctrl-f, / Open process search widget",
|
||||
];
|
||||
|
||||
// FIXME: [QUERY] This likely needs to be updated.
|
||||
pub const SEARCH_HELP_TEXT: [&str; 13] = [
|
||||
"4 - Process search bindings\n",
|
||||
"Tab Toggle between searching for PID and name\n",
|
||||
|
@ -102,8 +103,8 @@ pub const SEARCH_HELP_TEXT: [&str; 13] = [
|
|||
"Alt-c/F1 Toggle matching case\n",
|
||||
"Alt-w/F2 Toggle matching the entire word\n",
|
||||
"Alt-r/F3 Toggle using regex\n",
|
||||
"Left Move cursor left\n",
|
||||
"Right Move cursor right",
|
||||
"Left, Alt-h Move cursor left\n",
|
||||
"Right, Alt-l Move cursor right",
|
||||
];
|
||||
|
||||
pub const BATTERY_HELP_TEXT: [&str; 3] = [
|
||||
|
|
|
@ -323,6 +323,8 @@ fn handle_key_event_or_break(
|
|||
KeyCode::Char('r') | KeyCode::Char('R') => {
|
||||
app.toggle_search_regex();
|
||||
}
|
||||
KeyCode::Char('h') => app.on_left_key(),
|
||||
KeyCode::Char('l') => app.on_right_key(),
|
||||
_ => {}
|
||||
}
|
||||
} else if let KeyModifiers::CONTROL = event.modifiers {
|
||||
|
|
Loading…
Reference in a new issue