29 lines
676 B
QML
29 lines
676 B
QML
import Quickshell
|
|
import QtQuick
|
|
import Quickshell.Services.Notifications
|
|
import "../Widgets" as Widgets
|
|
|
|
Item {
|
|
anchors {
|
|
top: parent.top
|
|
horizontalCenter: parent.horizontalCenter
|
|
}
|
|
width: 350
|
|
height: childrenRect.height
|
|
Connections {
|
|
target: notifServer
|
|
function onNotification(notif) {
|
|
if (root.up) return
|
|
background.index = 4
|
|
notifPopup.modelData = notif
|
|
root.open()
|
|
}
|
|
}
|
|
Widgets.Notification {
|
|
id: notifPopup
|
|
anchors.margins: 6
|
|
modelData: notifServer.trackedNotifications.values[0] ?? undefined
|
|
color: "transparent"
|
|
}
|
|
}
|