feat(src/services): refactor KeyboardLayout to use TOML state persistence and improve layout switching

Switch layouts are now stored in TOML, added proper error handling and a static method to trigger switching, replaced JSON handling, updated imports and fixed related services.
This commit is contained in:
sankalp committed 2026-07-09 15:32:29 +05:45
1 parent 6152314c9c
commit 01dc64498f
3 files changed
+115 -84

No files matched your search

+4 -3
View File
@@ -580,9 +580,10 @@ def get_screen_dimensions() -> tuple[int, int]:
def focus_window(address: str):
conn = _ensure_hyprland()
if conn:
conn.send_command(f"dispatch focuswindow address:{address}")
run_command(
["hyprctl", "dispatch", f'hl.dsp.focus({{ window = "address:{address}" }})'],
timeout=2,
)
def close_window(address: str):