Document config file format and options
This commit is contained in:
parent
067389efa2
commit
86c128b92d
2 changed files with 84 additions and 0 deletions
80
README.md
80
README.md
|
|
@ -66,3 +66,83 @@ in the full version you want to install:
|
||||||
```bash
|
```bash
|
||||||
$ cargo install --force --git https://github.com/Garmelon/cove --tag v0.1.0
|
$ cargo install --force --git https://github.com/Garmelon/cove --tag v0.1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Config file
|
||||||
|
|
||||||
|
Cove's config file uses the [TOML](https://toml.io/) format.
|
||||||
|
|
||||||
|
When launched, cove prints the location it is loading its config file from. To
|
||||||
|
configure cove, create a config file at that location. This location can be
|
||||||
|
changed via the `--config` command line option.
|
||||||
|
|
||||||
|
The following is a complete list of available options. If a command line option
|
||||||
|
with the same purpose exists, it takes precedence over the option specified in
|
||||||
|
the config file.
|
||||||
|
|
||||||
|
### `data_dir`
|
||||||
|
|
||||||
|
**Type:** String (representing path)
|
||||||
|
**Default:** Platform dependent
|
||||||
|
|
||||||
|
The directory that cove stores its data in when not running in ephemeral mode.
|
||||||
|
|
||||||
|
Relative paths are interpreted relative to the user's home directory.
|
||||||
|
|
||||||
|
See also the `--data-dir` command line option.
|
||||||
|
|
||||||
|
### `ephemeral`
|
||||||
|
|
||||||
|
**Type:** Boolean
|
||||||
|
**Default:** `false`
|
||||||
|
|
||||||
|
Whether to start in ephemeral mode.
|
||||||
|
|
||||||
|
In ephemeral mode, cove doesn't store any data. It completely ignores any
|
||||||
|
options related to the data dir.
|
||||||
|
|
||||||
|
See also the `--ephemeral` command line option.
|
||||||
|
|
||||||
|
### `offline`
|
||||||
|
|
||||||
|
**Type:** Boolean
|
||||||
|
**Default:** `false`
|
||||||
|
|
||||||
|
Whether to start in offline mode.
|
||||||
|
|
||||||
|
In offline mode, cove won't automatically join rooms marked via the `autojoin`
|
||||||
|
option on startup. You can still join those rooms manually by pressing `a` in
|
||||||
|
the rooms list.
|
||||||
|
|
||||||
|
See also the `--offline` command line option.
|
||||||
|
|
||||||
|
### `euph.rooms.<room>.autojoin`
|
||||||
|
|
||||||
|
**Type:** Boolean
|
||||||
|
**Default:** `false`
|
||||||
|
|
||||||
|
Whether to automatically join this room on startup.
|
||||||
|
|
||||||
|
### `euph.rooms.<room>.username`
|
||||||
|
|
||||||
|
**Type:** String
|
||||||
|
**Default:** Not st
|
||||||
|
|
||||||
|
If set, cove will set this username upon joining if there is no username
|
||||||
|
associated with the current session.
|
||||||
|
|
||||||
|
### `euph.rooms.<room>.force_username`
|
||||||
|
|
||||||
|
**Type:** Boolean
|
||||||
|
**Default:** `false`
|
||||||
|
|
||||||
|
If `euph.rooms.<room>.username` is set, this will force cove to set the username
|
||||||
|
even if there is already a different username associated with the current
|
||||||
|
session.
|
||||||
|
|
||||||
|
### `euph.rooms.<room>.password`
|
||||||
|
|
||||||
|
**Type:** String
|
||||||
|
**Default:** Not st
|
||||||
|
|
||||||
|
If set, cove will try once to use this password to authenticate, should the room
|
||||||
|
be password-protected.
|
||||||
|
|
|
||||||
|
|
@ -61,10 +61,14 @@ impl Default for Command {
|
||||||
#[clap(version)]
|
#[clap(version)]
|
||||||
struct Args {
|
struct Args {
|
||||||
/// Path to the config file.
|
/// Path to the config file.
|
||||||
|
///
|
||||||
|
/// Relative paths are interpreted relative to the current directory.
|
||||||
#[clap(long, short)]
|
#[clap(long, short)]
|
||||||
config: Option<PathBuf>,
|
config: Option<PathBuf>,
|
||||||
|
|
||||||
/// Path to a directory for cove to store its data in.
|
/// Path to a directory for cove to store its data in.
|
||||||
|
///
|
||||||
|
/// Relative paths are interpreted relative to the current directory.
|
||||||
#[clap(long, short)]
|
#[clap(long, short)]
|
||||||
data_dir: Option<PathBuf>,
|
data_dir: Option<PathBuf>,
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue