Touch `conf.toml` by default when dne?

nixround2_n_sway_testing
Tyler Goodlet 2025-12-16 12:42:11 -05:00
parent 4e7fd0879c
commit 944740799c
1 changed files with 4 additions and 3 deletions

View File

@ -261,7 +261,7 @@ def load(
MutableMapping,
] = tomllib.loads,
touch_if_dne: bool = False,
touch_if_dne: bool = True,
**tomlkws,
@ -270,7 +270,7 @@ def load(
Load config file by name.
If desired config is not in the top level piker-user config path then
pass the ``path: Path`` explicitly.
pass the `path: Path` explicitly.
'''
# create the $HOME/.config/piker dir if dne
@ -285,7 +285,8 @@ def load(
if (
not path.is_file()
and touch_if_dne
and
touch_if_dne
):
# only do a template if no path provided,
# just touch an empty file with same name.