Skip to content

Commit 98d4c44

Browse files
other: add json schema (ClementTsang#1382) (ClementTsang#1394)
* other: add json schema (ClementTsang#1382) * docs: add some screenshots * other: move around schema files * docs: move around some docs around config files --------- Co-authored-by: ClementTsang <[email protected]>
1 parent 59b7650 commit 98d4c44

File tree

5 files changed

+413
-5
lines changed

5 files changed

+413
-5
lines changed
Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1-
# Default Config
1+
# Config File
22

3-
A default config file is automatically generated at the following locations that bottom checks by default:
3+
For persistent configuration, and for certain configuration options, bottom supports config files.
4+
5+
## Default Config File
6+
7+
If no config file argument is given, it will automatically look for a config file at these locations:
48

59
| OS | Default Config Location |
610
| ------- | -------------------------------------------------------------------------------------------------------------------------------------- |
711
| macOS | `$HOME/Library/Application Support/bottom/bottom.toml`<br/> `~/.config/bottom/bottom.toml` <br/> `$XDG_CONFIG_HOME/bottom/bottom.toml` |
812
| Linux | `~/.config/bottom/bottom.toml` <br/> `$XDG_CONFIG_HOME/bottom/bottom.toml` |
913
| Windows | `C:\Users\<USER>\AppData\Roaming\bottom\bottom.toml` |
1014

11-
Furthermore, if a custom config path that does not exist is given (using `-C` or `--config`), bottom will attempt to create a default config file at that location.
15+
Like if a path is passed with `-C`/`--config`, if a file doesn't exist at the path, bottom will automatically create a
16+
new, default config file at that location.
17+
18+
## JSON Schema
19+
20+
The configuration file also has [JSON Schema](https://json-schema.org/) support to make it easier to manage, if your
21+
IDE/editor supports it.

docs/mkdocs.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ theme:
2020
- content.action.edit
2121
- navigation.expand
2222
- navigation.footer
23+
- navigation.indexes
2324
- navigation.instant
2425
- navigation.instant.progress
2526
- navigation.sections
@@ -28,6 +29,7 @@ theme:
2829
- search.highlight
2930
- search.suggest
3031
- toc.integrate
32+
- toc.follow
3133
icon:
3234
edit: material/pencil
3335
palette:
@@ -39,12 +41,16 @@ theme:
3941
name: Switch to light mode
4042
# Light mode
4143
- media: "(prefers-color-scheme: light)"
44+
primary: indigo
45+
accent: indigo
4246
toggle:
4347
icon: material/weather-sunny
4448
name: Switch to dark mode
4549
# Dark mode
4650
- media: "(prefers-color-scheme: dark)"
4751
scheme: slate
52+
primary: black
53+
accent: indigo
4854
toggle:
4955
icon: material/weather-night
5056
name: Switch to system preference
@@ -158,7 +164,7 @@ nav:
158164
- "Configuration":
159165
- "Command-line Options": configuration/command-line-options.md
160166
- "Config File":
161-
- "Default Config": configuration/config-file/default-config.md
167+
- configuration/config-file/index.md
162168
- "Flags": configuration/config-file/flags.md
163169
- "Theming": configuration/config-file/theming.md
164170
- "Layout": configuration/config-file/layout.md

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mkdocs == 1.5.3
2-
mkdocs-material == 9.5.3
2+
mkdocs-material == 9.5.6
33
mdx_truly_sane_lists == 1.3
44
mike == 2.0.0
55
mkdocs-git-revision-date-localized-plugin == 1.2.2

schema/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Config Schema
2+
3+
## Usage
4+
5+
## Development
6+
7+
### How to add a new version

0 commit comments

Comments
 (0)