prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  default config location
  I have installed ubuntu 18.04 and it makes sense to put my `i3status.conf` in `~/.config/i3/` but this is not found by default.  I think we should add this path.
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `py3status/cli.py`
  Content:
  ```
  1 import argparse
  2 import os
  3 
  4 
  5 def parse_cli():
  6     """
  7     Parse the command line arguments
  8     """
  9 
  10     # FIXME do we really want to do this here?
  11 
  12     # get home path
  13     home_path = os.path.expanduser("~")
  14 
  15     # i3status config file default detection
  16     # respect i3status' file detection order wrt issue #43
  17     i3status_config_file_candidates = [
  18         "{}/.i3status.conf".format(home_path),
  19         "{}/i3status/config".format(
  20             os.environ.get("XDG_CONFIG_HOME", "{}/.config".format(home_path))
  21         ),
  22         "/etc/i3status.conf",
  23         "{}/i3status/config".format(os.environ.get("XDG_CONFIG_DIRS", "/etc/xdg")),
  24     ]
  25     for fn in i3status_config_file_candidates:
  26         if os.path.isfile(fn):
  27             i3status_config_file_default = fn
  28             break
  29     else:
  30         # if none of the default files exists, we will default
  31         # to ~/.i3/i3status.conf
  32         i3status_config_file_default = "{}/.i3/i3status.conf".format(home_path)
  33 
  34     # command line options
  35     parser = argparse.ArgumentParser(
  36         description="The agile, python-powered, i3status wrapper"
  37     )
  38     parser = argparse.ArgumentParser(add_help=True)
  39     parser.add_argument(
  40         "-b",
  41         "--dbus-notify",
  42         action="store_true",
  43         default=False,
  44         dest="dbus_notify",
  45         help=(
  46             "use notify-send to send user notifications "
  47             "rather than i3-nagbar, "
  48             "requires a notification daemon eg dunst"
  49         ),
  50     )
  51     parser.add_argument(
  52         "-c",
  53         "--config",
  54         action="store",
  55         dest="i3status_conf",
  56         type=str,
  57         default=i3status_config_file_default,
  58         help="path to i3status config file",
  59     )
  60     parser.add_argument(
  61         "-d", "--debug", action="store_true", help="be verbose in syslog"
  62     )
  63     parser.add_argument(
  64         "-g",
  65         "--gevent",
  66         action="store_true",
  67         default=False,
  68         dest="gevent",
  69         help="enable gevent monkey patching (default False)",
  70     )
  71     parser.add_argument(
  72         "-i",
  73         "--include",
  74         action="append",
  75         dest="include_paths",
  76         help=(
  77             "include user-written modules from those "
  78             "directories (default ~/.i3/py3status)"
  79         ),
  80     )
  81     parser.add_argument(
  82         "-l",
  83         "--log-file",
  84         action="store",
  85         dest="log_file",
  86         type=str,
  87         default=None,
  88         help="path to py3status log file",
  89     )
  90     parser.add_argument(
  91         "-n",
  92         "--interval",
  93         action="store",
  94         dest="interval",
  95         type=float,
  96         default=1,
  97         help="update interval in seconds (default 1 sec)",
  98     )
  99     parser.add_argument(
  100         "-s",
  101         "--standalone",
  102         action="store_true",
  103         help="standalone mode, do not use i3status",
  104     )
  105     parser.add_argument(
  106         "-t",
  107         "--timeout",
  108         action="store",
  109         dest="cache_timeout",
  110         type=int,
  111         default=60,
  112         help="default injection cache timeout in seconds (default 60 sec)",
  113     )
  114     parser.add_argument(
  115         "-m",
  116         "--disable-click-events",
  117         action="store_true",
  118         dest="disable_click_events",
  119         default=False,
  120         help="disable all click events",
  121     )
  122     parser.add_argument(
  123         "-v", "--version", action="store_true", help="show py3status version and exit"
  124     )
  125     # FIXME we should make all of these explicit so they self document etc
  126     parser.add_argument("cli_command", nargs="*", help=argparse.SUPPRESS)
  127 
  128     options = parser.parse_args()
  129 
  130     # only asked for version
  131     if options.version:
  132         import sys
  133         from platform import python_version
  134         from py3status.version import version
  135 
  136         print("py3status version {} (python {})".format(version, python_version()))
  137         sys.exit(0)
  138 
  139     # all done
  140     return options
  141
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/py3status/cli.py b/py3status/cli.py
  --- a/py3status/cli.py
  +++ b/py3status/cli.py
  @@ -19,6 +19,7 @@
           "{}/i3status/config".format(
               os.environ.get("XDG_CONFIG_HOME", "{}/.config".format(home_path))
           ),
  +        "{}/.config/i3/".format(home_path),
           "/etc/i3status.conf",
           "{}/i3status/config".format(os.environ.get("XDG_CONFIG_DIRS", "/etc/xdg")),
       ]
  
verification_info: {"golden_diff": "diff --git a/py3status/cli.py b/py3status/cli.py\n--- a/py3status/cli.py\n+++ b/py3status/cli.py\n@@ -19,6 +19,7 @@\n         \"{}/i3status/config\".format(\n             os.environ.get(\"XDG_CONFIG_HOME\", \"{}/.config\".format(home_path))\n         ),\n+        \"{}/.config/i3/\".format(home_path),\n         \"/etc/i3status.conf\",\n         \"{}/i3status/config\".format(os.environ.get(\"XDG_CONFIG_DIRS\", \"/etc/xdg\")),\n     ]\n", "issue": "default config location\nI have installed ubuntu 18.04 and it makes sense to put my `i3status.conf` in `~/.config/i3/` but this is not found by default.  I think we should add this path.\n", "before_files": [{"content": "import argparse\nimport os\n\n\ndef parse_cli():\n    \"\"\"\n    Parse the command line arguments\n    \"\"\"\n\n    # FIXME do we really want to do this here?\n\n    # get home path\n    home_path = os.path.expanduser(\"~\")\n\n    # i3status config file default detection\n    # respect i3status' file detection order wrt issue #43\n    i3status_config_file_candidates = [\n        \"{}/.i3status.conf\".format(home_path),\n        \"{}/i3status/config\".format(\n            os.environ.get(\"XDG_CONFIG_HOME\", \"{}/.config\".format(home_path))\n        ),\n        \"/etc/i3status.conf\",\n        \"{}/i3status/config\".format(os.environ.get(\"XDG_CONFIG_DIRS\", \"/etc/xdg\")),\n    ]\n    for fn in i3status_config_file_candidates:\n        if os.path.isfile(fn):\n            i3status_config_file_default = fn\n            break\n    else:\n        # if none of the default files exists, we will default\n        # to ~/.i3/i3status.conf\n        i3status_config_file_default = \"{}/.i3/i3status.conf\".format(home_path)\n\n    # command line options\n    parser = argparse.ArgumentParser(\n        description=\"The agile, python-powered, i3status wrapper\"\n    )\n    parser = argparse.ArgumentParser(add_help=True)\n    parser.add_argument(\n        \"-b\",\n        \"--dbus-notify\",\n        action=\"store_true\",\n        default=False,\n        dest=\"dbus_notify\",\n        help=(\n            \"use notify-send to send user notifications \"\n            \"rather than i3-nagbar, \"\n            \"requires a notification daemon eg dunst\"\n        ),\n    )\n    parser.add_argument(\n        \"-c\",\n        \"--config\",\n        action=\"store\",\n        dest=\"i3status_conf\",\n        type=str,\n        default=i3status_config_file_default,\n        help=\"path to i3status config file\",\n    )\n    parser.add_argument(\n        \"-d\", \"--debug\", action=\"store_true\", help=\"be verbose in syslog\"\n    )\n    parser.add_argument(\n        \"-g\",\n        \"--gevent\",\n        action=\"store_true\",\n        default=False,\n        dest=\"gevent\",\n        help=\"enable gevent monkey patching (default False)\",\n    )\n    parser.add_argument(\n        \"-i\",\n        \"--include\",\n        action=\"append\",\n        dest=\"include_paths\",\n        help=(\n            \"include user-written modules from those \"\n            \"directories (default ~/.i3/py3status)\"\n        ),\n    )\n    parser.add_argument(\n        \"-l\",\n        \"--log-file\",\n        action=\"store\",\n        dest=\"log_file\",\n        type=str,\n        default=None,\n        help=\"path to py3status log file\",\n    )\n    parser.add_argument(\n        \"-n\",\n        \"--interval\",\n        action=\"store\",\n        dest=\"interval\",\n        type=float,\n        default=1,\n        help=\"update interval in seconds (default 1 sec)\",\n    )\n    parser.add_argument(\n        \"-s\",\n        \"--standalone\",\n        action=\"store_true\",\n        help=\"standalone mode, do not use i3status\",\n    )\n    parser.add_argument(\n        \"-t\",\n        \"--timeout\",\n        action=\"store\",\n        dest=\"cache_timeout\",\n        type=int,\n        default=60,\n        help=\"default injection cache timeout in seconds (default 60 sec)\",\n    )\n    parser.add_argument(\n        \"-m\",\n        \"--disable-click-events\",\n        action=\"store_true\",\n        dest=\"disable_click_events\",\n        default=False,\n        help=\"disable all click events\",\n    )\n    parser.add_argument(\n        \"-v\", \"--version\", action=\"store_true\", help=\"show py3status version and exit\"\n    )\n    # FIXME we should make all of these explicit so they self document etc\n    parser.add_argument(\"cli_command\", nargs=\"*\", help=argparse.SUPPRESS)\n\n    options = parser.parse_args()\n\n    # only asked for version\n    if options.version:\n        import sys\n        from platform import python_version\n        from py3status.version import version\n\n        print(\"py3status version {} (python {})\".format(version, python_version()))\n        sys.exit(0)\n\n    # all done\n    return options\n", "path": "py3status/cli.py"}], "after_files": [{"content": "import argparse\nimport os\n\n\ndef parse_cli():\n    \"\"\"\n    Parse the command line arguments\n    \"\"\"\n\n    # FIXME do we really want to do this here?\n\n    # get home path\n    home_path = os.path.expanduser(\"~\")\n\n    # i3status config file default detection\n    # respect i3status' file detection order wrt issue #43\n    i3status_config_file_candidates = [\n        \"{}/.i3status.conf\".format(home_path),\n        \"{}/i3status/config\".format(\n            os.environ.get(\"XDG_CONFIG_HOME\", \"{}/.config\".format(home_path))\n        ),\n        \"{}/.config/i3/\".format(home_path),\n        \"/etc/i3status.conf\",\n        \"{}/i3status/config\".format(os.environ.get(\"XDG_CONFIG_DIRS\", \"/etc/xdg\")),\n    ]\n    for fn in i3status_config_file_candidates:\n        if os.path.isfile(fn):\n            i3status_config_file_default = fn\n            break\n    else:\n        # if none of the default files exists, we will default\n        # to ~/.i3/i3status.conf\n        i3status_config_file_default = \"{}/.i3/i3status.conf\".format(home_path)\n\n    # command line options\n    parser = argparse.ArgumentParser(\n        description=\"The agile, python-powered, i3status wrapper\"\n    )\n    parser = argparse.ArgumentParser(add_help=True)\n    parser.add_argument(\n        \"-b\",\n        \"--dbus-notify\",\n        action=\"store_true\",\n        default=False,\n        dest=\"dbus_notify\",\n        help=(\n            \"use notify-send to send user notifications \"\n            \"rather than i3-nagbar, \"\n            \"requires a notification daemon eg dunst\"\n        ),\n    )\n    parser.add_argument(\n        \"-c\",\n        \"--config\",\n        action=\"store\",\n        dest=\"i3status_conf\",\n        type=str,\n        default=i3status_config_file_default,\n        help=\"path to i3status config file\",\n    )\n    parser.add_argument(\n        \"-d\", \"--debug\", action=\"store_true\", help=\"be verbose in syslog\"\n    )\n    parser.add_argument(\n        \"-g\",\n        \"--gevent\",\n        action=\"store_true\",\n        default=False,\n        dest=\"gevent\",\n        help=\"enable gevent monkey patching (default False)\",\n    )\n    parser.add_argument(\n        \"-i\",\n        \"--include\",\n        action=\"append\",\n        dest=\"include_paths\",\n        help=(\n            \"include user-written modules from those \"\n            \"directories (default ~/.i3/py3status)\"\n        ),\n    )\n    parser.add_argument(\n        \"-l\",\n        \"--log-file\",\n        action=\"store\",\n        dest=\"log_file\",\n        type=str,\n        default=None,\n        help=\"path to py3status log file\",\n    )\n    parser.add_argument(\n        \"-n\",\n        \"--interval\",\n        action=\"store\",\n        dest=\"interval\",\n        type=float,\n        default=1,\n        help=\"update interval in seconds (default 1 sec)\",\n    )\n    parser.add_argument(\n        \"-s\",\n        \"--standalone\",\n        action=\"store_true\",\n        help=\"standalone mode, do not use i3status\",\n    )\n    parser.add_argument(\n        \"-t\",\n        \"--timeout\",\n        action=\"store\",\n        dest=\"cache_timeout\",\n        type=int,\n        default=60,\n        help=\"default injection cache timeout in seconds (default 60 sec)\",\n    )\n    parser.add_argument(\n        \"-m\",\n        \"--disable-click-events\",\n        action=\"store_true\",\n        dest=\"disable_click_events\",\n        default=False,\n        help=\"disable all click events\",\n    )\n    parser.add_argument(\n        \"-v\", \"--version\", action=\"store_true\", help=\"show py3status version and exit\"\n    )\n    # FIXME we should make all of these explicit so they self document etc\n    parser.add_argument(\"cli_command\", nargs=\"*\", help=argparse.SUPPRESS)\n\n    options = parser.parse_args()\n\n    # only asked for version\n    if options.version:\n        import sys\n        from platform import python_version\n        from py3status.version import version\n\n        print(\"py3status version {} (python {})\".format(version, python_version()))\n        sys.exit(0)\n\n    # all done\n    return options\n", "path": "py3status/cli.py"}]}