directory icon indicating copy to clipboard operation
directory copied to clipboard

XDG basedir spec 0.8

Open phadej opened this issue 3 years ago • 3 comments

https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

It adds: There is a single base directory relative to which user-specific state data should be written. This directory is defined by the environment variable $XDG_STATE_HOME.

It would be great that plural $XDG_CONFIG_DIRS and $XDG_DATA_DIRS were supported as well.

I really don't like how https://github.com/haskell/directory/issues/93 for XDG_RUNTIME_DIR was resolved I'll comment there more.

phadej avatar May 09 '21 08:05 phadej

Current status:

  • [x] XDG_STATE_HOME (@athas, #680)
  • [ ] XDG_CONFIG_DIRS and XDG_DATA_DIRS
  • [ ] ~/.local/bin (optional, https://github.com/haskell/directory/issues/119#issuecomment-882358023)

Rufflewind avatar Jul 03 '21 22:07 Rufflewind

Spec v0.8 also introduced ~/.local/bin. There just isn't an environment variable override for it.

It seems that they are slowly adopting Systemd's file-hierarchy(7), which already did define ~/.local/bin. I'm guessing that they will adopt ~/.local/lib too in the future.

I'd be happy to help with ~/.local/bin, maybe as XdgBin?

Regarding XDG_RUNTIME_DIR, the usual default on UNIX-like systems is temp directory as it provides similar guarantees via sticky bit. See https://serverfault.com/questions/388840/good-default-for-xdg-runtime-dir.

trskop avatar Jul 19 '21 08:07 trskop

XdgBin sounds fine for ~/.local/bin if there is a need for it.

Rufflewind avatar Aug 02 '21 00:08 Rufflewind