diff --git a/flake.nix b/flake.nix index 4bdd245..c33a922 100644 --- a/flake.nix +++ b/flake.nix @@ -81,7 +81,6 @@ rust-analyzer clippy rustfmt - libnotify ]; }; } diff --git a/modules/NotifCenter.qml b/modules/NotifCenter.qml index 0bc8549..7c3f2f8 100644 --- a/modules/NotifCenter.qml +++ b/modules/NotifCenter.qml @@ -271,7 +271,7 @@ M.HoverPanel { const ic = notifDelegate.modelData.appIcon; if (!ic) return ""; - return (ic.startsWith("/") || ic.startsWith("file://")) ? ic : Quickshell.iconPath(ic, "dialog-information"); + return ic.startsWith("/") ? ic : Quickshell.iconPath(ic, "dialog-information"); } visible: status === Image.Ready fillMode: Image.PreserveAspectFit @@ -382,7 +382,7 @@ M.HoverPanel { const ic = notifDelegate._notif?.appIcon; if (!ic) return ""; - return (ic.startsWith("/") || ic.startsWith("file://")) ? ic : Quickshell.iconPath(ic, "dialog-information"); + return ic.startsWith("/") ? ic : Quickshell.iconPath(ic, "dialog-information"); } visible: status === Image.Ready fillMode: Image.PreserveAspectFit @@ -437,7 +437,7 @@ M.HoverPanel { // Actions Row { spacing: 4 - visible: !!(notifDelegate._notif?.actions?.length) + visible: notifDelegate._notif?.actions && notifDelegate._notif.actions.length > 0 Repeater { model: notifDelegate._notif?.actions ?? [] diff --git a/modules/NotifPopup.qml b/modules/NotifPopup.qml index 493975b..e6d33bf 100644 --- a/modules/NotifPopup.qml +++ b/modules/NotifPopup.qml @@ -168,7 +168,7 @@ PanelWindow { const ic = popupItem.modelData.appIcon; if (!ic) return ""; - return (ic.startsWith("/") || ic.startsWith("file://")) ? ic : Quickshell.iconPath(ic, "dialog-information"); + return ic.startsWith("/") ? ic : Quickshell.iconPath(ic, "dialog-information"); } visible: status === Image.Ready fillMode: Image.PreserveAspectFit diff --git a/modules/Notifications.qml b/modules/Notifications.qml index a21a972..c4abc02 100644 --- a/modules/Notifications.qml +++ b/modules/Notifications.qml @@ -1,6 +1,5 @@ import QtQuick import Quickshell -import Quickshell.Services.Notifications import "." as M M.BarSection { @@ -15,8 +14,6 @@ M.BarSection { required property var bar - readonly property bool hasUrgent: M.NotifService.list.some(n => n.urgency === NotificationUrgency.Critical && n.state !== "dismissed") - M.BarIcon { icon: { if (M.NotifService.dnd) @@ -28,8 +25,7 @@ M.BarSection { } M.BarLabel { id: countLabel - label: M.NotifService.count > 0 ? String(M.NotifService.count) + (root.hasUrgent ? "!" : "") : "" - color: root.hasUrgent ? M.Theme.base08 : root.accentColor + label: M.NotifService.count > 0 ? String(M.NotifService.count) : "" anchors.verticalCenter: parent.verticalCenter transform: Scale {