diff --git a/pqcli/__main__.py b/pqcli/__main__.py index 264433f..dd37751 100644 --- a/pqcli/__main__.py +++ b/pqcli/__main__.py @@ -45,15 +45,6 @@ def parse_args() -> argparse.Namespace: help="Disable color highlighting in curses interface", ) - 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( "--no-save", dest="use_saves", diff --git a/pqcli/ui/urwid/__init__.py b/pqcli/ui/urwid/__init__.py index 0bf8df4..c5bc372 100644 --- a/pqcli/ui/urwid/__init__.py +++ b/pqcli/ui/urwid/__init__.py @@ -1,10 +1,8 @@ import argparse import json import typing as T -from pathlib import Path import urwid -import xdg from pqcli import lingo, random from pqcli.mechanic import Player @@ -30,21 +28,6 @@ PALETTE: T.List[T.Tuple[str, ...]] = [ ("scrollable", "", ""), ("scrollable-focus", "", ""), ] -PALETTE_PATH = Path(xdg.XDG_CONFIG_HOME) / "pqcli" / "palette.json" - - -def load_palette() -> bool: - global PALETTE - if PALETTE_PATH.exists(): - PALETTE = json.loads(PALETTE_PATH.read_text()) - return True - return False - - -def save_palette() -> None: - global PALETTE - PALETTE_PATH.parent.mkdir(exist_ok=True, parents=True) - PALETTE_PATH.write_text(json.dumps(PALETTE, indent=4)) class ConfirmExitDialog(ConfirmView): @@ -69,10 +52,6 @@ class UrwidUserInterface(BaseUserInterface): bind_commands() - if args.use_config: - if not load_palette(): - save_palette() # create a file for the user to edit - self.loop = urwid.MainLoop( None, PALETTE, unhandled_input=self.unhandled_input )