rkd77 / elinks

Fork of elinks
Other
335 stars 35 forks source link

XDG base directory compliance #199

Open toastal opened 1 year ago

toastal commented 1 year ago

The perennial issue, XDG base directory compliance would split up $HOME/.elinks and move these files into the standard directories for most distros.

More info:

rkd77 commented 1 year ago

For now, files are written and read from ~/.config/elinks/ It is up to user to move/copy files there. Location of global configuration was not touched.

smemsh commented 1 year ago

Wow, so elinks no longer reads files in ~/.elinks/, seriously? It should at least try both, old if exists, and new if not. This has been the directory for like 20 years or something! XDG is some GUI spec anyways from "freedesktop" which invented a bunch of crap nobody needs. Just my opinion!

toastal commented 1 year ago

A unified method of organizing config files in a noncluttered way in the $HOME isn’t “crap” and it's also what most people have come to expect in the last 10 years.

smemsh commented 1 year ago

Users could have done ELINKS_CONFDIR=$XDG_CONFIG_DIR in their profile easily enough. Even if we wanted to say we're changing the default location to follow the "desktop spec," it cannot even be overridden with the now-removed $ELINKS_CONFDIR. Changing $XDG_CONFIG_DIR would change it for all other applications which use it. The only option is a symlink, and it will surprise upgrading users to need to create it, as well as any that already moved it somewhere else with $ELINKS_CONFDIR.

I suggest the following precedence order:

(1) use $ELINKS_CONFDIR if set (2) use ~/.elinks if it exists (3) use $XDG_CONFIG_DIR if set

this satisfies everyone, doesn't surprise any long-time users, and allows them to change at their own pace/will.

rkd77 commented 1 year ago

If ELINKS_CONFDIR is set, to use it makes sense. Do you know anybody who has set ELINKS_CONFDIR? But (2), no. Users can copy files to ~/.config/elinks . It takes a few seconds.

aelmahmoudy commented 1 year ago

I moved ~/.elinks to ~/.config/elinks, but after starting elinks, it didn't read the config/bookmarks/etc.. feom rather, and it rather created a new ~/.elinks dir

rkd77 commented 1 year ago

@aelmahmoudy it works for me. It is possible that you mix old elinks (0.16) with 0.17.GIT. Also possible that some scripts (from browser scripting), have hardcoded old location of bookmarks, etc.

aelmahmoudy commented 1 year ago

I am using elinks 0.16.0 tarball from the tags page.

I checked 'src/config/home.c', I don't find any code checking for xdg-config-home, yet in the master git branch, that code exists.

rkd77 commented 1 year ago

XDG will come in 0.17. I'm going to release 0.16.1 on Sunday.

smemsh commented 6 months ago

Don't see the value in forcing all users to migrate, even if only "a few seconds." Cost of also supporting the old location was essentially free.

Nonetheless, thanks for keeping $ELINKS_CONFDIR; I prefer that workaround rather than a symlink.