From 63e81369c299c5641f7743a31028e3fb3f2eebc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Zanghelini?= Date: Thu, 9 Oct 2025 23:08:25 -0300 Subject: [PATCH] Show notification indicator on "tray" --- .../quickshell/ii/modules/bar/BarContent.qml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/.config/quickshell/ii/modules/bar/BarContent.qml b/.config/quickshell/ii/modules/bar/BarContent.qml index 4f538e1cc..818800021 100644 --- a/.config/quickshell/ii/modules/bar/BarContent.qml +++ b/.config/quickshell/ii/modules/bar/BarContent.qml @@ -295,6 +295,40 @@ Item { // Bar content region Layout.rightMargin: indicatorsRowLayout.realSpacing color: rightSidebarButton.colText } + Revealer { + reveal: Notifications.silent || Notifications.list.length > 0 + Layout.fillHeight: true + Layout.rightMargin: reveal ? indicatorsRowLayout.realSpacing : 0 + implicitHeight: reveal ? notificationIcon.implicitHeight : 0 + implicitWidth: reveal ? notificationIcon.implicitWidth : 0 + Behavior on Layout.rightMargin { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + Rectangle { + visible: !Notifications.silent + anchors.right: parent.right + radius: Appearance.rounding.full + color: Appearance.colors.colLayer0 + z: 1 + + implicitHeight: Math.max(notificationCounterText.implicitWidth, notificationCounterText.implicitHeight) + implicitWidth: Math.max(notificationCounterText.implicitWidth, notificationCounterText.implicitHeight) + + StyledText { + id: notificationCounterText + anchors.centerIn: parent + font.pixelSize: Appearance.font.pixelSize.smallest + color: Appearance.colors.colOnLayer1 + text: Notifications.list.length + } + } + MaterialSymbol { + id: notificationIcon + text: Notifications.silent ? "notifications_paused" : "notifications" + iconSize: Appearance.font.pixelSize.larger + color: rightSidebarButton.colText + } + } MaterialSymbol { Layout.rightMargin: indicatorsRowLayout.realSpacing text: Network.materialSymbol