PySolFC icon indicating copy to clipboard operation
PySolFC copied to clipboard

Adhere to XDG Base Directory

Open fenuks opened this issue 3 years ago • 0 comments

PySolFC currently stored its data in ~/.PySolFC on Unix platforms. In order to declutter home directory, decouple configuration from other kinds of data, and allow users to configure where files are stored in easy manner. XDG Base Directories standard has been introduced. Software compliant with it should use various XDG_* which allow user to specify where files should be stored.

I think .PySolFc directory should be split in following fashion:

  • options.cfg goes to $XDG_CONFIG_HOME/PySolFC (if not defined XDG_CONFIG_HOME defaults to ~/.config
  • rest of files to $XDG_DATA_HOME/PySolFC (if not defined, XDG_DATA_HOME defaults to ~/.local/share/)

It is worth considering if plugins directory shouldn't be placed in $XDG_RUNTIME_DIR, and statistics.dat file in $XDG_STATE_DIR.

See Debian Wiki for table showing what each directory should contain (at the very bottom of the page)

In order to not disrupt existing users, if ~/PySolFC already exists, it should be used instead.

fenuks avatar Oct 17 '21 14:10 fenuks