问题描述
通知中的Layout cases | Ubuntu App Developer文档说明了这一点
… using non-existing (stock-)icon-names … use one of the new icon-name (see icons) …
并且这个(http://wiki.ubuntu.com/mhall119/devportal/notify-osd#icons上的图标)仅通过示例进行随意参考
... -i notification-message-im
... -i notification-network-wireless-disconnected
想必
... -i notification-network-wireless-connected
也是一个?通过确认:(有趣的图标)
notify-send "WiFi icon test" -i notification-network-wireless-connected
那还有什么?
(请注意,源代码中的icons
链接:wiki.ubuntu.com/mhall119/devportal/notidy-osd#icons错误拼写通知为notidy)
作为这个答案的含义的结果:
Where are the stock-icon-names defined for the unity-panel-service indicators and notify-OSD?
然后可以在此处找到上述示例中的图标: – file:///usr/share/notify-osd/icons/gnome/scalable/status/
– file:///usr/share/notify-osd/icons/hicolor/scalable/status/
但是,虽然没有名为notification-network-wireless-connected
的图标文件,但字符串显示notification-network-wireles.svg
,notification-network-wireless-gobledeegook
也是如此!
书签:stock-icon-names在哪里为unity-panel-service指标和notify-OSD定义?
最佳解决思路
notify-send
使用/usr/share/icons/gnome/32x32
(以及/usr/share/notify-osd/icons/...
)中的图标
devav2@devav2:/usr/share/icons/gnome/32x32$ ls
actions apps devices emotes places
animations categories emblems mimetypes status
以上结果是notify-send
可用的不同图标集
devav2@devav2:/usr/share/icons/gnome/32x32$ ls emotes/
face-angel.png face-sad.png stock_smiley-13.png
face-angry.png face-sick.png stock_smiley-15.png
face-cool.png face-smile-big.png stock_smiley-18.png
face-crying.png face-smile.png stock_smiley-1.png
face-devilish.png face-smirk.png stock_smiley-22.png
face-embarrassed.png face-surprise.png stock_smiley-2.png
face-glasses.png face-tired.png stock_smiley-3.png
face-kiss.png face-uncertain.png stock_smiley-4.png
face-laugh.png face-wink.png stock_smiley-5.png
face-monkey.png face-worried.png stock_smiley-6.png
face-plain.png stock_smiley-10.png stock_smiley-7.png
face-raspberry.png stock_smiley-11.png stock_smiley-8.png
例:
notify-send -i face-glasses "I am wearing glasses"
notify-send -i face-laugh "I am happy"
您也可以使用其他目录中的股票图标(设备,地点等)
除此之外,您还可以使用自定义位置图标
示例:notify-send -i /usr/share/pixmaps/gnome-irc.png "Icon Test"
次佳解决思路
我不知道它们是否以硬盘中的某个列表格式找到,但是网上有一个列表:
https://specifications.freedesktop.org/icon-naming-spec/latest/ar01s04.html
参考资料