ux: change default config path to ~/.config/discordo.toml

This commit is contained in:
ayntgl 2021-10-12 17:27:02 +04:00
parent 813188198d
commit d86465a938
2 changed files with 2 additions and 11 deletions

View file

@ -36,15 +36,11 @@ sudo mv ./discordo /usr/local/bin
## Usage
1. Run the `discordo` executable with no arguments. A new default configuration will be created at `~/.config/discordo/config.toml` on first startup.
1. Run the `discordo` executable with no arguments. A new and default configuration will be created at `~/.config/discordo.toml` on first startup.
2. Log in using the account email and password (first-time login) and click on the "Login" button to continue.
> By default, Discordo utilizes OS-specific keyring to store credentials such as client authentication token. However, if you prefer not to use a keyring (not recommended), you may set the `token` field in the configuration file and Discordo will prioritize the usage of the provided token to login instead of keyring.
### Configuration
Discordo aims to be highly configurable, it may be easily customized via a configuration file. It creates a default configuration file on the first start-up. The default and newly created configuration file is located at `$HOME/.config/discordo/config.toml`.
### Clipboard support
On Linux, clipboard support requires:

View file

@ -82,13 +82,8 @@ func loadConfig() *config {
panic(err)
}
configPath := u + "/.config/discordo/config.toml"
configPath := u + "/.config/discordo.toml"
if _, err = os.Stat(configPath); os.IsNotExist(err) {
err = os.MkdirAll(u+"/.config/discordo", 0700)
if err != nil {
panic(err)
}
f, err := os.Create(configPath)
if err != nil {
panic(err)