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>
21 lines
915 B
QML
21 lines
915 B
QML
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: 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: shellOwned ? NotificationService.dnd : !!info.enabled
|
|
enabled: shellOwned || (!!info.available && !SystemService.acting)
|
|
onClicked: shellOwned ? NotificationService.setDnd(!NotificationService.dnd) : SystemService.action("dnd", !info.enabled, false)
|
|
}
|