gen2brain / beeep

Go cross-platform library for sending desktop notifications, alerts and beeps
BSD 2-Clause "Simplified" License
1.43k stars 89 forks source link

Support for supplying image-data as a blob #27

Open muesli opened 5 years ago

muesli commented 5 years ago

Would be nice if beeep offered a way to supply raw image data as a blob.

gen2brain commented 5 years ago

I think it is only possible on Linux, but will need to check, I remember it was possible to send image-data as a hint, which contains raw data. For Windows and macOS don't think there is a way.

muesli commented 5 years ago

I guess we could generate a temporary file that gets deleted again when the notification expires on other platforms. Frankly though, I'm not sure where I'd rather implement that. In a central place like beeep, which probably knows best how to handle image data in a cross platform fashion and when the notifications expire - or in each individual app separately.

I guess I can see good arguments for both sides.

gen2brain commented 5 years ago

It seems that both Linux and Web can work with bytes, so that is like 50% so I guess it makes sense to handle bytes here. Not sure what is the best approach, to make appIcon an interface? For actions, I thought something like NotifyWithActions or similar can work but this is a different case.