Add native notifications with OSD-style banners and a Control Center module
glassMxrph now owns org.freedesktop.Notifications. Banners drop out of the bar like the OSD; Control Center stacks history per app like macOS Notification Center. Do Not Disturb lives in the shell and falls back to SwayNC while another daemon holds the bus name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d7f0498ba0
commit
395de70b26
17 files changed
+1132
-13
No files matched your search
@@ -2,17 +2,19 @@ import QtQuick
|
||||
import ".."
|
||||
import "../../services"
|
||||
|
||||
// Built-in notifications keep DND in the shell; SwayNC is controlled over DBus.
|
||||
CCTile {
|
||||
readonly property var info: SystemService.state.dnd || ({
|
||||
available: false
|
||||
})
|
||||
readonly property bool shellOwned: NotificationService.active
|
||||
objectName: "dndToggle"
|
||||
title: "Do Not Disturb"
|
||||
detail: !info.available ? "No SwayNC running" : info.enabled ? "On" : "Off"
|
||||
detail: shellOwned ? (NotificationService.dnd ? "On" : "Off") : !info.available ? (info.notice || "No notification server") : info.enabled ? "On" : "Off"
|
||||
glyph: ""
|
||||
fallback: "☾"
|
||||
// Shows acknowledged provider state; a failed request leaves it unchanged.
|
||||
checked: !!info.enabled
|
||||
enabled: !!info.available && !SystemService.acting
|
||||
onClicked: SystemService.action("dnd", !info.enabled, false)
|
||||
checked: shellOwned ? NotificationService.dnd : !!info.enabled
|
||||
enabled: shellOwned || (!!info.available && !SystemService.acting)
|
||||
onClicked: shellOwned ? NotificationService.setDnd(!NotificationService.dnd) : SystemService.action("dnd", !info.enabled, false)
|
||||
}
|
||||
Reference in new issue
Block a user