dunst icon indicating copy to clipboard operation
dunst copied to clipboard

Use font glpys as icons

Open lag00n opened this issue 3 years ago • 3 comments

I'm looking to use a font glyph as a icon on my notifications... Is that possible?

For example, using the clock glyph on siji font as a --icon argument on notify-send.

lag00n avatar Apr 11 '22 01:04 lag00n

It's not directly possible. With dunstify you can only specify an icon path or icon name that corresponds to an icon of a supported format (png, svg, etc). You could render the glyph to one of these formats and pass it to dunst, though.

fwsmit avatar Apr 12 '22 17:04 fwsmit

I'm currently using this imagemagick as a workaround... That will generate a .png with the desired glyph on place of "E".

magick -size 128x128 xc:transparent -fill white -font 'ZrnicRg-Regular' -pointsize 128 -draw 'gravity center text 0 0 "E"' /tmp/test.png

You can change the size, the color and the font too, it's all up to you.

lag00n avatar Apr 12 '22 20:04 lag00n

Great, I made this a feature request for Dunst to implement natively. This could be done with dunstify passing a raw icon rendered from the font glyph. But don't expect it to be implemeted any time soon

fwsmit avatar Apr 13 '22 13:04 fwsmit