Notifications n shi
This commit is contained in:
28
Panes/Notifications.qml
Normal file
28
Panes/Notifications.qml
Normal file
@@ -0,0 +1,28 @@
|
||||
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"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user