diff --git a/default/quickshell/omarchy-shell/Commons/Color.qml b/default/quickshell/omarchy-shell/Commons/Color.qml index f9521c54..fc3d35ec 100644 --- a/default/quickshell/omarchy-shell/Commons/Color.qml +++ b/default/quickshell/omarchy-shell/Commons/Color.qml @@ -119,8 +119,8 @@ QtObject { var match = String(raw || "").match(/\$activeBorderColor\s*=\s*rgba?\(([0-9A-Fa-f]{6,8})\)/) if (!match) { border = accent; return } var hex = match[1] - // rgba() in hyprland is AARRGGBB; strip the AA prefix and use the RGB. - if (hex.length === 8) hex = hex.substring(2) + // Hyprland rgba() is RRGGBBAA; strip the AA suffix and use RGB. + if (hex.length === 8) hex = hex.substring(0, 6) border = "#" + hex } diff --git a/default/quickshell/omarchy-shell/plugins/notifications/Service.qml b/default/quickshell/omarchy-shell/plugins/notifications/Service.qml index 6e35f3c5..90887dfd 100644 --- a/default/quickshell/omarchy-shell/plugins/notifications/Service.qml +++ b/default/quickshell/omarchy-shell/plugins/notifications/Service.qml @@ -43,6 +43,7 @@ Item { // } // All keys optional; unset keys fall back to the live Color.* tokens. readonly property string themeOverridePath: home + "/.config/omarchy/current/theme/notifications.json" + readonly property string themeNamePath: home + "/.config/omarchy/current/theme.name" // Corner radius is shared with omarchy-shell menu and settings panel — // `omarchy style corners ` writes this file once and every @@ -84,7 +85,9 @@ Item { property string overrideText: "" property string overrideCountdown: "" - readonly property color effectiveBorder: overrideBorder.length > 0 ? overrideBorder : Color.border + // Match the compact mako-style layout, but keep colors live-bound to the + // current Omarchy theme unless a theme explicitly ships notifications.json. + readonly property color effectiveBorder: overrideBorder.length > 0 ? overrideBorder : Color.accent readonly property color effectiveBackground: overrideBackground.length > 0 ? overrideBackground : Color.background readonly property color effectiveText: overrideText.length > 0 ? overrideText : Color.foreground readonly property color effectiveCountdown: overrideCountdown.length > 0 ? overrideCountdown : Color.accent @@ -105,6 +108,7 @@ Item { } FileView { + id: themeOverrideFile path: service.themeOverridePath watchChanges: true printErrors: false @@ -113,6 +117,18 @@ Item { onFileChanged: reload() } + // Theme switching recreates ~/.config/omarchy/current/theme, which can leave + // the notifications.json watcher attached to the old symlink target. Watch + // theme.name (overwritten in place) as the stable tripwire and force a fresh + // override reload; if the new theme has no override, onLoadFailed clears the + // old colors instead of leaving stale theme-specific notification styling. + FileView { + path: service.themeNamePath + watchChanges: true + printErrors: false + onFileChanged: themeOverrideFile.reload() + } + // Fired by IPC (`omarchy-shell-ipc notifications showHistory`) so the // bar widget can drop its PopupCard from the same anchor a click would. signal historyOpenRequested() diff --git a/default/quickshell/omarchy-shell/plugins/notifications/components/NotificationCard.qml b/default/quickshell/omarchy-shell/plugins/notifications/components/NotificationCard.qml index 559f2b72..c004f9b3 100644 --- a/default/quickshell/omarchy-shell/plugins/notifications/components/NotificationCard.qml +++ b/default/quickshell/omarchy-shell/plugins/notifications/components/NotificationCard.qml @@ -90,7 +90,7 @@ Rectangle { // Add 2 * border.width so mainColumn (inset by border.width on top/left/right) // doesn't push content under the bottom edge. The bottom edge is also inset // for symmetry except when the progress bar replaces it. - implicitHeight: mainColumn.implicitHeight + border.width * 2 + (showProgress ? 3 : 0) + implicitHeight: mainColumn.implicitHeight + border.width * 2 radius: cornerRadius color: backgroundColorOverride border.color: urgency === 2 ? Color.urgent : borderColorOverride @@ -174,7 +174,7 @@ Rectangle { // Hide the slot when the icon failed to resolve (themed-icon name // not in the user's icon theme) AND we don't have a glyph fallback // — prevents rendering Qt's pink broken-image placeholder. - visible: root.hasSmallIcon && (root.hasGlyph || smallIconImage.status !== Image.Error) + visible: false Image { id: smallIconImage @@ -244,7 +244,7 @@ Rectangle { anchors.bottom: parent.bottom height: 3 color: root.borderColorOverride - visible: root.showProgress + visible: false Rectangle { anchors.left: parent.left