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:
3 files changed
+115
-84
No files matched your search
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user