From 8087086bc0a996e7dc020ba8bcf1332dd843f034 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 15 Sep 2026 18:31:30 +0200 Subject: fix(notify): route icon-like content images to the app-icon slot Clients like kitty, mail and opencode send their icon through the content-image hint, so it drew as a large balloon preview. A theme-name source, an SVG, or a raster small on both sides now fills the app-icon slot instead; a larger raster (a screenshot) stays the preview. An app_icon already present keeps the slot. --- internal/notify/service.go | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'internal/notify/service.go') diff --git a/internal/notify/service.go b/internal/notify/service.go index 86918d4..a2bf103 100644 --- a/internal/notify/service.go +++ b/internal/notify/service.go @@ -120,7 +120,16 @@ func (s *Service) Notify(appName string, replacesID uint32, appIcon, summary, bo if r, ok := ImageDataFromHints(hints); ok { raw = r } else if path, ok := ImagePathFromHints(hints); ok { - n.Image = ResolveIcon(path) + resolved := ResolveIcon(path) + // An icon-like content image (a theme name, an SVG, a small raster) is + // the app icon clients like kitty send through this hint; a larger + // raster is a screenshot and stays the balloon preview. An app_icon + // already provided keeps the slot. + if IsIconImage(path, resolved) && n.Icon == "" { + n.Icon = resolved + } else { + n.Image = resolved + } } else if r, ok := IconDataFromHints(hints); ok { raw = r } -- cgit v1.2.3