diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-11 21:39:29 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-08-11 21:39:29 +1000 |
| commit | 202d502d2daaf18779842abe7020e400de769cea (patch) | |
| tree | ecee546961540b690ae9c4bc9bc678b5c77bb8ab /modules/lock/NotifDock.qml | |
| parent | lock/fetch: shell -> uptime + no qsTr (diff) | |
| download | caelestia-shell-202d502d2daaf18779842abe7020e400de769cea.tar.gz caelestia-shell-202d502d2daaf18779842abe7020e400de769cea.tar.bz2 caelestia-shell-202d502d2daaf18779842abe7020e400de769cea.zip | |
lock: add notifs
Diffstat (limited to 'modules/lock/NotifDock.qml')
| -rw-r--r-- | modules/lock/NotifDock.qml | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/modules/lock/NotifDock.qml b/modules/lock/NotifDock.qml new file mode 100644 index 0000000..c2ba2a7 --- /dev/null +++ b/modules/lock/NotifDock.qml @@ -0,0 +1,80 @@ +import qs.components +import qs.components.containers +import qs.services +import qs.config +import Quickshell +import Quickshell.Widgets +import QtQuick +import QtQuick.Layouts + +ColumnLayout { + id: root + + anchors.fill: parent + anchors.margins: Appearance.padding.large + + spacing: Appearance.spacing.smaller + + StyledText { + Layout.fillWidth: true + text: qsTr("%1 notification%2").arg(Notifs.list.length || "No").arg(Notifs.list.length === 1 ? "" : "s") + color: Colours.palette.m3outline + elide: Text.ElideRight + } + + ClippingRectangle { + Layout.fillWidth: true + Layout.fillHeight: true + + radius: Appearance.rounding.small + color: "transparent" + + StyledListView { + anchors.fill: parent + + spacing: Appearance.spacing.small + clip: true + + model: ScriptModel { + values: [...new Set(Notifs.list.map(notif => notif.appName))].reverse() + } + + delegate: NotifGroup {} + + add: Transition { + Anim { + property: "opacity" + from: 0 + to: 1 + } + Anim { + property: "scale" + from: 0 + to: 1 + duration: Appearance.anim.durations.expressiveDefaultSpatial + easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial + } + } + + move: Transition { + Anim { + property: "y" + } + } + + displaced: Transition { + Anim { + property: "y" + duration: Appearance.anim.durations.expressiveDefaultSpatial + easing.bezierCurve: Appearance.anim.curves.expressiveDefaultSpatial + } + } + } + } + + component Anim: NumberAnimation { + duration: Appearance.anim.durations.normal + easing.type: Easing.BezierSpline + easing.bezierCurve: Appearance.anim.curves.standard + } +} |