2
0
mirror of https://github.com/miguelmota/cointop synced 2024-11-05 00:00:14 +00:00

docs: Update config path documentation

This commit is contained in:
Miguel Mota 2021-04-25 13:32:36 -07:00
parent 0e778052a1
commit 11e2efc9af
No known key found for this signature in database
GPG Key ID: 67EC1161588A00F9
2 changed files with 34 additions and 9 deletions

View File

@ -11,9 +11,30 @@ The first time you run cointop, it'll create a config file in:
~/.config/cointop/config.toml
```
You can then configure the actions you want for each key:
On Unix systems, the default config path is `$XDG_CONFIG_HOME/cointop/config.toml`
(default `~/.config/cointop/config.toml`)
On macOS (darwin), the default config path is `$HOME/Library/Application Support/cointop/config.toml`
On Windows, the default config path is `%AppData%\cointop\config.toml`
_Note: The config directory is determined by [`os.UserConfigDir()`](https://pkg.go.dev/os#UserConfigDir)_
You may specify a different config file to use by using the `--config` flag:
```bash
cointop --config="/path/to/config.toml"
```
Alternatively, you can set the config file path via the environment variable `COINTOP_CONFIG`
```bash
export COINTOP_CONFIG="/path/to/config.toml"
cointop
```
## Key bindings
You can configure the actions you want for each key in `config.toml`:
```toml
currency = "USD"
@ -103,15 +124,9 @@ refresh_rate = 60
pro_api_key = ""
```
You may specify a different config file to use by using the `--config` flag:
```bash
cointop --config="/path/to/config.toml"
```
## List of actions
This are the action keywords you may use in the config file to change what the shortcut keys do.
This are the action keywords you may use in the config file to change what the shortcut keys do:
Action|Description
----|------|

View File

@ -45,6 +45,14 @@ draft: false
The default configuration file is located under `~/.config/cointop/config.toml`
However it may vary depending on your operating system since the config directory is determinedby by [`os.UserConfigDir()`](https://pkg.go.dev/os#UserConfigDir).
On Unix systems, the default config path is `$XDG_CONFIG_HOME/cointop/config.toml`
On macOS (darwin), the default config path is `$HOME/Library/Application Support/cointop/config.toml`
On Windows, the default config path is `%AppData%\cointop\config.toml`
Note: Previous versions of cointop used `~/.cointop/config` or `~/.cointop/config.toml` as the default config filepath. Cointop will use those config filepaths respectively if they exist.
## What format is the configuration file in?
@ -316,6 +324,8 @@ draft: false
Run cointop with the `--config` flag, eg `cointop --config="/path/to/config.toml"`, to use the specified file as the config.
Alternatively, you can set the config file path via the environment variable `COINTOP_CONFIG`, eg `export COINTOP_CONFIG="/path/to/config.toml"`
## I'm getting the error `open /dev/tty: no such device or address`.
Usually this error occurs when cointop is running as a daemon or slave which means that there is no terminal allocated, so `/dev/tty` doesn't exist for that process. Try running it with the following environment variables: