diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2025-09-13 17:26:41 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2025-09-13 17:26:41 +0200 |
commit | f9810413c6aff247b63d8321812a98f204eb0b49 (patch) | |
tree | 8dfaa614c50b6aebdb1048a4718491676fa0734a | |
parent | 3ce3fe19b11e30fd98d7eee06d56b90ae33b228d (diff) | |
download | nixos-f9810413c6aff247b63d8321812a98f204eb0b49.tar nixos-f9810413c6aff247b63d8321812a98f204eb0b49.tar.gz nixos-f9810413c6aff247b63d8321812a98f204eb0b49.tar.bz2 nixos-f9810413c6aff247b63d8321812a98f204eb0b49.tar.xz nixos-f9810413c6aff247b63d8321812a98f204eb0b49.zip |
...
5 files changed, 18 insertions, 7 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml b/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml index 880e6614..8c5082a1 100644 --- a/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml +++ b/accounts/gkleen@sif/shell/quickshell/Lockscreen.qml | |||
@@ -70,6 +70,10 @@ Scope { | |||
70 | mode: Custom.SystemdInhibitorParams.Delay | 70 | mode: Custom.SystemdInhibitorParams.Delay |
71 | } | 71 | } |
72 | 72 | ||
73 | Bindings { | ||
74 | NotificationManager.lockscreenActive: lock.locked | ||
75 | } | ||
76 | |||
73 | WlSessionLock { | 77 | WlSessionLock { |
74 | id: lock | 78 | id: lock |
75 | 79 | ||
diff --git a/accounts/gkleen@sif/shell/quickshell/NotificationDisplay.qml b/accounts/gkleen@sif/shell/quickshell/NotificationDisplay.qml index a727b044..03406687 100644 --- a/accounts/gkleen@sif/shell/quickshell/NotificationDisplay.qml +++ b/accounts/gkleen@sif/shell/quickshell/NotificationDisplay.qml | |||
@@ -15,7 +15,7 @@ Scope { | |||
15 | id: notifsRepeater | 15 | id: notifsRepeater |
16 | 16 | ||
17 | model: ScriptModel { | 17 | model: ScriptModel { |
18 | values: NotificationManager.displayInhibited ? [] : NotificationManager.groups | 18 | values: NotificationManager.active ? [] : NotificationManager.groups |
19 | } | 19 | } |
20 | 20 | ||
21 | delegate: PanelWindow { | 21 | delegate: PanelWindow { |
diff --git a/accounts/gkleen@sif/shell/quickshell/NotificationInhibitorWidget.qml b/accounts/gkleen@sif/shell/quickshell/NotificationInhibitorWidget.qml index 1005182a..26ac4bde 100644 --- a/accounts/gkleen@sif/shell/quickshell/NotificationInhibitorWidget.qml +++ b/accounts/gkleen@sif/shell/quickshell/NotificationInhibitorWidget.qml | |||
@@ -41,8 +41,13 @@ Item { | |||
41 | implicitSize: 14 | 41 | implicitSize: 14 |
42 | anchors.centerIn: parent | 42 | anchors.centerIn: parent |
43 | 43 | ||
44 | icon: NotificationManager.displayInhibited ? "message-off" : "message" | 44 | icon: NotificationManager.active ? "message" : "message-off" |
45 | color: NotificationManager.displayInhibited ? "white" : "#555" | 45 | color: { |
46 | if (!NotificationManager.active && !NotificationManager.displayInhibited) | ||
47 | return "#f28a21"; | ||
48 | if (NotificationManager.displayInhibited) | ||
49 | return "white"; | ||
50 | return "#555"; | ||
46 | } | 51 | } |
47 | } | 52 | } |
48 | } | 53 | } |
@@ -64,7 +69,7 @@ Item { | |||
64 | sourceComponent: PopupWindow { | 69 | sourceComponent: PopupWindow { |
65 | id: tooltip | 70 | id: tooltip |
66 | 71 | ||
67 | property bool nextVisible: !NotificationManager.displayInhibited && (widgetMouseArea.containsMouse || tooltipMouseArea.containsMouse) | 72 | property bool nextVisible: NotificationManager.active && (widgetMouseArea.containsMouse || tooltipMouseArea.containsMouse) |
68 | 73 | ||
69 | anchor { | 74 | anchor { |
70 | item: widgetMouseArea | 75 | item: widgetMouseArea |
diff --git a/accounts/gkleen@sif/shell/quickshell/Services/NotificationManager.qml b/accounts/gkleen@sif/shell/quickshell/Services/NotificationManager.qml index 2199ccdf..001ffcf5 100644 --- a/accounts/gkleen@sif/shell/quickshell/Services/NotificationManager.qml +++ b/accounts/gkleen@sif/shell/quickshell/Services/NotificationManager.qml | |||
@@ -7,6 +7,8 @@ import Quickshell.Services.Notifications | |||
7 | Singleton { | 7 | Singleton { |
8 | id: root | 8 | id: root |
9 | 9 | ||
10 | readonly property bool active: !lockscreenActive && !displayInhibited | ||
11 | property bool lockscreenActive: false | ||
10 | property bool displayInhibited: false | 12 | property bool displayInhibited: false |
11 | property alias trackedNotifications: server.trackedNotifications | 13 | property alias trackedNotifications: server.trackedNotifications |
12 | readonly property var groups: { | 14 | readonly property var groups: { |
@@ -68,7 +70,7 @@ Singleton { | |||
68 | required property int expirationTime | 70 | required property int expirationTime |
69 | property list<QtObject> data: [ | 71 | property list<QtObject> data: [ |
70 | Timer { | 72 | Timer { |
71 | running: !root.displayInhibited | 73 | running: root.active |
72 | interval: timer.expirationTime | 74 | interval: timer.expirationTime |
73 | onTriggered: timer.parent.expire() | 75 | onTriggered: timer.parent.expire() |
74 | } | 76 | } |
diff --git a/accounts/gkleen@sif/shell/quickshell/UnixIPC.qml b/accounts/gkleen@sif/shell/quickshell/UnixIPC.qml index e19ccfb1..05a40dbc 100644 --- a/accounts/gkleen@sif/shell/quickshell/UnixIPC.qml +++ b/accounts/gkleen@sif/shell/quickshell/UnixIPC.qml | |||
@@ -84,12 +84,12 @@ Scope { | |||
84 | Component.onCompleted: { (_ => {})(MprisProxy.players); } | 84 | Component.onCompleted: { (_ => {})(MprisProxy.players); } |
85 | 85 | ||
86 | function onCommandNotifications(command) { | 86 | function onCommandNotifications(command) { |
87 | if (command.DismissGroup && !NotificationManager.displayInhibited) { | 87 | if (command.DismissGroup && NotificationManager.active) { |
88 | if (NotificationManager.groups.length > 0) | 88 | if (NotificationManager.groups.length > 0) |
89 | for (const notif of [...NotificationManager.groups[0]]) | 89 | for (const notif of [...NotificationManager.groups[0]]) |
90 | notif.dismiss(); | 90 | notif.dismiss(); |
91 | } | 91 | } |
92 | if (command.DismissAll && !NotificationManager.displayInhibited) { | 92 | if (command.DismissAll && NotificationManager.active) { |
93 | for (const notif of [...NotificationManager.trackedNotifications.values]) | 93 | for (const notif of [...NotificationManager.trackedNotifications.values]) |
94 | notif.dismiss(); | 94 | notif.dismiss(); |
95 | } | 95 | } |