Clement Tsang a095e67179
change: default config location on macOS considers XDG config var (#1570)
Actually support $XDG_CONFIG_HOME on macOS. Apparently in our docs we also say we do, but we, uh, don't, because dirs doesn't.

Note this is backwards-compatible, in that if a config file exists in the old default locations, we will check those first.
2024-08-22 01:00:55 +00:00

22 lines
1.3 KiB
Markdown

# Config File
For persistent configuration, and for certain configuration options, bottom supports config files.
## Default Config File
If no config file argument is given, it will automatically look for a config file at these locations:
| OS | Default Config Location |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| macOS | `$HOME/Library/Application Support/bottom/bottom.toml`<br/> `$HOME/.config/bottom/bottom.toml` <br/> `$XDG_CONFIG_HOME/bottom/bottom.toml` |
| Linux | `$HOME/.config/bottom/bottom.toml` <br/> `$XDG_CONFIG_HOME/bottom/bottom.toml` |
| Windows | `C:\Users\<USER>\AppData\Roaming\bottom\bottom.toml` |
If the config file doesn't exist at the path, bottom will automatically try to create a new config file at the location
with default values.
## JSON Schema
The configuration file also has [JSON Schema](https://json-schema.org/) support to make it easier to manage, if your
IDE/editor supports it.