mirror of
https://github.com/danbulant/dots-hyprland
synced 2026-05-24 12:22:09 +00:00
hyprlandxkb: dont update when not necessary
This commit is contained in:
parent
82fd2334cf
commit
012df9dcd7
1 changed files with 4 additions and 1 deletions
|
|
@ -91,9 +91,12 @@ Singleton {
|
|||
root.needsLayoutRefresh = false;
|
||||
fetchLayoutsProc.running = true;
|
||||
}
|
||||
|
||||
// If there's only one layout, the updated layout is always the same
|
||||
if (root.layoutCodes.length <= 1) return;
|
||||
|
||||
// Update when layout might have changed
|
||||
const dataString = event.data;
|
||||
// console.log("[HyprlandXkb] Received raw event:", event.name, "with data:", dataString);
|
||||
if (!dataString.startsWith(root.targetDeviceName))
|
||||
return;
|
||||
root.currentLayoutName = dataString.split(",")[1];
|
||||
|
|
|
|||
Loading…
Reference in a new issue