Skip to content

Follow XDG specification on Linux #51

Description

@lucaspar

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions