hackjutsu / Lepton

💻 Democratizing Snippet Management (macOS/Win/Linux)
https://hackjutsu.com/Lepton
MIT License
10.12k stars 475 forks source link

Use $XDG_CONFIG_HOME/lepton/leptonrc as well as $HOME/.leptonrc for configuration #504

Closed foundObjects closed 1 year ago

foundObjects commented 3 years ago

Environment info

Description of the problem / feature request / question:

To avoid cluttering the user's homedir check for a config file at $XDG_CONFIG_HOME/lepton/leptonrc as well as $HOME/.leptonrc

edit: it looks like this would be app.getPath(appData) to fetch XDG_CONFIG_HOME

If possible, provide a sample gist or screenshot:

n/a

If possible, provide the log files

n/a

ProfessorManhattan commented 1 year ago

Hey, I added a new PR that addresses this. I just did a quick example of storing the config at $XDG_CONFIG_HOME/.leptonrc. It could easily be modified to store the config at XDG_CONFIG_HOME/lepton/leptonrc but changing it to this location would require some code that would initialize the ~/.config/lepton folder if it does not exist.

https://github.com/hackjutsu/Lepton/pull/540