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>
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user