diff --git a/requirements.txt b/requirements.txt index 168cc09..b6025d8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1,2 @@ Mastodon.py >= 1.5.1 +pyxdg >= 0.27 diff --git a/tootgopher.py b/tootgopher.py index 9365033..a8b00c6 100755 --- a/tootgopher.py +++ b/tootgopher.py @@ -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