From d86465a938cfee29a312370516abef6a84bd9ee5 Mon Sep 17 00:00:00 2001 From: ayntgl Date: Tue, 12 Oct 2021 17:27:02 +0400 Subject: [PATCH] ux: change default config path to ~/.config/discordo.toml --- README.md | 6 +----- config.go | 7 +------ 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 775c535..1e68835 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/config.go b/config.go index c110fca..53f73d6 100644 --- a/config.go +++ b/config.go @@ -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)