AppIndicator3 – how to use custom icons

Recently I’ve updated TheTool to support also AppIndicator3 interface so it can show icon in Unity panel.   Although the documentation is not saying it, you can use absolute path to PNG image as icon-name ( apart of stock icon name).   I was trying to add application specific stock icons, but is somehow did not work well (only possibility is to use  xdg-icon-resource install --novendor --size 32  picture.png icon-name,   but python code for creating application specific icons with Gtk.IconFactory was not working for me – see this post on stackoverflow). And here is some snippet how to use AppIndicator3:

 

For platform that do not have AppIndicator3, you can still alternatively use Gtk.StatusIcon, which provides similar possibilities – here in GitHub is example – a factory function creates duck-typed wrapper – which uses either AppIndicator3 or Gtk.StatusIcon – according to what is available.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">