diff --git a/.config/quickshell/ii/modules/bar/BarContent.qml b/.config/quickshell/ii/modules/bar/BarContent.qml index 978ef10b0..0ab135a50 100644 --- a/.config/quickshell/ii/modules/bar/BarContent.qml +++ b/.config/quickshell/ii/modules/bar/BarContent.qml @@ -305,17 +305,25 @@ Item { // Bar content region animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) } Rectangle { + id: notifPing visible: !Notifications.silent && Notifications.unread > 0 - anchors.right: parent.right + property bool showUnreadCount: Config.options.bar.indicators.notifications.showUnreadCount + anchors { + right: parent.right + top: parent.top + rightMargin: showUnreadCount ? 0 : 1 + topMargin: showUnreadCount ? 0 : 3 + } radius: Appearance.rounding.full color: Appearance.colors.colOnLayer0 z: 1 - implicitHeight: Math.max(notificationCounterText.implicitWidth, notificationCounterText.implicitHeight) - implicitWidth: Math.max(notificationCounterText.implicitWidth, notificationCounterText.implicitHeight) + implicitHeight: showUnreadCount ? Math.max(notificationCounterText.implicitWidth, notificationCounterText.implicitHeight) : 8 + implicitWidth: implicitHeight StyledText { id: notificationCounterText + visible: notifPing.showUnreadCount anchors.centerIn: parent font.pixelSize: Appearance.font.pixelSize.smallest color: Appearance.colors.colLayer0 diff --git a/.config/quickshell/ii/modules/common/Config.qml b/.config/quickshell/ii/modules/common/Config.qml index ea99949d5..0e28b9e87 100644 --- a/.config/quickshell/ii/modules/common/Config.qml +++ b/.config/quickshell/ii/modules/common/Config.qml @@ -198,6 +198,11 @@ Singleton { property bool useUSCS: false // Instead of metric (SI) units property int fetchInterval: 10 // minutes } + property JsonObject indicators: JsonObject { + property JsonObject notifications: JsonObject { + property bool showUnreadCount: false + } + } } property JsonObject battery: JsonObject {