Skip to content

Commit

Permalink
Add modularity to widget placement and inclusion (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
ClementTsang authored Apr 2, 2020
1 parent c1a19f9 commit 0b1d84f
Show file tree
Hide file tree
Showing 27 changed files with 4,817 additions and 2,399 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ os:
jobs:
allow_failures:
- rust: nightly
- env: TARGET=x86_64-pc-windows-gnu # Seems to cause problems. TODO: Add test for it, but keep allow fail.
- env: TARGET=x86_64-pc-windows-gnu # Seems to cause problems.
fast_finish: true
branches:
only:
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fern = "0.6.0"
futures = "0.3.4"
heim = "0.0.10"
log = "0.4.8"
regex = "1.3.4"
regex = "1.3"
sysinfo = "0.11"
toml = "0.5.6"
tui = {version = "0.8", features = ["crossterm"], default-features = false }
Expand Down
1 change: 1 addition & 0 deletions clippy.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cognitive-complexity-threshold = 35
40 changes: 39 additions & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ One use of a config file is to set boot flags to execute without having to state
- 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

Expand Down Expand Up @@ -36,6 +35,45 @@ Supported named colours are one of the following: `Reset, Black, Red, Green, Yel

Note some colours may not be compatible with the terminal you are using. For example, macOS's default Terminal does not play nice with many colours.

## Layout

As of 0.3.0, bottom supports custom layouts. Layouts are in the TOML specification, and are arranged by row -> column -> row. For example, the default layout:

```toml
[[row]]
ratio=30
[[row.child]]
type="cpu"
[[row]]
ratio=40
[[row.child]]
ratio=4
type="mem"
[[row.child]]
ratio=3
[[row.child.child]]
type="temp"
[[row.child.child]]
type="disk"
[[row]]
ratio=30
[[row.child]]
type="net"
[[row.child]]
type="proc"
default=true
```

Valid types are:

- `cpu`
- `mem`
- `proc`
- `net`
- `temp`
- `disk`
- `empty`

## Default config locations

bottom will check specific locations by default for a config file. If no file is found, it will be created.
Expand Down
Loading

0 comments on commit 0b1d84f

Please sign in to comment.