aboutsummaryrefslogtreecommitdiff
path: root/quickshell/NotificationOverlay.qml
diff options
context:
space:
mode:
authorAargh Rai <aargh.rai+git@gmail.com>2026-08-06 00:29:36 +0530
committerAargh Rai <aargh.rai+git@gmail.com>2026-08-06 00:29:36 +0530
commit91a5f9790cfd4a98ee940633694fb512ecf24942 (patch)
treeb20bdd22e304234b6893e20d0ca5fbfd042f2184 /quickshell/NotificationOverlay.qml
parentced774e19c36fb3b0b33a3846e7c9cf874b0c206 (diff)
i3 > hyprland & x11 > wayland
Diffstat (limited to 'quickshell/NotificationOverlay.qml')
-rw-r--r--quickshell/NotificationOverlay.qml121
1 files changed, 0 insertions, 121 deletions
diff --git a/quickshell/NotificationOverlay.qml b/quickshell/NotificationOverlay.qml
deleted file mode 100644
index d54f8f6..0000000
--- a/quickshell/NotificationOverlay.qml
+++ /dev/null
@@ -1,121 +0,0 @@
-import Quickshell
-import Quickshell.Services.Notifications
-import Quickshell.Wayland
-import QtQuick
-
-PanelWindow {
- id: root
-
- anchors {
- top: true
- left: true
- }
-
- margins {
- top: 15
- left: 15
- }
-
- implicitWidth: 360
- implicitHeight: notificationColumn.implicitHeight
-
- color: "transparent"
- exclusiveZone: 0
-
- WlrLayershell.layer: WlrLayer.Overlay
-
- NotificationServer {
- id: server
-
- bodySupported: true
- imageSupported: false
- actionsSupported: true
-
- onNotification: notification => {
- notification.tracked = true
- }
- }
-
- Column {
- id: notificationColumn
-
- spacing: 10
-
- Repeater {
- model: server.trackedNotifications
-
- Rectangle {
- id: notification
-
- width: 360
- height: Math.max(content.implicitHeight + 24, 80)
-
- color: "#000000"
-
- border.width: 1
- border.color: "#404040"
-
- opacity: 0
-
- Behavior on y {
- NumberAnimation {
- duration: 200
- easing.type: Easing.OutCubic
- }
- }
-
- Behavior on opacity {
- NumberAnimation {
- duration: 150
- }
- }
-
- Component.onCompleted: opacity = shellRoot.dnd ? 0 : 0.8
-
- Timer {
- interval: 2000
- running: true
- repeat: false
-
- onTriggered: {
- notification.opacity = 0
- destroyTimer.start()
- }
- }
-
- Timer {
- id: destroyTimer
-
- interval: 150
- running: false
- repeat: false
-
- onTriggered: {
- modelData.dismiss()
- }
- }
-
- Column {
- id: content
-
- anchors.fill: parent
- anchors.margins: 12
-
- spacing: 4
-
- Text {
- text: modelData.summary
- color: "white"
- font.bold: true
- }
-
- Text {
- text: modelData.body
- color: "white"
- wrapMode: Text.Wrap
- }
- }
- }
- }
- }
-}