Modules are tiles on a 4-column grid, each 1x1 to 4x4 and adapting its layout to its size. Edit Controls in the panel reorders by dragging, resizes from a corner handle, removes with a badge and adds from a tray. Connectivity splits into Wi-Fi, Bluetooth and Network tiles and Audio into Sound and Microphone; right-clicking Sound extends it with output devices and a volume slider per app. Adds a Caffeine tile. Config version 2 migrates existing layouts in place. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
23 lines
973 B
QML
23 lines
973 B
QML
pragma ComponentBehavior: Bound
|
|
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: ""
|
|
page: "notifications"
|
|
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)
|
|
}
|