mirror of
https://github.com/onyx-and-iris/voicemeeter-compact.git
synced 2024-11-15 17:40:52 +00:00
change profile to config
change profile to config
This commit is contained in:
parent
94d5596d60
commit
9292ed4815
@ -1,6 +1,6 @@
|
|||||||
# load a specific profile on start (file name without .toml ext)
|
# load a specific profile on start (file name without .toml ext)
|
||||||
# [profiles]
|
# [configs]
|
||||||
# profile="example"
|
# config="example"
|
||||||
# load with themes enabled? set the default mode
|
# load with themes enabled? set the default mode
|
||||||
[theme]
|
[theme]
|
||||||
enabled=true
|
enabled=true
|
||||||
|
@ -44,8 +44,8 @@ class App(tk.Tk):
|
|||||||
self.bus_levels = None
|
self.bus_levels = None
|
||||||
self["menu"] = Menus(self, vmr)
|
self["menu"] = Menus(self, vmr)
|
||||||
self.styletable = ttk.Style()
|
self.styletable = ttk.Style()
|
||||||
if _configuration.profile:
|
if _configuration.config:
|
||||||
vmr.apply_config(_configuration.profile)
|
vmr.apply_config(_configuration.config)
|
||||||
|
|
||||||
self.build_app()
|
self.build_app()
|
||||||
|
|
||||||
|
@ -15,15 +15,15 @@ for path in config_path:
|
|||||||
with open(filename, "rb") as f:
|
with open(filename, "rb") as f:
|
||||||
configs[name] = tomllib.load(f)
|
configs[name] = tomllib.load(f)
|
||||||
except tomllib.TOMLDecodeError:
|
except tomllib.TOMLDecodeError:
|
||||||
print(f"Invalid TOML profile: configs/{filename.stem}")
|
print(f"Invalid TOML config: configs/{filename.stem}")
|
||||||
|
|
||||||
for name, cfg in configs.items():
|
for name, cfg in configs.items():
|
||||||
print(f"Loaded configuration configs/{name}")
|
print(f"Loaded configuration configs/{name}")
|
||||||
configuration[name] = cfg
|
configuration[name] = cfg
|
||||||
|
|
||||||
_defaults = {
|
_defaults = {
|
||||||
"profiles": {
|
"configs": {
|
||||||
"profile": None,
|
"config": None,
|
||||||
},
|
},
|
||||||
"theme": {
|
"theme": {
|
||||||
"enabled": True,
|
"enabled": True,
|
||||||
|
@ -38,9 +38,9 @@ class Configurations(metaclass=SingletonMeta):
|
|||||||
level_height: int = configuration["channel"]["height"]
|
level_height: int = configuration["channel"]["height"]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def profile(self):
|
def config(self):
|
||||||
if "profiles" in configuration:
|
if "configs" in configuration:
|
||||||
return configuration["profiles"]["profile"]
|
return configuration["configs"]["config"]
|
||||||
|
|
||||||
|
|
||||||
@dataclass
|
@dataclass
|
||||||
|
Loading…
Reference in New Issue
Block a user