Files
homelab/dotfiles/quickshell/tests/NotificationCardHeadless.qml
darmanandClaude Opus 5 be98be0100 feat(quickshell): move notifications into HyprChrome
The notification daemon and popup stack now live under
HyprChrome/Widgets/Notifications and are owned by HyprChromeShell, so
popups land on the rail's monitor below its exclusive zone. Replaces
widgets/notifications; NotificationCard renders headless for tests.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-19 02:25:14 +02:00

59 lines
1.6 KiB
QML

import QtQuick
import qs.HyprChrome.Widgets.Notifications
// Offscreen render of the three urgencies, with actions, a link and a
// part-drained meter.
//
// ./tools/quickshell-preview/render.sh \
// tests/NotificationCardHeadless.qml \
// .artifacts/quickshell-preview/notifications.png 400 520
Rectangle {
width: 400
height: 520
color: "#1b1d20"
Column {
x: 20
y: 20
width: 360
spacing: 14
NotificationCard {
width: parent.width
appName: "Firefox"
summary: "Download complete"
body: "<b>nixos-26.05-x86_64.iso</b> finished — <a href=\"file:///tmp\">open folder</a>"
appIcon: "firefox"
time: "14:32"
actions: [
{ identifier: "default", text: "Open" },
{ identifier: "show", text: "Show in folder" },
{ identifier: "dismiss", text: "Dismiss" }
]
timeout: 5000
countdown: false
remaining: 0.6
}
NotificationCard {
width: parent.width
appName: "smartd"
summary: "Disk /dev/sdb reports 8 reallocated sectors"
body: "SMART attribute 5 crossed its threshold. Back up the RAID0 set on /mnt/data now."
urgency: 2
time: "14:30"
}
NotificationCard {
width: parent.width
appName: "nix"
summary: "Build finished"
urgency: 0
time: "14:28"
timeout: 5000
countdown: false
remaining: 0.2
}
}
}