diff --git a/README.md b/README.md index be89fdf..5370bdd 100644 --- a/README.md +++ b/README.md @@ -8,14 +8,14 @@ _A headless login / logout script for 10.0.0.55 at BIT._ You need at least **Python 3.8**. We recommend installing with `pipx`. -```bash +```shell python3 -m pip install --user pipx python3 -m pipx ensurepath ``` After which, install `bitsrun` with `pipx`. -```bash +```shell pipx install bitsrun ``` @@ -55,7 +55,7 @@ This file should be put under the following directory: Now you can simply call: -```bash +```shell bitsrun login bitsrun logout ``` @@ -78,7 +78,7 @@ Import the two Raycast scripts from [`./scripts`](./scripts/) and setup your con Install and run: -```bash +```shell # Create virtual env and install deps poetry install @@ -91,7 +91,7 @@ pre-commit install Build: -```bash +```shell # Bump version poetry version x.x.x @@ -101,7 +101,7 @@ poetry build Publish: -```bash +```shell poetry publish ``` diff --git a/bitsrun/config.py b/bitsrun/config.py index af73ed2..950cb32 100644 --- a/bitsrun/config.py +++ b/bitsrun/config.py @@ -17,13 +17,21 @@ def get_config_paths() -> map: - `C:\ProgramData\bitsrun\bit-user.json` - `~\AppData\Roaming\bitsrun\bit-user.json` - On macOS and Linux: + On Linux: - `/etc/bitsrun/bit-user.json` - - `$XDG_CONFIG_HOME/bitsrun/bit-user.json` + - `/etc/xdg/bitsrun/bit-user.json` - `~/.config/bitsrun/bit-user.json` - `~/.config/bit-user.json` + On macOS: + + - `/etc/bit-user.json` + - `/Library/Preferences/bitsrun/bit-user.json` + - `$HOME/Library/Preferences/bitsrun/bit-user.json` + - `$HOME/.config/bit-user.json` + - `$HOME/.config/bitsrun/bit-user.json` + Returns: A map of possible paths of the configuration file based on the current platform. """ @@ -43,6 +51,7 @@ def get_config_paths() -> map: paths.append(Path(xdg_config_home)) else: paths.append(Path.home() / ".config") + paths.append(paths[-1] / _APP_NAME) else: paths.append(user_config_path()) diff --git a/pyproject.toml b/pyproject.toml index c8c8006..76f3f99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "bitsrun" -version = "3.3.0" +version = "3.3.1" description = "A headless login / logout script for 10.0.0.55" authors = ["spencerwooo "] license = "WTFPL"