2
0
Fork 0
mirror of https://github.com/ClementTsang/bottom synced 2025-02-25 19:57:12 +00:00

[skip travis] Update documentation a bit.

This commit is contained in:
ClementTsang 2020-02-15 17:41:26 -05:00
parent 05acba2f47
commit 59c0b3df62
3 changed files with 38 additions and 30 deletions

View file

@ -23,7 +23,6 @@ lto = true
[dependencies]
chrono = "0.4.10"
clap = "2.33.0"
crossbeam = "0.7.3"
fern = "0.5.9"
futures-timer = "3.0.1"
futures = "0.3.4"

View file

@ -102,34 +102,7 @@ Run using `btm`.
### Config Files
One use of a config file is to set flags to execute by default.
- This is set under the `[flags]` section.
- These options are generally the same as the long names as other flags (ex: `case_sensitive = true`).
- Note that if a flag and an option conflict, the flag has higher precedence (ex: if the `-c` and `temperature_type = kelvin` both exist, the Celsius temperature type is ultimately chosen).
- For temperature type, use `temperature_type = "kelvin|k|celsius|c|fahrenheit|f"`.
- For default widgets, use `default_widget = "cpu_default|memory_default|disk_default|temperature_default|network_default|process_default"`.
Another use is to set colours, under the `[colors]`. The following labels are customizable with hex colour code strings:
- Table header colours (`table_header_color="#ffffff"`).
- Every CPU core colour as an array (`cpu_core_colors=["#ffffff", "#000000", "#111111"]`).
- bottom will look at 216 (let's be realistic here) colours at most, and in order.
- If not enough colours are provided for the number of threads on the CPU, then the rest will be automatically generated.
- RAM and SWAP colours (`ram_color="#ffffff"`, `swap_color="#111111"`).
- RX and TX colours (`rx_color="#ffffff"`, `tx_color="#111111"`).
- Widget title colour (`widget_title_color="#ffffff"`).
- General widget border colour (`border_color="#ffffff"`).
- Current widget border colour (`highlighted_border_color="#ffffff"`).
- Text colour (`text_color="#ffffff"`).
- Label and graph colour (`graph_color="#ffffff"`).
- Cursor colour (`cursor_color="#ffffff"`).
- Current selected scroll entry colour (`scroll_entry_text_color="#282828"`, `scroll_entry_bg_color="#458588"`).
bottom will check specific locations by default for a config file.
- For Unix-based systems: `~/.config/btm/btm.toml`.
- For Windows: TBD.
The ability to use config files is supported by bottom to set boot flags by default, and set colour options. See [this document](./docs/config.md) for more details.
See this [config](./sample_config.toml) for an example.
@ -143,7 +116,7 @@ See this [config](./sample_config.toml) for an example.
- `f` to freeze the screen from updating with new data. Press `f` again to unfreeze. Note that monitoring will still continue in the background.
- `Ctrl/Shift-Arrow` or `H/J/K/L` to navigate between widgets. **Note that on macOS, `Ctrl`-arrow keys conflicts with an existing macOS binding, use `Shift`-arrow key instead.**
- `Ctrl/Shift`-arrow or `H/J/K/L` to navigate between widgets. **Note that on macOS, `Ctrl`-arrow keys seem to conflict with an existing macOS binding, use `Shift`-arrow key or `H/J/K/L` instead.**
- `Esc` to close a dialog window or exit maximized mode.

36
docs/config.md Normal file
View file

@ -0,0 +1,36 @@
# Config Files
## Boot Options
One use of a config file is to set boot flags to execute without having to state them when launching the program.
- This is set under the `[flags]` section.
- These options are generally the same as the long names as other flags (ex: `case_sensitive = true`).
- Note that if a flag and an option conflict, the flag has higher precedence (ex: if the `-c` and `temperature_type = kelvin` both exist, the Celsius temperature type is ultimately chosen).
- For temperature type, use `temperature_type = "kelvin|k|celsius|c|fahrenheit|f"`.
- For default widgets, use `default_widget = "cpu_default|memory_default|disk_default|temperature_default|network_default|process_default"`.
## Colours
Another use is to set colours, under the `[colors]`. The following labels are customizable with hex colour code strings:
- Table header colours (`table_header_color="#ffffff"`).
- Every CPU core colour as an array (`cpu_core_colors=["#ffffff", "#000000", "#111111"]`).
- bottom will look at 216 (let's be realistic here) colours at most, and in order.
- If not enough colours are provided for the number of threads on the CPU, then the rest will be automatically generated.
- RAM and SWAP colours (`ram_color="#ffffff"`, `swap_color="#111111"`).
- RX and TX colours (`rx_color="#ffffff"`, `tx_color="#111111"`).
- Widget title colour (`widget_title_color="#ffffff"`).
- General widget border colour (`border_color="#ffffff"`).
- Current widget border colour (`highlighted_border_color="#ffffff"`).
- Text colour (`text_color="#ffffff"`).
- Label and graph colour (`graph_color="#ffffff"`).
- Cursor colour (`cursor_color="#ffffff"`).
- Current selected scroll entry colour (`scroll_entry_text_color="#282828"`, `scroll_entry_bg_color="#458588"`).
## Default Locations
bottom will check specific locations by default for a config file.
- For Unix-based systems: `~/.config/btm/btm.toml`.
- For Windows: TBD.