-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configuration files should be stored in $XDG_CONFIG_HOME
(by default at ~/.config
)
#558
Comments
This is something we've been wanting to do for a while. Let's use:
Some of the editor extensions already use |
This seems reasonable to me 👍 |
Status on this? Would like to declutter my home directory as well 😅 Also if I set the various And lastly does setting Thanks! |
On MacOS as well, I think it would be better to default to the XDG_CONFIG_HOME spec and keep the user's HOME tidy. I would imagine there is a go library somewhere that handles most of this already 🤔 |
Each plugin uses a different language so we'll have to implement it in multiple languages, unless we use wakatime-cli for setting the api key instead of writing the file directly from the plugins. The main thing is to make it backwards compatible so the plugins/wakatime-cli detects a config file in |
I think the db and log files should go in I also agree with @kfdm that the XDG locations should be used on MacOS as well. |
Oh, and I think the internal config should probably be in |
I’m not a GoLang programmer, but I just found out there are built-in functions in GoLang to abstract the OS-specific paths of the many directory usecases: config, cache, data, state, etc. Some documentation:
Maybe you should consider to stick to these conventions after all. |
Let's first move |
Is your feature request related to a problem? Please describe.
I strive to have a clean home directory, but there are many files related to WakaTime in
~
:.wakatime.bdb
.wakatime.cfg
.wakatime.db
.wakatime.log
.wakatime-internal.cfg
(since Seperate file for waketime.cfg/[settings] from [internal] #535)Describe the solution you'd like to see
A lot of softwares find their configuration in
$XDG_CONFIG_HOME
(by default at~/.config
), which helps to have a less cluttered~
.WakaTime could use the same convention to place the configuration files such as
.wakatime.cfg
in$XDG_CONFIG_HOME/wakatime
(which would be~/.config/wakatime
by default), and data files such as.wakatime.db
in$XDG_DATA_HOME/wakatime
or$XDG_CACHE_HOME/wakatime
.Describe alternatives you've considered
Another solution would be to group them in a new directory such as
~/.wakatime
.Additional context
This feature request describes the behavior in a Unix environment, but macOS and Windows have their own conventions, even if the XDG Base Directory Specification leaks on them a little. I let you choose what suits the most for those platforms.
The text was updated successfully, but these errors were encountered: