Add settings documentation

This commit is contained in:
Ivan Habunek 2023-06-28 13:57:29 +02:00
parent 4388175cb4
commit ee20b7ac0e
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95
2 changed files with 53 additions and 0 deletions

View File

@ -5,6 +5,7 @@
- [Installation](installation.md)
- [Usage](usage.md)
- [Advanced](advanced.md)
- [Settings](settings.md)
- [TUI](tui.md)
- [Contributing](contributing.md)
- [Documentation](documentation.md)

52
docs/settings.md Normal file
View File

@ -0,0 +1,52 @@
# Settings
Toot can be configured via a [TOML](https://toml.io/en/) settings file.
> Introduced in toot 0.37.0
> **Warning:** Settings are experimental and things may change without warning.
Toot will look for the settings file at:
* `~/.config/toot/settings.toml` (Linux & co.)
* `%APPDATA%\toot\settings.toml` (Windows)
Toot will respect the `XDG_CONFIG_HOME` environement variable if it's set and
look for the settings file in `$XDG_CONFIG_HOME/toot` instead of
`~/.config/toot`.
## Common options
The `[common]` section includes common options which are applied to all commands.
```toml
[common]
# Whether to use ANSI color in output
color = true
# Enable debug logging, shows HTTP requests
debug = true
# Redirect debug log to the given file
debug_file = "/tmp/toot.log"
# Log request and response bodies in the debug log
verbose = false
# Do not write to output
quiet = false
```
## Overriding command defaults
Defaults for command arguments can be override by specifying a `[command.<name>]` section.
For example, to override `toot post`.
```toml
[command.post]
editor = "vim"
sensitive = true
visibility = "unlisted"
scheduled_in = "30 minutes"
```