bd4facf1c46ca78ff55960e2dbfcdba92f9194f0
Replaces the no-op stub with a working implementation for KDE6 Wayland. Wayland's privacy model prevents querying focused-window state from outside the compositor, so the monitor injects a KWin JavaScript snippet at runtime that subscribes to workspace.windowActivated and calls back via D-Bus. On startup: - Writes the KWin script to a NamedTempFile - Registers dev.rootiest.qmk_host on the session bus at /AppMonitor - Loads the script via org.kde.kwin.Scripting.loadScript(), then calls start() to activate it (loadScript alone does not execute the script) On each window-activation event: - Truncates app_id to 27 UTF-8 bytes at a char boundary - Skips no-op updates when the active app has not changed - Broadcasts CMD_ACTIVE_APP (0x43) to all connected keyboards Depends on new crates: zbus v4 (blocking D-Bus) and tempfile v3.
Description
No description provided
Languages
Rust
100%