From 73aa3e32dee1ac425e352f2a2f90f3a05316077d Mon Sep 17 00:00:00 2001 From: 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> Date: Tue, 14 Oct 2025 01:18:54 +1100 Subject: toasts: add toast for kb layout change Closes #688 --- README.md | 1 + config/UtilitiesConfig.qml | 1 + services/Hypr.qml | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/README.md b/README.md index 64873e9..a9b8fbf 100644 --- a/README.md +++ b/README.md @@ -588,6 +588,7 @@ default, you must create it manually. "configLoaded": true, "dndChanged": true, "gameModeChanged": true, + "kbLayoutChanged": true, "numLockChanged": true } } diff --git a/config/UtilitiesConfig.qml b/config/UtilitiesConfig.qml index 2271307..3094efa 100644 --- a/config/UtilitiesConfig.qml +++ b/config/UtilitiesConfig.qml @@ -21,5 +21,6 @@ JsonObject { property bool audioInputChanged: true property bool capsLockChanged: true property bool numLockChanged: true + property bool kbLayoutChanged: true } } diff --git a/services/Hypr.qml b/services/Hypr.qml index 55ddb19..f537792 100644 --- a/services/Hypr.qml +++ b/services/Hypr.qml @@ -33,6 +33,8 @@ Singleton { readonly property alias options: extras.options readonly property alias devices: extras.devices + property bool hadKeyboard + signal configReloaded function dispatch(request: string): void { @@ -69,6 +71,13 @@ Singleton { Toaster.toast(qsTr("Num lock disabled"), qsTr("Num lock is currently disabled"), "timer_1"); } + onKbLayoutFullChanged: { + if (hadKeyboard && Config.utilities.toasts.kbLayoutChanged) + Toaster.toast(qsTr("Keyboard layout changed"), qsTr("Layout changed to: %1").arg(kbLayoutFull), "keyboard"); + + hadKeyboard = !!keyboard; + } + Connections { target: Hyprland -- cgit v1.2.3-freya