aboutsummaryrefslogtreecommitdiffstats
path: root/home/quickshell/bar/blocks/Notifications.qml
diff options
context:
space:
mode:
Diffstat (limited to 'home/quickshell/bar/blocks/Notifications.qml')
-rw-r--r--home/quickshell/bar/blocks/Notifications.qml34
1 files changed, 34 insertions, 0 deletions
diff --git a/home/quickshell/bar/blocks/Notifications.qml b/home/quickshell/bar/blocks/Notifications.qml
new file mode 100644
index 0000000..3871cc4
--- /dev/null
+++ b/home/quickshell/bar/blocks/Notifications.qml
@@ -0,0 +1,34 @@
+import QtQuick
+import Quickshell.Services.Notifications
+import "../"
+
+BarBlock {
+ id: root
+ property bool showNotification: false
+
+ text: " " + notifServer.trackedNotifications.values.length
+ onClicked: function() {
+ showNotification = !showNotification
+ }
+
+ NotificationServer {
+ id: notifServer
+ onNotification: (notification) => {
+ notification.tracked = true
+ }
+ }
+
+ NotificationPanel {
+ text_color: root.color
+ visible: showNotification
+
+ anchors {
+ top: parent.top
+ }
+
+ margins {
+ top: 10
+ }
+ }
+}
+