Is your feature request related to a problem? Please describe.
On all platforms, tiddl's config is placed in ~/.tiddl by default, it would make more sense and align with platform conventions to place it in the OS specific directories, such as ~/.config or ~/AppData/Roaming.
Describe the solution you'd like
In tiddl/cli/const.py, there could be separate functions for getting the different types of directories, such as get_config_path() or get_cache_path(), all with a corresponding environment variable. For Linux, the XDG environment variables could be respected, the tiddl variables would take precedence over those.
Because the current directory used is ~/.tiddl, this change could only be for new users, or explicitly opted into (the CLI could move the files to the new locations).
Describe alternatives you've considered
Can't come up with any.
Additional context
These are the directories on each platform
- Linux:
- Config:
XDG_CONFIG_HOME, then ~/.config
- Data:
XDG_DATA_HOME, then ~/.local/share
- State:
XDG_STATE_HOME, then ~/.local/state
- Cache:
XDG_CACHE_HOME, then ~/.cache
- macOS:
- Config, data, and state:
~/Library/Application Support
- Cache:
~/Library/Caches
- Windows:
- Config, data, and state:
~/AppData/Roaming
- Cache:
~/AppData/Local
Is your feature request related to a problem? Please describe.
On all platforms, tiddl's config is placed in
~/.tiddlby default, it would make more sense and align with platform conventions to place it in the OS specific directories, such as~/.configor~/AppData/Roaming.Describe the solution you'd like
In
tiddl/cli/const.py, there could be separate functions for getting the different types of directories, such asget_config_path()orget_cache_path(), all with a corresponding environment variable. For Linux, the XDG environment variables could be respected, the tiddl variables would take precedence over those.Because the current directory used is
~/.tiddl, this change could only be for new users, or explicitly opted into (the CLI could move the files to the new locations).Describe alternatives you've considered
Can't come up with any.
Additional context
These are the directories on each platform
XDG_CONFIG_HOME, then~/.configXDG_DATA_HOME, then~/.local/shareXDG_STATE_HOME, then~/.local/stateXDG_CACHE_HOME, then~/.cache~/Library/Application Support~/Library/Caches~/AppData/Roaming~/AppData/Local