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

XDG Base Directory Specification #12

Open
stefanpenner opened this issue Feb 1, 2018 · 1 comment
Open

XDG Base Directory Specification #12

stefanpenner opened this issue Feb 1, 2018 · 1 comment

Comments

@stefanpenner
Copy link

stefanpenner commented Feb 1, 2018

WIP, will flesh this out later:

What?

We should consider abiding by the XDG Base Directory Specification

This makes where notion lives on disk configurable, specifically it would abide by the following ENV variables:

Why?

  • cluttering up $HOME becomes unwieldy
  • simplifies testing (we can sub-shell and simply set up the appropriate $XDG vars (no chroot, containers etc)
  • easier to reset config / clear caches
  • power users can configure to there hearts content, but no cost those who wish to rely on the fallbacks

How

Technically, likely via the XDG crate

Others Using XDG

Mostly just a list of whats in my $XDG_CONFIG_HOME, I suspect there are more.

Unresolved

Where do we put stuff in windows?

Maybe something like:

C:\Users\<username>\AppData\Local\notion-cli\notion\{dirs...}

Other Discussion

@soc
Copy link

soc commented Feb 2, 2018

@stefanpenner Regarding Windows (and macOS) you could have a look at https://crates.io/crates/directories. It's similar to the xdg crate but supports the right directories on Linux, Windows and macOS. (Disclaimer: I wrote it.)

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

No branches or pull requests

2 participants