From eb7629c5804b75d99be717a3f401f0c15adb9029 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Mon, 19 Oct 2026 09:19:10 +0200 Subject: notifications: place, mute and DND balloons from config.json Screen and corner come from the shared config. Mute and the DND rule go through NotifyConfig.withheld, so the settings page's node check covers the same decision the balloon makes. Co-Authored-By: Claude Opus 5.5 --- notifications/Balloons.qml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'notifications/Balloons.qml') diff --git a/notifications/Balloons.qml b/notifications/Balloons.qml index 0a48510..b02099c 100644 --- a/notifications/Balloons.qml +++ b/notifications/Balloons.qml @@ -14,7 +14,8 @@ import Quickshell.Io import Quickshell.Wayland import QtQuick -// The balloon stack, bottom-right of DP-1, over conky. +// The balloon stack, in the corner and on the screen notifyd's config.json +// names (bottom-right of DP-1 by default), over conky. Scope { id: root @@ -78,9 +79,12 @@ Scope { // re-maps it. Expired entries that stay in the queue keep a // zero-height window mapped, which is harmless. visible: root.live.length > 0 - screen: Quickshell.screens.find(s => s.name === "DP-1") ?? Quickshell.screens[0] - anchors { bottom: true; right: true } - margins { bottom: 12; right: 12 } + readonly property var place: Notify.config.balloons + readonly property bool atTop: place.corner.startsWith("top") + readonly property bool atLeft: place.corner.endsWith("left") + screen: Quickshell.screens.find(s => s.name === place.screen) ?? Quickshell.screens[0] + anchors { top: atTop; bottom: !atTop; left: atLeft; right: !atLeft } + margins { top: 12; bottom: 12; left: 12; right: 12 } implicitWidth: 340 implicitHeight: column.implicitHeight color: "transparent" @@ -92,7 +96,6 @@ Scope { Column { id: column width: parent.width - anchors { bottom: parent.bottom; right: parent.right } spacing: 8 Repeater { -- cgit v1.2.3