From 16a7fb7e8cfb9a682e411891c0cb81e0aa0a1b15 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 6 Mar 2026 19:30:48 +0100 Subject: niri: screenshare indicators --- accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'accounts/gkleen@sif/shell/quickshell/Services') diff --git a/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml b/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml index 6dbff134..cd4ed125 100644 --- a/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml +++ b/accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml @@ -74,6 +74,10 @@ Singleton { eventWindowFocusTimestampChanged(event.WindowFocusTimestampChanged); else if (event.CastsChanged) root.casts = event.CastsChanged.casts + else if (event.CastStartedOrChanged) + eventCastStartedOrChanged(event.CastStartedOrChanged); + else if (event.CastStopped) + eventCastStopped(event.CastStopped); else if (event.Ok && !eventStreamSocket.acked) { eventStreamSocket.acked = true; } else if (event.OverviewOpenedOrClosed) {} else if (event.ConfigLoaded) {} @@ -203,4 +207,10 @@ Singleton { return win; }); } + function eventCastStartedOrChanged(data) { + root.casts = [...Array.from(root.casts).filter(cast => cast.stream_id !== data.cast.stream_id), data.cast]; + } + function eventCastStopped(data) { + root.casts = Array.from(root.casts).filter(cast => cast.stream_id !== data.stream_id); + } } -- cgit v1.2.3