slider mode commands split up

config.py added. loads custom user settings

_make_gestures moved into util.py
This commit is contained in:
2023-09-27 18:38:13 +01:00
parent 86dbe0b335
commit bfccc323f1
5 changed files with 110 additions and 89 deletions

View 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