driusan / de

A Programmer's Text Editor
MIT License
428 stars 26 forks source link

move ~/.de to $XDG_CONFIG_HOME/de #35

Open josephholsten opened 8 years ago

josephholsten commented 8 years ago

most of the time, this just ends up being ~/.config/de. I used to think this was silly, but more and more tools are using it. And we're laying claim to an entire config dir, so why not?

full spec lives at https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#basics

driusan commented 8 years ago

This seems like it would need to be platform specific. It wouldn't work on, say, Windows or Mac, but it might make sense to make a package to get a config location specific to the platform you're on (ie. on Plan9 it should probably be $home/lib/de). Is there any reliable way to tell if a unix user prefers XDG? ~/.progrc or ~/.prog seem more to be more of the classic place for UNIX programs to put their config to me and I'd never think to check ~/config/. I just checked, and I seem to have a bunch of XDG_ variables, but no $XDG_CONFIG_HOME set in my shell. I suppose we could check that and fallback on ~/.de if it's not set, but it might get confusing if there's 2 potential locations on the same OS.

The fact that systemd and pulseaudio seepulsedm to be the only things putting anything in $XDG_RUNTIME_DIR (one of the variable's that is set) makes me a little nervous..

josephholsten commented 8 years ago

I never actually set $XDG_CONFIG_HOME, because I like the default of ~/.config. My ~/.config contains:

camlistore
configstore
gce
gtk-2.0
habitica
hub
inkscape
keybase
khal
khard
mutt
nolo
nvim
offlineimap
vdirsyncer

I also totally agree about $home/lib/de on plan9.

Let's not act on this one yet.

mcepl commented 6 years ago

glib has native support for it (I don't know if it is used). You can see https://gitlab.com/jbrout/jbrout/issues/175 for more discussion on the same issue.