diff --git a/CHANGELOG.md b/CHANGELOG.md index fe400143..289993d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -44,6 +44,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [#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 `` key to be used later for a more intuitive usage. + - [#59](https://github.com/ClementTsang/bottom/issues/59): Redesigned search menu and query. ### Bug Fixes diff --git a/README.md b/README.md index d289eac0..1f3d8f2f 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ A cross-platform graphical process/system monitor with a customizable interface -![Quick demo recording showing off searching, maximizing, and process killing.](assets/summary_and_search.gif) _Theme based on [gruvbox](https://github.com/morhetz/gruvbox) (see [sample config](./sample_configs/demo_config.toml))._ Recorded on version 0.2.0. +![Quick demo recording showing off searching, expanding, and process killing.](assets/summary_and_search.gif) _Theme based on [gruvbox](https://github.com/morhetz/gruvbox) (see [sample config](./sample_configs/demo_config.toml))._ Recorded on version 0.2.0. **Note**: This documentation is relevant to version 0.4.0 and may refer to in-development or unreleased features, especially if you are reading this on the master branch. Please refer to [release branch](https://github.com/ClementTsang/bottom/tree/release/README.md) or [crates.io](https://crates.io/crates/bottom) for the most up-to-date _release_ documentation. @@ -35,7 +35,7 @@ A cross-platform graphical process/system monitor with a customizable interface - [Features](#features) - [Process filtering](#process-filtering) - [Zoom](#zoom) - - [Maximizing](#maximizing) + - [Expanding](#expanding) - [Basic mode](#basic-mode) - [Config files](#config-files) - [Config flags](#config-flags) @@ -170,7 +170,7 @@ Run using `btm`. | | | | -------------------------------------------------- | ---------------------------------------------------------------------------- | | `q`, `Ctrl-c` | Quit | -| `Esc` | Close dialog windows, search, widgets, or exit maximized mode | +| `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`-arrow key
`Shift`-arrow key
`H/J/K/L` | Move to a different widget (on macOS some keybindings may conflict) | @@ -181,7 +181,7 @@ Run using `btm`. | `?` | Open help menu | | `gg`, `Home` | Jump to the first entry | | `Shift-g`, `End` | Jump to the last entry | -| `Enter` | Maximize the currently selected widget | +| `e` | Expand the currently selected widget | | `+` | Zoom in on chart (decrease time range) | | `-` | Zoom out on chart (increase time range) | | `=` | Reset zoom | @@ -266,9 +266,9 @@ Using the `+`/`-` keys or the scroll wheel will move the current time intervals Widgets can hold different time intervals independently. These time intervals can be adjusted using the `-t`/`--default_time_value` and `-d`/`--time_delta` options, or their corresponding config options. -### Maximizing +### Expand -Only care about one specific widget? You can go to that widget and hit `Enter` to make that widget take +Only care about one specific widget? You can go to that widget and hit `e` to make that widget expand and take up the entire drawing area. ### Basic mode diff --git a/src/app.rs b/src/app.rs index 18581e43..de9e8145 100644 --- a/src/app.rs +++ b/src/app.rs @@ -533,16 +533,6 @@ impl App { } else { self.delete_dialog_state.is_showing_dd = false; } - } else if !self.is_in_dialog() && !self.app_config_fields.use_basic_mode { - // Pop-out mode. We ignore if in process search. - - match self.current_widget.widget_type { - BottomWidgetType::ProcSearch => {} - _ => { - self.is_expanded = true; - self.is_force_redraw = true; - } - } } } @@ -1178,6 +1168,7 @@ impl App { '+' => self.zoom_in(), '-' => self.zoom_out(), '=' => self.reset_zoom(), + 'e' => self.expand_widget(), _ => {} } @@ -1209,6 +1200,20 @@ impl App { self.to_delete_process_list.clone() } + fn expand_widget(&mut self) { + if !self.is_in_dialog() && !self.app_config_fields.use_basic_mode { + // Pop-out mode. We ignore if in process search. + + match self.current_widget.widget_type { + BottomWidgetType::ProcSearch => {} + _ => { + self.is_expanded = true; + self.is_force_redraw = true; + } + } + } + } + pub fn move_widget_selection_left(&mut self) { if !self.is_in_dialog() && !self.is_expanded { if let Some(current_widget) = self.widget_map.get(&self.current_widget.widget_id) { diff --git a/src/constants.rs b/src/constants.rs index d33e2db3..cd4cd173 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -65,7 +65,7 @@ pub const GENERAL_HELP_TEXT: [&str; 20] = [ "? Open help menu\n", "gg Jump to the first entry\n", "G Jump to the last entry\n", - "Enter Maximize the currently selected widget\n", + "e Expand the currently selected widget\n", "+ Zoom in on chart (decrease time range)\n", "- Zoom out on chart (increase time range)\n", "= Reset zoom\n",