diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2025-08-30 23:53:06 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2025-08-30 23:53:06 +0200 |
commit | 2f0e13af015d5bfdbac77d2340e8f4810929620a (patch) | |
tree | 8af38c1834dde4cb717341a180019bc5c488497d /accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml | |
parent | a9e5bb524d39418e5daaabbbeaa4c2c52b44b267 (diff) | |
download | nixos-2f0e13af015d5bfdbac77d2340e8f4810929620a.tar nixos-2f0e13af015d5bfdbac77d2340e8f4810929620a.tar.gz nixos-2f0e13af015d5bfdbac77d2340e8f4810929620a.tar.bz2 nixos-2f0e13af015d5bfdbac77d2340e8f4810929620a.tar.xz nixos-2f0e13af015d5bfdbac77d2340e8f4810929620a.zip |
...
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml')
-rw-r--r-- | accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml b/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml index 914152e1..c82caaa6 100644 --- a/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml +++ b/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml | |||
@@ -13,10 +13,6 @@ Singleton { | |||
13 | property var windows: [] | 13 | property var windows: [] |
14 | readonly property string socketPath: Quickshell.env("NIRI_SOCKET") | 14 | readonly property string socketPath: Quickshell.env("NIRI_SOCKET") |
15 | 15 | ||
16 | onKeyboardLayoutsChanged: { | ||
17 | console.log(JSON.stringify(keyboardLayouts)); | ||
18 | } | ||
19 | |||
20 | function refreshOutputs() { | 16 | function refreshOutputs() { |
21 | commandSocket.sendCommand("Outputs", data => { | 17 | commandSocket.sendCommand("Outputs", data => { |
22 | outputs = data.Ok.Outputs; | 18 | outputs = data.Ok.Outputs; |
@@ -70,6 +66,8 @@ Singleton { | |||
70 | eventWindowUrgencyChanged(event.WindowUrgencyChanged); | 66 | eventWindowUrgencyChanged(event.WindowUrgencyChanged); |
71 | else if (event.WindowLayoutsChanged) | 67 | else if (event.WindowLayoutsChanged) |
72 | eventWindowLayoutsChanged(event.WindowLayoutsChanged); | 68 | eventWindowLayoutsChanged(event.WindowLayoutsChanged); |
69 | else | ||
70 | console.log(JSON.stringify(event)); | ||
73 | } catch (e) { | 71 | } catch (e) { |
74 | console.warn("NiriService: Failed to parse event:", line, e) | 72 | console.warn("NiriService: Failed to parse event:", line, e) |
75 | } | 73 | } |
@@ -156,11 +154,7 @@ Singleton { | |||
156 | }); | 154 | }); |
157 | } | 155 | } |
158 | function eventWindowOpenedOrChanged(data) { | 156 | function eventWindowOpenedOrChanged(data) { |
159 | root.windows = Array.from(root.windows).map(win => { | 157 | root.windows = Array.from(root.windows).filter(win => win.id !== data.window.id).concat([data.window]); |
160 | if (win.id === data.window.id) | ||
161 | return data.window; | ||
162 | return win; | ||
163 | }); | ||
164 | } | 158 | } |
165 | function eventWindowClosed(data) { | 159 | function eventWindowClosed(data) { |
166 | root.windows = Array.from(root.windows).filter(win => win.id !== data.id); | 160 | root.windows = Array.from(root.windows).filter(win => win.id !== data.id); |