diff options
author | ClementTsang <clementjhtsang@gmail.com> | 2020-01-04 19:41:32 -0500 |
---|---|---|
committer | ClementTsang <clementjhtsang@gmail.com> | 2020-01-04 19:41:32 -0500 |
commit | e71e22f726422634c986920021faccb94546b1fc (patch) | |
tree | d64ebcc3eb5c50961eabbe786556cfc0de7dfb89 | |
parent | 4418f956c705848a224db05f7e389d1d2268c3f8 (diff) |
[skip travis] Add Home/End keys to navigate tables
-rw-r--r-- | README.md | 8 | ||||
-rw-r--r-- | src/main.rs | 6 |
2 files changed, 8 insertions, 6 deletions
@@ -10,11 +10,11 @@ A graphical top clone, written in Rust. Inspired by both [gtop](https://github.c ### Linux -You can install by cloning and using `cargo build --release`, or use `cargo install bottom`. +You can install by cloning and using `cargo build --release`, or use `cargo install bottom`. Other installation methods based on distros are as follows: #### Arch Linux -You can get it from the AUR. +You can get it from the AUR by installing `bottom` from the AUR. ### Windows @@ -81,9 +81,9 @@ The compatibility of each widget and operating systems are, as of version 0.1.0, - `Up` and `Down` scrolls through the list if the panel is a table (Temperature, Disks, Processes). -- `gg` to jump to the first entry of the current table. +- `gg` or `Home` to jump to the first entry of the current table. -- `G` (`Shift+g`) to jump to the last entry of the current table. +- `G` (`Shift+g`) or `End` to jump to the last entry of the current table. #### Processes diff --git a/src/main.rs b/src/main.rs index b16250c8..375541cc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -66,7 +66,7 @@ fn main() -> error::Result<()> { (@arg LEFT_LEGEND: -l --left_legend "Puts external chart legends on the left side rather than the default right side.") (@arg USE_CURR_USAGE: -u --current_usage "Within Linux, sets a process' CPU usage to be based on the total current CPU usage, rather than assuming 100% usage.") //(@arg CONFIG_LOCATION: -co --config +takes_value "Sets the location of the config file. Expects a config file in the JSON format.") - //(@arg BASIC_MODE: -b --basic "Sets bottom to basic mode, not showing graphs and only showing basic tables.") + (@arg BASIC_MODE: -b --basic "Sets bottom to basic mode, not showing graphs and only showing basic tables.") ) .get_matches(); @@ -202,7 +202,8 @@ fn main() -> error::Result<()> { // If only a code, and no modifiers, don't bother... match event.code { KeyCode::Char('q') => break, - KeyCode::Char('G') => app.skip_to_last(), + KeyCode::Char('G') | KeyCode::End => app.skip_to_last(), + KeyCode::Home => app.skip_to_first(), KeyCode::Char('h') => app.on_left(), KeyCode::Char('l') => app.on_right(), KeyCode::Char('k') => app.on_up(), @@ -212,6 +213,7 @@ fn main() -> error::Result<()> { KeyCode::Char(uncaught_char) => app.on_char_key(uncaught_char), KeyCode::Esc => app.reset(), KeyCode::Enter => app.on_enter(), + KeyCode::Tab => {} _ => {} } } else { |