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

feature: default colour schemes #296

Merged
merged 6 commits into from
Nov 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
"n'th",
"nixos",
"noheader",
"nord",
"ntdef",
"nuget",
"nvme",
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- [#269](https://github.com/ClementTsang/bottom/pull/269): Add simple indicator for when data updating is frozen.

- [#296](https://github.com/ClementTsang/bottom/pull/296): Built-in colour themes.

### Changes

- [#213](https://github.com/ClementTsang/bottom/pull/213), [#214](https://github.com/ClementTsang/bottom/pull/214): Updated help descriptions, added auto-complete generation.

- [#296](https://github.com/ClementTsang/bottom/pull/296): Changed how we do battery theming. We now only set high, medium, and low colours and we deal with the ratios.

### Bug Fixes

- [#211](https://github.com/ClementTsang/bottom/pull/211): Fixes a bug where you could move down in the process widget even if the process widget search was closed.
Expand Down Expand Up @@ -52,6 +56,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- [#291](https://github.com/ClementTsang/bottom/pull/291): Fixed spacing problems in basic CPU mode.

- [#296](https://github.com/ClementTsang/bottom/pull/296): Fixed an incorrect offset affecting the graph CPU colour mismatching the legend.

- [#296](https://github.com/ClementTsang/bottom/pull/296): Removes an accidental extra comma in one of the headers in the disk widget.

## [0.4.7] - 2020-08-26

### Bug Fixes
Expand Down
78 changes: 10 additions & 68 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ serde = {version = "1.0", features = ["derive"] }
sysinfo = "0.15.3"
thiserror = "1.0.21"
toml = "0.5.7"
tui = {version = "0.12.0", features = ["crossterm"], default-features = false }
tui = {version = "0.13.0", features = ["crossterm"], default-features = false }
typed-builder = "0.7.0"
unicode-segmentation = "1.6.0"
unicode-width = "0.1"
Expand Down
51 changes: 28 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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))._ 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) (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**.

**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.

Expand Down Expand Up @@ -205,7 +205,9 @@ Run using `btm`.
--battery Shows the battery widget.
-S, --case_sensitive Enables case sensitivity by default.
-c, --celsius Sets the temperature type to Celsius.
--color <COLOR SCHEME> Use a color scheme, use --help for supported values.
-C, --config <CONFIG PATH> Sets the location of the config file.
-u, --current_usage Sets process CPU% to be based on current CPU%.
--debug Enables debug logging.
-t, --default_time_value <MS> Default time value for graphs in ms.
--default_widget_count <INT> Sets the n'th selected widget type as the default.
Expand All @@ -214,19 +216,19 @@ Run using `btm`.
-m, --dot_marker Uses a dot marker for graphs.
-f, --fahrenheit Sets the temperature type to Fahrenheit.
-g, --group Groups processes with the same name by default.
-h, --help Prints help information. Use --help for more info.
-a, --hide_avg_cpu Hides the average CPU usage.
--hide_table_gap Hides the spacing between table headers and entries.
--hide_time Completely hides the time scaling.
-k, --kelvin Sets the temperature type to Kelvin.
-l, --left_legend Puts the CPU chart legend to the left side.
--no_write Disables writing to the config file.
-r, --rate <MS> Sets a refresh rate in ms.
-R, --regex Enables regex by default.
-d, --time_delta <MS> The amount in ms changed upon zooming.
-u, --current_usage Sets process CPU% to be based on current CPU%.
--use_old_network_legend DEPRECATED - uses the older network legend.
-W, --whole_word Enables whole-word matching by default.
-h, --help Prints help information. Use --help for more info.
-V, --version Prints version information.
-W, --whole_word Enables whole-word matching by default.
```

### Keybindings
Expand Down Expand Up @@ -528,32 +530,35 @@ These are the following supported flag config values, which correspond to the fl
| `default_widget_type` | String (one of ["cpu", "proc", "net", "temp", "mem", "disk"], same as layout options) |
| `default_widget_count` | Unsigned Int (represents which `default_widget_type`) |
| `disable_click` | Boolean |
| `color` | String (one of ["default", "default-light", "gruvbox", "gruvbox-light"]) |

#### Theming

The config file can be used to set custom colours for parts of the application under the `[colors]` object. The following labels are customizable with strings that are hex colours, RGB colours, or specific named colours.

Supported named colours are one of the following strings: `Reset, Black, Red, Green, Yellow, Blue, Magenta, Cyan, Gray, DarkGray, LightRed, LightGreen, LightYellow, LightBlue, LightMagenta, LightCyan, White`.

| Labels | Details | Example |
| ------------------------------- | ----------------------------------------------------- | ------------------------------------------------------- |
| Table header colours | Colour of table headers | `table_header_color="255, 255, 255"` |
| CPU colour per core | Colour of each core. Read in order. | `cpu_core_colors=["#ffffff", "white", "255, 255, 255"]` |
| Average CPU colour | The average CPU color | `avg_cpu_color="White"` |
| All CPUs colour | The colour for the "All" CPU label | `all_cpu_color="White"` |
| RAM | The colour RAM will use | `ram_color="#ffffff"` |
| SWAP | The colour SWAP will use | `swap_color="#ffffff"` |
| RX | The colour rx will use | `rx_color="#ffffff"` |
| TX | The colour tx will use | `tx_color="#ffffff"` |
| Widget title colour | The colour of the label each widget has | `widget_title_color="#ffffff"` |
| Border colour | The colour of the border of unselected widgets | `border_color="#ffffff"` |
| Selected border colour | The colour of the border of selected widgets | `highlighted_border_color="#ffffff"` |
| Text colour | The colour of most text | `text_color="#ffffff"` |
| Graph colour | The colour of the lines and text of the graph | `graph_color="#ffffff"` |
| Cursor colour | The cursor's colour | `cursor_color="#ffffff"` |
| Selected text colour | The colour of text that is selected | `scroll_entry_text_color="#ffffff"` |
| Selected text background colour | The background colour of text that is selected | `scroll_entry_bg_color="#ffffff"` |
| Battery bar colours | Colour used is based on percentage and no. of colours | `battery_colors=["green", "yellow", "red"]` |
| Labels | Details | Example |
| ------------------------------- | ------------------------------------------------------- | ------------------------------------------------------- |
| Table header colours | Colour of table headers | `table_header_color="255, 255, 255"` |
| CPU colour per core | Colour of each core. Read in order. | `cpu_core_colors=["#ffffff", "white", "255, 255, 255"]` |
| Average CPU colour | The average CPU color | `avg_cpu_color="White"` |
| All CPUs colour | The colour for the "All" CPU label | `all_cpu_color="White"` |
| RAM | The colour RAM will use | `ram_color="#ffffff"` |
| SWAP | The colour SWAP will use | `swap_color="#ffffff"` |
| RX | The colour rx will use | `rx_color="#ffffff"` |
| TX | The colour tx will use | `tx_color="#ffffff"` |
| Widget title colour | The colour of the label each widget has | `widget_title_color="#ffffff"` |
| Border colour | The colour of the border of unselected widgets | `border_color="#ffffff"` |
| Selected border colour | The colour of the border of selected widgets | `highlighted_border_color="#ffffff"` |
| Text colour | The colour of most text | `text_color="#ffffff"` |
| Graph colour | The colour of the lines and text of the graph | `graph_color="#ffffff"` |
| Cursor colour | The cursor's colour | `cursor_color="#ffffff"` |
| Selected text colour | The colour of text that is selected | `scroll_entry_text_color="#ffffff"` |
| Selected text background colour | The background colour of text that is selected | `scroll_entry_bg_color="#ffffff"` |
| High battery level colour | The colour used for a high battery level (100% to 50%) | `high_battery_color="green"` |
| Medium battery level colour | The colour used for a medium battery level (50% to 10%) | `medium_battery_color="yellow"` |
| Low battery level colour | The colour used for a low battery level (10% to 0%) | `low_battery_color="red"` |

#### Layout

Expand Down
1 change: 1 addition & 0 deletions src/bin/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ fn main() -> Result<()> {
app.app_config_fields.table_gap,
app.app_config_fields.use_basic_mode,
&config,
get_color_scheme(&matches, &config)?,
)?;

// Create termination mutex and cvar
Expand Down
Loading