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/Lockscreen.qml5
-rw-r--r--accounts/gkleen@sif/shell/quickshell/Services/NiriService.qml10
-rw-r--r--accounts/gkleen@sif/shell/quickshell/Services/WallpaperSelector.qml2
4 files changed, 22 insertions, 3 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/Lockscreen.qml b/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml
index fc2e1f9f..30fa68b5 100644
--- a/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml
+++ b/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml
@@ -35,8 +35,11 @@ Scope {
35 target: Custom.Systemd 35 target: Custom.Systemd
36 function onSleep(before: bool) { 36 function onSleep(before: bool) {
37 console.log(`received prepare for sleep ${before}`); 37 console.log(`received prepare for sleep ${before}`);
38 if (before) 38 if (before) {
39 lock.locked = true; 39 lock.locked = true;
40 if (pam.active)
41 pam.abort();
42 }
40 } 43 }
41 function onLock() { lock.locked = true; } 44 function onLock() { lock.locked = true; }
42 function onUnlock() { lock.locked = false; } 45 function onUnlock() { lock.locked = false; }
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}
diff --git a/accounts/gkleen@sif/shell/quickshell/Services/WallpaperSelector.qml b/accounts/gkleen@sif/shell/quickshell/Services/WallpaperSelector.qml
index 3c524955..c71a9cca 100644
--- a/accounts/gkleen@sif/shell/quickshell/Services/WallpaperSelector.qml
+++ b/accounts/gkleen@sif/shell/quickshell/Services/WallpaperSelector.qml
@@ -4,5 +4,5 @@ Custom.FileSelector {
4 id: root 4 id: root
5 5
6 directory: @wallpapers@ 6 directory: @wallpapers@
7 epoch: 72000000 7 epoch: 79200000
8} 8}