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) }