From b9c8914d463d92b327d331b5884e996dd51e4762 Mon Sep 17 00:00:00 2001 From: bbedward Date: Mon, 23 Mar 2026 11:57:17 -0400 Subject: [PATCH] cli/notify: append file:// prefix for --file arguments fixes #1962 --- core/internal/notify/notify.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/internal/notify/notify.go b/core/internal/notify/notify.go index a194e257..1e42b169 100644 --- a/core/internal/notify/notify.go +++ b/core/internal/notify/notify.go @@ -6,6 +6,7 @@ import ( "os/exec" "path/filepath" "strconv" + "strings" "syscall" "github.com/godbus/dbus/v5" @@ -59,7 +60,11 @@ func Send(n Notification) error { hints := map[string]dbus.Variant{} if n.FilePath != "" { - hints["image_path"] = dbus.MakeVariant(n.FilePath) + imgPath := n.FilePath + if !strings.HasPrefix(imgPath, "file://") { + imgPath = "file://" + imgPath + } + hints["image_path"] = dbus.MakeVariant(imgPath) } obj := conn.Object(notifyDest, notifyPath)