@ -10,6 +10,12 @@ import time
# tries to follow XDG Base Directory Specification, if it fails due to a missing module, uses default cache dir ~/.cache
try:
# pip package: pyxdg
import xdg.BaseDirectory
CACHE_DIR = Path(xdg.BaseDirectory.xdg_cache_home)
except ModuleNotFoundError:
# pip package: xdg
import xdg
CACHE_DIR = xdg.xdg_cache_home()