To unclutter the home directory and help with backups, TerminalGPT should follow the XDG Specification on Linux machines.
|
BASE_PATH = f"~/.{APP_NAME}".replace("~", path.expanduser("~")) |
|
CONVERSATIONS_PATH = f"{BASE_PATH}/conversations" |
Configuration files should probably be in ${XDG_CONFIG_HOME}/terminalgpt/ when XDG_CONFIG_HOME is set.
Conversations should probably be in ${XDG_STATE_HOME}/terminalgpt/conversations/ when XDG_STATE_HOME is set:
The $XDG_STATE_HOME contains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in $XDG_DATA_HOME. It may contain:
actions history (logs, history, recently used files, …)
current state of the application that can be reused on a restart (view, layout, open files, undo history, …)
I believe it is an easy change. If there is already a ~/.terminalgpt/, Terminal GPT can fallback to that in order to preserve existing user data.
To unclutter the home directory and help with backups, TerminalGPT should follow the XDG Specification on Linux machines.
TerminalGPT/terminalgpt/config.py
Lines 30 to 31 in 3c0eb5a
Configuration files should probably be in
${XDG_CONFIG_HOME}/terminalgpt/whenXDG_CONFIG_HOMEis set.Conversations should probably be in
${XDG_STATE_HOME}/terminalgpt/conversations/whenXDG_STATE_HOMEis set:I believe it is an easy change. If there is already a
~/.terminalgpt/, Terminal GPT can fallback to that in order to preserve existing user data.