fix dict path
This commit is contained in:
parent
79f5bfabe5
commit
4a9a1ec799
|
|
@ -92,7 +92,10 @@
|
|||
"Bash(ydotool type:*)",
|
||||
"Bash(wl-copy -- \"XDOTOOL_TEST\")",
|
||||
"Bash(xdotool key:*)",
|
||||
"Bash(find /mnt/ventoy/projects/chrka/whisper-dictation/shared_data/ -name *.bin -o -name *.pt -o -name model*)"
|
||||
"Bash(find /mnt/ventoy/projects/chrka/whisper-dictation/shared_data/ -name *.bin -o -name *.pt -o -name model*)",
|
||||
"Bash(python3 -c \":*)",
|
||||
"Read(//usr/bin/**)",
|
||||
"Bash(/run/media/chk/Ventoy/projects/chrka/whisper-dictation/.venv-linux/bin/python build.py)"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,6 +66,10 @@
|
|||
{
|
||||
"from": "SHP",
|
||||
"to": "SAP"
|
||||
},
|
||||
{
|
||||
"from": "GRA App",
|
||||
"to": "KRAH-App"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -6,7 +6,12 @@ import sys
|
|||
def _app_dir() -> str:
|
||||
"""Root dir for config.json and vocabulary.json."""
|
||||
if getattr(sys, "frozen", False):
|
||||
return os.path.dirname(sys.executable)
|
||||
exe_dir = os.path.dirname(sys.executable)
|
||||
# Built exe lives at dist/<platform>/; project root is two levels up.
|
||||
project_root = os.path.normpath(os.path.join(exe_dir, "..", ".."))
|
||||
if os.path.isfile(os.path.join(project_root, "config.json")):
|
||||
return project_root
|
||||
return exe_dir
|
||||
# config.py lives at whisper_app/config.py → parent of parent = repo root
|
||||
return os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ def _open_main(root: tk.Tk) -> None:
|
|||
win.title("Vokabular")
|
||||
win.configure(bg=BG)
|
||||
win.attributes("-topmost", True)
|
||||
win.resizable(False, False)
|
||||
win.minsize(600, 0)
|
||||
win.resizable(True, True)
|
||||
win.minsize(600, 480)
|
||||
win.option_add("*Menu.background", BG3)
|
||||
win.option_add("*Menu.foreground", FG)
|
||||
win.option_add("*Menu.activeBackground", AMBER)
|
||||
|
|
@ -192,6 +192,6 @@ def _open_main(root: tk.Tk) -> None:
|
|||
win.update_idletasks()
|
||||
sw = win.winfo_screenwidth()
|
||||
sh = win.winfo_screenheight()
|
||||
w = win.winfo_reqwidth()
|
||||
h = win.winfo_reqheight()
|
||||
win.geometry(f"+{(sw-w)//2}+{(sh-h)//2}")
|
||||
w = max(win.winfo_reqwidth(), 600)
|
||||
h = min(max(win.winfo_reqheight(), 480), sh - 100)
|
||||
win.geometry(f"{w}x{h}+{(sw-w)//2}+{(sh-h)//2}")
|
||||
|
|
|
|||
Loading…
Reference in New Issue