summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif/shell/quickshell
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/gkleen@sif/shell/quickshell')
-rw-r--r--accounts/gkleen@sif/shell/quickshell/Bar.qml8
-rw-r--r--accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml10
2 files changed, 17 insertions, 1 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/Bar.qml b/accounts/gkleen@sif/shell/quickshell/Bar.qml
index 54ac2d3c..e8bd6245 100644
--- a/accounts/gkleen@sif/shell/quickshell/Bar.qml
+++ b/accounts/gkleen@sif/shell/quickshell/Bar.qml
@@ -32,8 +32,14 @@ PanelWindow {
32 implicitHeight: 21 32 implicitHeight: 21
33 color: "transparent" 33 color: "transparent"
34 34
35 property bool haveScreenshare: Array.from(NiriService.casts).some(cast => cast.target.Output?.name == bar.screen.name)
36
35 Rectangle { 37 Rectangle {
36 color: bar.haveMaximizedWindow ? "black" : Qt.rgba(0, 0, 0, 0.75) 38 color: {
39 if (bar.haveScreenshare)
40 return bar.haveMaximizedWindow ? Qt.rgba(0.2, 0, 0, 1) : Qt.rgba(0.2, 0, 0, 0.75);
41 return bar.haveMaximizedWindow ? "black" : Qt.rgba(0, 0, 0, 0.75);
42 }
37 anchors.fill: parent 43 anchors.fill: parent
38 // bottomLeftRadius: 8 44 // bottomLeftRadius: 8
39 // bottomRightRadius: 8 45 // bottomRightRadius: 8
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 {
74 eventWindowFocusTimestampChanged(event.WindowFocusTimestampChanged); 74 eventWindowFocusTimestampChanged(event.WindowFocusTimestampChanged);
75 else if (event.CastsChanged) 75 else if (event.CastsChanged)
76 root.casts = event.CastsChanged.casts 76 root.casts = event.CastsChanged.casts
77 else if (event.CastStartedOrChanged)
78 eventCastStartedOrChanged(event.CastStartedOrChanged);
79 else if (event.CastStopped)
80 eventCastStopped(event.CastStopped);
77 else if (event.Ok && !eventStreamSocket.acked) { eventStreamSocket.acked = true; } 81 else if (event.Ok && !eventStreamSocket.acked) { eventStreamSocket.acked = true; }
78 else if (event.OverviewOpenedOrClosed) {} 82 else if (event.OverviewOpenedOrClosed) {}
79 else if (event.ConfigLoaded) {} 83 else if (event.ConfigLoaded) {}
@@ -203,4 +207,10 @@ Singleton {
203 return win; 207 return win;
204 }); 208 });
205 } 209 }
210 function eventCastStartedOrChanged(data) {
211 root.casts = [...Array.from(root.casts).filter(cast => cast.stream_id !== data.cast.stream_id), data.cast];
212 }
213 function eventCastStopped(data) {
214 root.casts = Array.from(root.casts).filter(cast => cast.stream_id !== data.stream_id);
215 }
206} 216}