config: search config file in home directory

This commit is contained in:
Corentin Sechet 2022-04-11 17:39:45 +02:00
parent a9d28df9ad
commit ccade0bf6e
1 changed files with 5 additions and 1 deletions

View File

@ -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