set config location to the default XDG spec
This commit is contained in:
parent
9af70e2ee4
commit
d747579b62
|
@ -1 +1,2 @@
|
|||
Mastodon.py >= 1.5.1
|
||||
pyxdg >= 0.27
|
||||
|
|
|
@ -4,10 +4,11 @@ import json
|
|||
import os
|
||||
import tempfile
|
||||
from subprocess import call
|
||||
from xdg import BaseDirectory
|
||||
|
||||
# load JSON config file
|
||||
def load_config() -> dict:
|
||||
with open('config.json') as f:
|
||||
with open(f"{BaseDirectory.xdg_config_home}/tootgopher/config.json") as f:
|
||||
config_data = json.load(f)
|
||||
return config_data
|
||||
|
||||
|
|
Loading…
Reference in New Issue