drop global XDG_CONFIG_DIR and use environment variables

+ handle string explicit flags
This commit is contained in:
cwilvx
2025-05-25 19:01:10 +03:00
parent 4a741d9ffc
commit f4bc525ae4
7 changed files with 152 additions and 28 deletions
+2 -4
View File
@@ -18,7 +18,6 @@ else:
class Paths:
XDG_CONFIG_DIR = ""
USER_HOME_DIR = os.path.expanduser("~")
# TODO: Break this down into getter methods for each path
@@ -30,9 +29,8 @@ class Paths:
@classmethod
def get_config_dir(cls):
return (
cls.XDG_CONFIG_DIR
or os.environ.get("SWINGMUSIC_XDG_CONFIG_DIR")
or os.path.realpath(".")
# cls.XDG_CONFIG_DIR
os.environ.get("SWINGMUSIC_XDG_CONFIG_DIR") or os.path.realpath(".")
)
@classmethod