add _internal/configs to config paths.

vm-compact dirs now override _internal/config

upd README TOML Files section
This commit is contained in:
Onyx and Iris 2025-01-22 16:30:06 +00:00
parent ae200068d0
commit cb00de36f0
2 changed files with 19 additions and 15 deletions

View File

@ -65,15 +65,18 @@ Set the kind of Voicemeeter, KIND_ID may be:
## TOML Files
This is how your files should be organised. Wherever your `__main__.py` file is located (after install this can be any location), `configs` should be in the same location.
Directly inside of configs directory you may place an app.toml, vban.toml and a directory for each kind.
Inside each kind directory you may place as many custom toml configurations as you wish.
If you've downloaded the binary from [Releases][releases] you can find configs included in the `_internal/configs` directory.
You may override these configs by placing a directory `vm-compact` in one of the following locations:
- `user home directory / .config`
- `user home directory / Documents / Voicemeeter`
The contents should match the following directory structure:
.
├── `__main__.py`
├── configs
├── vm-compact
        ├── app.toml
@ -111,7 +114,7 @@ Configure certain startup states for the app.
Configure a user config to load on app startup. Don't include the .toml extension in the config name.
- `theme`
By default the app loads up the [Sun Valley light or dark theme][def] by @rdbende. You have the option to load up the app without any theme loaded. Simply set `enabled` to false and `mode` will take no effect.
By default the app loads up the [Sun Valley light or dark theme][releases] by @rdbende. You have the option to load up the app without any theme loaded. Simply set `enabled` to false and `mode` will take no effect.
- `extends`
Extending the app will show both strips and buses. In reduced mode only one or the other. This app will extend both horizontally and vertically, simply set `extends_horizontal` true or false accordingly.
@ -164,4 +167,5 @@ User configs may be loaded at any time via the menu.
[Rdbende](https://github.com/rdbende) for creating the beautiful [Sun Valley theme][sv-theme].
[sv-theme]: https://github.com/rdbende/Sun-Valley-ttk-theme
[sv-theme]: https://github.com/rdbende/Sun-Valley-ttk-theme
[releases]: https://github.com/onyx-and-iris/voicemeeter-compact/releases

View File

@ -12,14 +12,14 @@ configuration = {}
def get_configpath():
configpaths = [
for pn in (
Path.home() / '.config' / 'vm-compact',
Path.home() / 'Documents' / 'Voicemeeter' / 'vm-compact',
Path.cwd() / '_internal' / 'configs',
Path.cwd() / 'configs',
Path.home() / '.config' / 'vm-compact' / 'configs',
Path.home() / 'Documents' / 'Voicemeeter' / 'configs',
]
for configpath in configpaths:
if configpath.exists():
return configpath
):
if pn.exists():
return pn
if configpath := get_configpath():