diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2025-09-01 14:05:25 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2025-09-01 14:05:25 +0200 |
commit | c9b4c6834e390f051e3137a6a45882ea8608ee9d (patch) | |
tree | 98229a1b688b09653fbd82e45a9471e1b033233d /accounts/gkleen@sif/shell/quickshell/KeyboardLayout.qml | |
parent | 466ce70f96f8bdde32260f6951c5cbb62cfc02a7 (diff) | |
download | nixos-c9b4c6834e390f051e3137a6a45882ea8608ee9d.tar nixos-c9b4c6834e390f051e3137a6a45882ea8608ee9d.tar.gz nixos-c9b4c6834e390f051e3137a6a45882ea8608ee9d.tar.bz2 nixos-c9b4c6834e390f051e3137a6a45882ea8608ee9d.tar.xz nixos-c9b4c6834e390f051e3137a6a45882ea8608ee9d.zip |
...
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/KeyboardLayout.qml')
-rw-r--r-- | accounts/gkleen@sif/shell/quickshell/KeyboardLayout.qml | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/KeyboardLayout.qml b/accounts/gkleen@sif/shell/quickshell/KeyboardLayout.qml index b9f91580..4a6b8390 100644 --- a/accounts/gkleen@sif/shell/quickshell/KeyboardLayout.qml +++ b/accounts/gkleen@sif/shell/quickshell/KeyboardLayout.qml | |||
@@ -18,7 +18,7 @@ Rectangle { | |||
18 | height: parent.height | 18 | height: parent.height |
19 | anchors.verticalCenter: parent.verticalCenter | 19 | anchors.verticalCenter: parent.verticalCenter |
20 | 20 | ||
21 | MouseArea { | 21 | WrapperMouseArea { |
22 | id: kbdMouseArea | 22 | id: kbdMouseArea |
23 | 23 | ||
24 | anchors.fill: parent | 24 | anchors.fill: parent |
@@ -31,25 +31,25 @@ Rectangle { | |||
31 | onWheel: event => { | 31 | onWheel: event => { |
32 | NiriService.sendCommand({ "Action": { "SwitchLayout": { "layout": event.angleDelta > 0 ? "Next" : "Prev" } } }, _ => {}) | 32 | NiriService.sendCommand({ "Action": { "SwitchLayout": { "layout": event.angleDelta > 0 ? "Next" : "Prev" } } }, _ => {}) |
33 | } | 33 | } |
34 | } | ||
35 | 34 | ||
36 | Text { | 35 | Text { |
37 | id: kbdLabel | 36 | id: kbdLabel |
38 | 37 | ||
39 | font.pointSize: 10 | 38 | font.pointSize: 10 |
40 | font.family: "Fira Sans" | 39 | font.family: "Fira Sans" |
41 | color: { | 40 | color: { |
42 | if (NiriService.keyboardLayouts?.current_idx === 0) | 41 | if (NiriService.keyboardLayouts?.current_idx === 0) |
43 | return "#555"; | 42 | return "#555"; |
44 | return "white"; | 43 | return "white"; |
45 | } | 44 | } |
46 | anchors.centerIn: parent | 45 | anchors.centerIn: parent |
47 | 46 | ||
48 | text: { | 47 | text: { |
49 | const currentLayout = NiriService.keyboardLayouts?.names?.[NiriService.keyboardLayouts.current_idx]; | 48 | const currentLayout = NiriService.keyboardLayouts?.names?.[NiriService.keyboardLayouts.current_idx]; |
50 | if (!currentLayout) | 49 | if (!currentLayout) |
51 | return ""; | 50 | return ""; |
52 | return kbdWidget.keyboardAbbrev[currentLayout] ? kbdWidget.keyboardAbbrev[currentLayout] : currentLayout; | 51 | return kbdWidget.keyboardAbbrev[currentLayout] ? kbdWidget.keyboardAbbrev[currentLayout] : currentLayout; |
52 | } | ||
53 | } | 53 | } |
54 | } | 54 | } |
55 | 55 | ||