settings: Added ENVAR PYWAL_CACHE_DIR to change cache dir. Closes #343

This commit is contained in:
Dylan Araps 2019-01-04 21:40:16 +02:00
parent aecb848283
commit 30af3d0d5c

View File

@ -18,7 +18,7 @@ __cache_version__ = "1.1.0"
HOME = os.getenv("HOME", os.getenv("USERPROFILE")) HOME = os.getenv("HOME", os.getenv("USERPROFILE"))
CACHE_DIR = os.path.join(HOME, ".cache", "wal") CACHE_DIR = os.getenv("PYWAL_CACHE_DIR", os.path.join(HOME, ".cache", "wal"))
MODULE_DIR = os.path.dirname(__file__) MODULE_DIR = os.path.dirname(__file__)
CONF_DIR = os.path.join(HOME, ".config", "wal") CONF_DIR = os.path.join(HOME, ".config", "wal")
OS = platform.uname()[0] OS = platform.uname()[0]