Skip to content
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

Seperate file for waketime.cfg/[settings] from [internal] #535

Closed
ryanerwin opened this issue Sep 6, 2021 · 4 comments · Fixed by #556
Closed

Seperate file for waketime.cfg/[settings] from [internal] #535

ryanerwin opened this issue Sep 6, 2021 · 4 comments · Fixed by #556

Comments

@ryanerwin
Copy link

I like to use dotbot to help keep a large fraction of my dotfiles consistent between machines.

Ideally I would like to symlink Dotfiles/waketime.cfg to -> ~/.wakatime.cfg

The only problem is the [internal] section of the .cfg file is continually updated... So if I symlinked it directly, I would forever be committing new timestamps into version control.

[internal]
cli_version = v1.22.2
cli_version_last_modified = Mon, 06 Sep 2021 00:31:16 GMT¬
backoff_at                =
backoff_retries           = 0

Ideally it would be nice if the [internal] section was in it's own separate file.

Also, it would be ideal if you did something like:

~/.config/wakatime/wakatime.cfg and put the wakatime.bdb, .data .db and .log in there as well, so that our home folder can stay a little bit more orderly.

Of course it's possible to template the config file, which is tiny anyway, or just copy it over...

Just would be nice if it worked a little bit more like all of the other programs that I use work.

@alanhamlett
Copy link
Member

We'll add a config to the main ~/.wakatime.cfg called internal_config_location. When that key is present, it will use the location provided for internal configs instead of modifying ~/.wakatime.cfg.

@alanhamlett
Copy link
Member

Would #464 will fix this, so you can include a cfg file containing your api key and other synced settings?

@nagromc
Copy link

nagromc commented Sep 17, 2021

I use a dotfiles manager (chezmoi) as well, and this constant external update is pretty annoying.

I think the current ~/.wakatime.cfg is mixing up two things:

  • the user configuration. For instance:
    [settings]
    api_key = foobar
    
  • the internal data needed by WakaTime (the [internal] section)

I think this should be split in two separate files without any additional configuration.

If you prefer not implement this out-of-the-box behavior, the solution suggested with the new internal_config_location option is the best because the solution suggested in #464 will force us to initialize the ~/.wakatime.cfg manually before using WakaTime, which will defeat the whole purpose of having a dotfiles manager.

@alanhamlett
Copy link
Member

We're now defaulting to ~/.wakatime-internal.cfg for all internal configs, without needing any internal_config_location setting. You'll have to restart your editor to get the updated wakatime-cli with this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants