feat: add notification module with functionality to display notifications on focused monitor with a NotificationServer as Singleton

This commit is contained in:
Hannes
2026-08-25 01:00:52 +02:00
parent b9a455347d
commit 0b20e8eb85
6 changed files with 215 additions and 0 deletions
+69
View File
@@ -0,0 +1,69 @@
import QtQuick
import Quickshell
import "../../config"
Rectangle {
id: root
required property var notification
Component.onCompleted: {
console.log(
"[NotificationBody]:",
notification,
"notification:",
notification.appName
)
}
implicitWidth: parent ? parent.width : 300
implicitHeight: content.implicitHeight + 20
color: "transparent"
border.width: Config.border_width
border.color: Colors.primary
Column {
id: content
anchors.fill: parent
anchors.margins: 10
spacing: 5
Text {
width: parent.width
text: root.notification?.appName ?? ""
font.family: Config.font
font.pixelSize: 18
color: Colors.primary
elide: Text.ElideRight
}
Text {
width: parent.width
text: root.notification?.summary ?? ""
font.family: Config.font
font.pixelSize: 22
color: Colors.primary
wrapMode: Text.Wrap
}
Text {
width: parent.width
text: root.notification?.body ?? ""
font.family: Config.font
font.pixelSize: 16
color: Colors.primary
wrapMode: Text.Wrap
}
}
}