mirror of
https://github.com/onyx-and-iris/nvda-addon-voicemeeter.git
synced 2026-04-19 01:23:31 +00:00
slider mode commands split up
config.py added. loads custom user settings _make_gestures moved into util.py
This commit is contained in:
20
addon/globalPlugins/voicemeeter/config.py
Normal file
20
addon/globalPlugins/voicemeeter/config.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def config_from_json():
|
||||
pn = Path.home() / "Documents" / "Voicemeeter" / "nvda_settings.json"
|
||||
data = None
|
||||
if pn.exists():
|
||||
with open(pn, "r") as f:
|
||||
data = json.load(f)
|
||||
return data or {}
|
||||
|
||||
|
||||
__config = config_from_json()
|
||||
|
||||
|
||||
def get(name, default=None):
|
||||
if name in __config:
|
||||
return __config[name]
|
||||
return default
|
||||
Reference in New Issue
Block a user