From ccade0bf6e904b15e99f0745b8ec747dbf36c73b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Corentin=20S=C3=A9chet?= Date: Mon, 11 Apr 2022 17:39:45 +0200 Subject: [PATCH] config: search config file in home directory --- frontools/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/frontools/config.py b/frontools/config.py index 1eaa85c..527043f 100644 --- a/frontools/config.py +++ b/frontools/config.py @@ -6,7 +6,7 @@ from re import Pattern from re import compile as re_compile from typing import Any, Iterable, Optional, Type -from xdg import xdg_config_dirs +from xdg import xdg_config_dirs, xdg_config_home from yaml import Loader from yaml import load as load_yaml @@ -179,4 +179,8 @@ def _find_config() -> Optional[Path]: if config_path.is_file(): return config_path + config_path = xdg_config_home() / "frontools/config.py" + if config_path.is_file(): + return config_path + return None