jpochyla / psst

Fast and multi-platform Spotify client with native GUI

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Separate tokens from config

peterhoeg opened this issue · comments

The problem
I would like to standardize my configuration across machines and thus have $XDG_CONFIG_HOME/Psst/config.json read-only. That is however not possible with the tokens being written there.

Possible solution
If the tokens could be stored in a separate file such as $XDG_CONFIG_HOME/Psst/creds.json or similar.

Alternative solution(s)
I can work around things by using a launcher script that patches config.json but it's pretty ugly.

Additional context
This would also help people who like to keep their config directly in a git (or similar) repository.

Is there a standard way of doing this in other applications?

The problem isn't unique to psst. As an example, davmail allows specifying the path to the token file inside the configuration.

References:

Come to think of it - since many people store a lot of their dotfiles in a repository, if the path isn't configurable, it should probably be under $XDG_STATE_HOME and not $XDG_CONFIG_HOME.