diff options
author | Clement Tsang <34804052+ClementTsang@users.noreply.github.com> | 2020-11-19 23:32:57 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-19 23:32:57 -0500 |
commit | 5fedf8a5db3fcc21656e653674bc5aed8d66fde3 (patch) | |
tree | 95e2ca2009dba9c284c2e42460dfb9b156af9e1e | |
parent | 92636f3bf91a1872b6b4249e78fce79e9fb51b6d (diff) |
other: update gruvbox and some documentation (#310)
-rw-r--r-- | CHANGELOG.md | 2 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | assets/demo.gif | bin | 912833 -> 9402567 bytes | |||
-rw-r--r-- | src/canvas/canvas_colours.rs | 13 | ||||
-rw-r--r-- | src/canvas/canvas_colours/colour_utils.rs | 17 | ||||
-rw-r--r-- | src/constants.rs | 112 |
6 files changed, 69 insertions, 77 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index e3da8198..58bf448e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Bug Fixes -## [0.5.0] - Unreleased +## [0.5.0] - 2020-11-19 ### Features @@ -6,7 +6,7 @@ A cross-platform graphical process/system monitor with a customizable interface and a multitude of features. Supports Linux, macOS, and Windows. Inspired by both [gtop](https://github.com/aksakalli/gtop) and [gotop](https://github.com/cjbassi/gotop). -![Quick demo recording showing off searching, expanding, and process killing.](assets/demo.gif) _Theme based on [gruvbox](https://github.com/morhetz/gruvbox) (see [sample config](./sample_configs/demo_config.toml)). Font is [IBM Plex Mono](https://www.ibm.com/plex/), terminal is [Kitty](https://sw.kovidgoyal.net/kitty/)_ Recorded on version **0.4.7**. +![Quick demo recording showing off searching, expanding, and process killing.](assets/demo.gif) _Theme based on [gruvbox](https://github.com/morhetz/gruvbox) (run with `--color gruvbox`). Font is [IBM Plex Mono](https://www.ibm.com/plex/), terminal is [Kitty](https://sw.kovidgoyal.net/kitty/)_ Recorded on version **0.5.0**. **Note**: If you are reading this on the master branch, then it may refer to in-development or un-released features/changes. 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. diff --git a/assets/demo.gif b/assets/demo.gif Binary files differindex d50a0355..0d3edafe 100644 --- a/assets/demo.gif +++ b/assets/demo.gif diff --git a/src/canvas/canvas_colours.rs b/src/canvas/canvas_colours.rs index fd8d4eb0..4979f597 100644 --- a/src/canvas/canvas_colours.rs +++ b/src/canvas/canvas_colours.rs @@ -48,7 +48,18 @@ impl Default for CanvasColours { total_tx_style: Style::default().fg(STANDARD_FOURTH_COLOUR), all_colour_style: Style::default().fg(ALL_COLOUR), avg_colour_style: Style::default().fg(AVG_COLOUR), - cpu_colour_styles: colour_utils::get_default_cpu_colours(), + cpu_colour_styles: vec![ + Style::default().fg(Color::LightMagenta), + Style::default().fg(Color::LightYellow), + Style::default().fg(Color::LightCyan), + Style::default().fg(Color::LightGreen), + Style::default().fg(Color::LightBlue), + Style::default().fg(Color::LightRed), + Style::default().fg(Color::Cyan), + Style::default().fg(Color::Green), + Style::default().fg(Color::Blue), + Style::default().fg(Color::Red), + ], border_style: Style::default().fg(text_colour), highlighted_border_style: Style::default().fg(STANDARD_HIGHLIGHT_COLOUR), text_style: Style::default().fg(text_colour), diff --git a/src/canvas/canvas_colours/colour_utils.rs b/src/canvas/canvas_colours/colour_utils.rs index 048f9317..3cad2686 100644 --- a/src/canvas/canvas_colours/colour_utils.rs +++ b/src/canvas/canvas_colours/colour_utils.rs @@ -40,23 +40,6 @@ lazy_static! { .collect(); } -/// We take basically no chances with this. If the user wants prettier colours, they can -/// set it on their own - unfortunately, supported colour detection is kinda a PITA. -pub fn get_default_cpu_colours() -> Vec<Style> { - vec![ - Style::default().fg(Color::LightMagenta), - Style::default().fg(Color::LightYellow), - Style::default().fg(Color::LightCyan), - Style::default().fg(Color::LightGreen), - Style::default().fg(Color::LightBlue), - Style::default().fg(Color::LightRed), - Style::default().fg(Color::Cyan), - Style::default().fg(Color::Green), - Style::default().fg(Color::Blue), - Style::default().fg(Color::Red), - ] -} - pub fn convert_hex_to_color(hex: &str) -> error::Result<Color> { fn hex_err(hex: &str) -> error::Result<u8> { Err( diff --git a/src/constants.rs b/src/constants.rs index c3dc7f60..a408e7eb 100644 --- a/src/constants.rs +++ b/src/constants.rs @@ -50,33 +50,36 @@ lazy_static! { ..ConfigColours::default() }; pub static ref GRUVBOX_COLOUR_PALETTE: ConfigColours = ConfigColours { - table_header_color: Some("#ebdbb2".to_string()), - all_cpu_color: Some("#cc241d".to_string()), - avg_cpu_color: Some("#98971a".to_string()), + table_header_color: Some("#83a598".to_string()), + all_cpu_color: Some("#8ec07c".to_string()), + avg_cpu_color: Some("#fb4934".to_string()), cpu_core_colors: Some(vec![ + "#cc241d".to_string(), + "#98971a".to_string(), "#d79921".to_string(), "#458588".to_string(), "#b16286".to_string(), "#689d6a".to_string(), - "#fb4934".to_string(), - "#b8bb26".to_string(), "#fe8019".to_string(), + "#b8bb26".to_string(), "#fabd2f".to_string(), "#83a598".to_string(), "#d3869b".to_string(), - "#8ec07c".to_string(), "#d65d0e".to_string(), - "#fbf1c7".to_string(), - "#ebdbb2".to_string(), - "#d5c4a1".to_string(), - "#bdae93".to_string(), - "#a89984".to_string(), + "#9d0006".to_string(), + "#79740e".to_string(), + "#b57614".to_string(), + "#076678".to_string(), + "#8f3f71".to_string(), + "#427b58".to_string(), + "#d65d03".to_string(), + "#af3a03".to_string(), ]), - ram_color: Some("#458588".to_string()), + ram_color: Some("#8ec07c".to_string()), swap_color: Some("#fabd2f".to_string()), - rx_color: Some("#458588".to_string()), + rx_color: Some("#8ec07c".to_string()), tx_color: Some("#fabd2f".to_string()), - rx_total_color: Some("#83a598".to_string()), + rx_total_color: Some("#689d6a".to_string()), tx_total_color: Some("#d79921".to_string()), border_color: Some("#ebdbb2".to_string()), highlighted_border_color: Some("#fe8019".to_string()), @@ -91,69 +94,49 @@ lazy_static! { low_battery_color: Some("#fb4934".to_string()) }; pub static ref GRUVBOX_LIGHT_COLOUR_PALETTE: ConfigColours = ConfigColours { - table_header_color: Some("#3c3836".to_string()), - all_cpu_color: Some("#cc241d".to_string()), - avg_cpu_color: Some("#98971a".to_string()), + table_header_color: Some("#076678".to_string()), + all_cpu_color: Some("#8ec07c".to_string()), + avg_cpu_color: Some("#fb4934".to_string()), cpu_core_colors: Some(vec![ + "#cc241d".to_string(), + "#98971a".to_string(), "#d79921".to_string(), "#458588".to_string(), "#b16286".to_string(), "#689d6a".to_string(), - "#fb4934".to_string(), - "#b8bb26".to_string(), "#fe8019".to_string(), + "#b8bb26".to_string(), "#fabd2f".to_string(), "#83a598".to_string(), "#d3869b".to_string(), - "#8ec07c".to_string(), "#d65d0e".to_string(), - "#928374".to_string(), - "#665c54".to_string(), - "#504945".to_string(), - "#3c3836".to_string(), - "#282828".to_string(), + "#9d0006".to_string(), + "#79740e".to_string(), + "#b57614".to_string(), + "#076678".to_string(), + "#8f3f71".to_string(), + "#427b58".to_string(), + "#d65d03".to_string(), + "#af3a03".to_string(), ]), - ram_color: Some("#458588".to_string()), + ram_color: Some("#427b58".to_string()), swap_color: Some("#cc241d".to_string()), - rx_color: Some("#458588".to_string()), + rx_color: Some("#427b58".to_string()), tx_color: Some("#cc241d".to_string()), - rx_total_color: Some("#83a598".to_string()), + rx_total_color: Some("#689d6a".to_string()), tx_total_color: Some("#9d0006".to_string()), border_color: Some("#3c3836".to_string()), - highlighted_border_color: Some("#fe8019".to_string()), - disabled_text_color: Some("#665c54".to_string()), + highlighted_border_color: Some("#af3a03".to_string()), + disabled_text_color: Some("#d5c4a1".to_string()), text_color: Some("#3c3836".to_string()), - selected_text_color: Some("#f9f5d7".to_string()), - selected_bg_color: Some("#665c54".to_string()), + selected_text_color: Some("#ebdbb2".to_string()), + selected_bg_color: Some("#3c3836".to_string()), widget_title_color: Some("#3c3836".to_string()), graph_color: Some("#3c3836".to_string()), high_battery_color: Some("#98971a".to_string()), - medium_battery_color: Some("#fabd2f".to_string()), - low_battery_color: Some("#fb4934".to_string()) + medium_battery_color: Some("#d79921".to_string()), + low_battery_color: Some("#cc241d".to_string()) }; - // pub static ref NORD_COLOUR_PALETTE: ConfigColours = ConfigColours { - // table_header_color: None, - // all_cpu_color: None, - // avg_cpu_color: None, - // cpu_core_colors: None, - // ram_color: None, - // swap_color: None, - // rx_color: None, - // tx_color: None, - // rx_total_color: None, - // tx_total_color: None, - // border_color: None, - // highlighted_border_color: None, - // text_color: None, - // selected_text_color: None, - // selected_bg_color: None, - // widget_title_color: None, - // graph_color: None, - // high_battery_color: None, - // medium_battery_color: None, - // low_battery_color: None, - // disabled_text_color: None, - // }; } // Help text @@ -484,6 +467,21 @@ pub const OLD_CONFIG_TEXT: &str = r##"# This is a default config file for bottom # [[row.child]] # type="proc" # default=true + + +# Filters - you can hide specific temperature and disks using filters. This is admittedly a bit +# hard to use as of now, and there is a planned interface for managing this in the future: +#[disk_filter] +#is_list_ignored = false +#list = ["/dev/sda\\d+", "/dev/nvme0n1p2"] +#regex = true +#case_sensitive = false + +#[temp_filter] +#is_list_ignored = false +#list = ["cpu", "wifi"] +#regex = false +#case_sensitive = false "##; pub const CONFIG_TOP_HEAD: &str = r##"# This is bottom's config file. |