OSK update on activeLayout event

This commit is contained in:
Anton Epikhin
2025-07-25 14:26:49 +03:00
parent 27eea1c7a6
commit 6bc1f8a39f
3 changed files with 107 additions and 7 deletions
@@ -4,6 +4,7 @@ import QtQuick
import Quickshell
import Quickshell.Io
import Quickshell.Hyprland
import qs.modules.common
/**
* Exposes the active Hyprland Xkb keyboard layout name and code for indicators.
@@ -100,6 +101,9 @@ Singleton {
if (!dataString.startsWith(root.targetDeviceName))
return;
root.currentLayoutName = dataString.split(",")[1];
// Update layout for on-screen keyboard (osk)
Config.options.osk.layout = root.currentLayoutName;
} else if (event.name == "configreloaded") {
// Mark layout code list to be updated when config is reloaded
root.needsLayoutRefresh = true;