gcalcli icon indicating copy to clipboard operation
gcalcli copied to clipboard

Allow configFolder to be set via environment variable

Open rafi opened this issue 9 years ago • 7 comments

I try to keep all my configuration in XDG standard inside the ~/.config directory. Could you allow setting --configFolder as an environment variable? e.g. GCALCLI_CONFIG_DIR

rafi avatar Oct 07 '16 10:10 rafi

Should be possible. I'll take a look

tresni avatar Oct 08 '16 16:10 tresni

That'll be great thanks

rafi avatar Oct 08 '16 18:10 rafi

Ideally we split up the config (the rc file) and cache data (oauth2 and actual cache) and stick them into $XDG_CONFIG_DIR and $XDG_CACHE_DIR respectfully. Those variables are exactly for that purpose so that means $GCALCLI_CONFIG_DIR is no longer needed.

peterhoeg avatar Jan 20 '17 01:01 peterhoeg

Would support XDG used by default for new installations.

The xdg Python package makes it easy to use the XDG standard.

michaelmhoffman avatar Mar 16 '20 15:03 michaelmhoffman

That sounds reasonable to me. I'd like to convert the rc file format itself to something standard (instead of just holding options in text, there's an issue for this).

jcrowgey avatar Mar 16 '20 23:03 jcrowgey

Is this being worked on, or should I create a patch for it?

I took a quick glance at the code, and it should be quite straightforward to fix it. I can take a further look at it on Wednesday, in 2 days, and submit a PR.

I'd also like to address the "issue" of --config complaining about being ambiguous, and the fact that using the --config-folder parameter expects one file name, while the default one requires no .gcalcli_ prefix.

mazunki avatar Sep 06 '21 20:09 mazunki

Is there any follow up on this? Would also like to have this functionality by default / via EV and to not clutter up the home dir.

znxuz avatar Nov 02 '21 10:11 znxuz