怎么找到.desktop文件使用的图标
Tofloor
poster avatar
billy123456
deepin
2017-08-16 21:05
Author
.desktop文件的Icon属性通常不是绝对路径,文管找到图标用的是什么算法?
Reply Favorite View the author
All Replies
billy123456
deepin
2017-08-16 23:31
#1
没人就自顶

Reply View the author
zhangjide
deepin
2017-08-16 23:46
#2
往往在路径: /usr/share/applications 和 ~/.local/share/applications
Reply View the author
billy123456
deepin
2017-08-16 23:51
#3
https://bbs.deepin.org/post/144266
往往在路径: /usr/share/applications 和 ~/.local/share/applications

billy@billy-Vostro-1220:/usr/share/icons$ find -name plank.svg
./hicolor/48x48/apps/plank.svg
./hicolor/32x32/apps/plank.svg
./hicolor/16x16/apps/plank.svg
./hicolor/64x64/apps/plank.svg
./hicolor/24x24/apps/plank.svg
./hicolor/128x128/apps/plank.svg
./hicolor/22x22/apps/plank.svg
billy@billy-Vostro-1220:/usr/share/icons$
是那个?我希望知道文管的算法
Reply View the author
billy123456
deepin
2017-08-16 23:53
#4
或者有没有bash语言的算法
Reply View the author
zhangjide
deepin
2017-08-17 00:55
#5
https://bbs.deepin.org/post/144266
billy@billy-Vostro-1220:/usr/share/icons$ find -name plank.svg
./hicolor/48x48/apps/plank.svg
./hi ...

看错了,/usr/share/applications是存放程序的desktop文件的位置。
图标是在各个主题包中,也就是 /usr/share/icons 下的各个目录,还有个 ~/.local/share/icons
图标查找的算法有点复杂,是根据当前设定的主题到每个主题包中查找,主题之间还可以有继承关系
Reply View the author
zhangjide
deepin
2017-08-17 00:57
#6
Reply View the author
Lyvnee
deepin
2017-08-17 01:21
#7
图标放下面路径就可以:
/usr/share/icons/hicolor/scalable/apps
Reply View the author
billy123456
deepin
2017-08-17 04:18
#8
https://bbs.deepin.org/post/144266
https://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html 这个是遵循的标准 ...

但是它这个不知道是什么语言的
  if theme has parents
不知到什么意思
Reply View the author
electricface
deepin
2017-08-17 06:06
#9
表示主题可以继承其他主题,伪代码
Reply View the author
billy123456
deepin
2017-08-17 17:05
#10
https://bbs.deepin.org/post/144266
表示主题可以继承其他主题,伪代码

怎么找到它继承什么主题?
Reply View the author
zhangjide
deepin
2017-08-17 17:29
#11
https://bbs.deepin.org/post/144266
怎么找到它继承什么主题?

主题目录下有个:index.theme文件,例如:/usr/share/icons/deepin/index.theme
Reply View the author
billy123456
deepin
2017-08-17 18:54
#12
本帖最后由 billy123456 于 2017-8-17 10:55 编辑
https://bbs.deepin.org/post/144266
主题目录下有个:index.theme文件,例如:/usr/share/icons/deepin/index.theme

这个index.theme怎么看呢
  1. [Icon Theme]
  2. Name=DMZ (White)
  3. Comment=White accessible cursor theme
  4. Name[ar]=DMZ (أبيض)
  5. Name[bg]=DMZ (Бял цвят)
  6. Name[ca]=DMZ (Blanc)
  7. Name[cs]=DMZ (Bílá)
  8. Name[da]=DMZ (Hvid)
  9. Name[de]=DMZ (Weiß)
  10. Name[dz]=DMZ (དཀར་པོ།)
  11. Name[el]=DMZ (Λευκό)
  12. Name[en_CA]=DMZ (White)
  13. Name[en_GB]=DMZ (White)
  14. Name[eo]=DMZ (Blanko)
  15. Name[es]=DMZ (Blanco)
  16. Name[et]=DMZ (Valge)
  17. Name[eu]=DMZ (Zuria)
  18. Name[fi]=DMZ (Valkoinen)
  19. Name[fr]=DMZ (Blanc)
  20. Name[ga]=DMZ (Bán)
  21. Name[gl]=DMZ (Branco)
  22. Name[gu]=DMZ (સફેદ)
  23. Name[he]=DMZ (לבן)
  24. Name[hr]=DMZ (Bijela)
  25. Name[hu]=DMZ (Fehér)
  26. Name[id]=DMZ ()
  27. Name[it]=DMZ (Bianco)
  28. Name[ja]=DMZ (白)
  29. Name[km]=DMZ (ស)
  30. Name[ko]=DMZ (흰색)
  31. Name[lt]=DMZ (Baltas)
  32. Name[mk]=DMZ (Бела)
  33. Name[ms]=DMZ (Putih)
  34. Name[nb]=DMZ (Hvit)
  35. Name[ne]=DMZ (सेतो)
  36. Name[nl]=DMZ (Wit)
  37. Name[pa]=DMZ (ਸਫੈਦ)
  38. Name[pl]=DMZ (Białe)
  39. Name[pt_BR]=DMZ (Branco)
  40. Name[pt]=DMZ (Branco)
  41. Name[ro]=DMZ (Alb)
  42. Name[ru]=DMZ (Белое)
  43. Name[rw]=DMZ (Umweru)
  44. Name[sk]=DMZ (Biely)
  45. Name[sr@Latn]=DMZ (Bela)
  46. Name[sr]=DMZ (Бела)
  47. Name[sv]=DMZ (Vit)
  48. Name[tr]=DMZ (Beyaz)
  49. Name[tt]=DMZ (Aq)
  50. Name[uk]=DMZ (Біле)
  51. Name[vi]=DMZ (Trắng)
  52. Name[xh]=DMZ (Mhlophe)
  53. Name[yi]=DMZ ()
  54. Name[zh_CN]=DMZ (白色)
  55. Name[zh_TW]=DMZ (白色)
Copy the Code



Reply View the author
billy123456
deepin
2017-08-18 21:32
#13
怎么又没人了
Reply View the author
billy123456
deepin
2017-08-20 21:07
#14
自顶一下
Reply View the author
jingle
deepin
2017-08-20 21:52
#15
billy123456 发表于 2017-8-20 13:07
自顶一下

如何看需要自己摸索下。
Reply View the author