Closed maximbaz closed 2 years ago
Nice suggestion, thanks! Should be a pretty low hanging fruit for us to implement, too.
I'm also not sure why some avatar files start with contact-
and other with profile-
. Asked upstream. In practice, scli
can check existence for both, and use whichever it finds.
In addition to the steps you describe, we can add a 'generic icon name' fallback, using one of the stock icon names (like mail-message-new
) from the freedesktop spec. I remember checking them for this purpose sometime back, but I guess I found them too "90s" looking :). And the users who really wanted a scli
icon in notifications could add it in the --notification-command
.
I agree, this is also a good approach to set default value to fallback to some existing icon!
It would be very nice to be able to get a profile picture of the sender rendered in the notification, just like Signal Desktop does.
Here's what I recommend to consider:
I can see some pics in
~/.local/share/signal-cli/avatars/contact-+<num>
and~/.local/share/signal-cli/avatars/profile-+<num>
, not quite sure what's the difference, they seem to be somewhat duplicate, and I have more orcontact-
ones.If image is not found, use hardcoded value
scli
.Change default
NOTIFICATION_COMMAND
to benotify-send -i "%i" scli '%s - %m'
(where%i
is one of the two strings above)This would achieve the following:
scli
value.scli.<ext>
picture in any of the default icon locations, and this icon would be used as a "fallback icon"scli
icon does not exist, it would be ignored bynotify-send
, i.e. the behavior would be as today, no icon.