diff --git a/pqcli/__main__.py b/pqcli/__main__.py index b46b96c..8b29fe5 100644 --- a/pqcli/__main__.py +++ b/pqcli/__main__.py @@ -11,7 +11,16 @@ SAVE_PATH = Path(xdg.XDG_CONFIG_HOME) / "pqcli" / "save.dat" def parse_args() -> argparse.Namespace: parser = argparse.ArgumentParser(prog="pqcli") - parser.add_argument("--cheats", help="???", action="store_true") + parser.add_argument( + "--no-config", + dest="use_config", + action="store_false", + help=( + "Don't load or save configuration files from $XDG_CONFIG_HOME " + "(player data will still be saved)" + ), + ) + parser.add_argument("--cheats", action="store_true", help="???") return parser.parse_args() diff --git a/pqcli/ui/__init__.py b/pqcli/ui/__init__.py index 53181fe..0c8e29c 100644 --- a/pqcli/ui/__init__.py +++ b/pqcli/ui/__init__.py @@ -70,8 +70,10 @@ def bind_commands() -> None: class Ui: def __init__(self, roster: Roster, args: argparse.Namespace) -> None: bind_commands() - if not load_palette(): - save_palette() # create a file for the user to edit + + if args.use_config: + if not load_palette(): + save_palette() # create a file for the user to edit self.roster = roster self.args = args