查看所有可用的唯一图标列表及其名称和缩略图

我想看看我的系统上安装和可用的图标以及我必须引用它们的名称。

如何获得所有独特图标(不显示多个分辨率)的格式良好的列表,其中包含图标名称,预览缩略图,位置以及可能的位置(例如,哪个图标主题包)?

系统: Ubuntu 15.10 Wily Werewolf 64位
桌面: Unity

gtk3-icon-browser是一个列出主题图标的图形应用程序。

到目前为止,它仍处于开发阶段,可用于生动和较新版本的gtk-3-examples软件包。 它的发展可以追溯到2014年的博客文章 。

浏览基本的Xfce黑暗图标

gtk3-icon-browser在Xubuntu 15.04上正常

gtk3-icon-browser Xubuntu 15.04上的符号

快速复审

  • 格式精美的所有独特图标列表:是1
  • 包含图标名称:是
  • 预览缩略图:是的
  • 图标位置:否2
  • 图标主题来源:是3

1默认情况下,此工具将显示为图标视图(无法更改为列表视图)。 双击每个图标将显示该图标的所有可用分辨率。

gtk3-icon-browser符号双击图标

2此工具很可能会查看/usr/share/icons目录(不提及每个图标的位置),并根据图标命名规范提取其他信息。

3此工具仅显示当前主题的图标。 要显示其他主题的图标,请将外观从当前主题更改为另一个主题。

浏览人性黑暗图标(带弹出对话框)

gtk3-icon-browser人性黑暗的图标

要求

  • GTK + 3.13.4或更新版本
  • 在15.04(Vivid)或更新版本中安装gtk-3-examples

如何安装

 sudo apt-get install gtk-3-examples 

怎么跑

 gtk3-icon-browser 

测试使用GTK + 3.14.13(此答案日期的最新版本)在Xubuntu 15.04上工作。

相关来源

  1. GitHub上GNOME / gtk的master的gtk / demos源代码 。

  2. 在Fedora杂志上开发的GTK +开发人员的新图标浏览器工具

  3. 在Ask Ubuntu的这个答案中简要提到屏幕截图。

好吧,当你试图改变某些东西的图标时,有些DE显示了这一点,但是很容易自己做。 只需找到所有图标,在某个目录中链接到它们并浏览目录。 不同分辨率的图标将具有相同的名称,路径会发生什么变化。 例如:

 $ find /usr/share/icons/ -name '*emacs.*' /usr/share/icons/hicolor/16x16/apps/emacs.png /usr/share/icons/hicolor/48x48/apps/emacs.png /usr/share/icons/hicolor/scalable/apps/emacs.svg /usr/share/icons/hicolor/128x128/apps/emacs.png /usr/share/icons/hicolor/32x32/apps/emacs.png /usr/share/icons/hicolor/24x24/apps/emacs.png /usr/share/icons/Mint-X/apps/96/emacs.svg /usr/share/icons/Mint-X/apps/16/emacs.png /usr/share/icons/Mint-X/apps/24/emacs.png /usr/share/icons/Mint-X/apps/48/emacs.png /usr/share/icons/Mint-X/apps/32/emacs.png /usr/share/icons/Mint-X/apps/22/emacs.png 

如上所示,常规格式为/ParentDir/ThemeName/CLass/Resolution/IconName 。 因此,由于图标的名称相同,我们可以通过创建每个链接覆盖任何现有的同名链接来轻松避免重复。 但是,我们确实希望将不同主题的图标分开,因此需要更多脚本:

 #!/usr/bin/env bash ## Create the target directory mkdir -p ~/foo ## Iterate over all files/dirs in the target locations for i in ~/.icons/* /usr/share/icons/* /usr/share/pixmaps/*; do ## find all icon files in this directory. If the current $i ## is not a directory, find will just print its path directly. find "$i" -name '*xpm' -o -name '*.svg' -o -name '*png' | ## Iterate over find's results while read ico; do ## Make the link. ${var##*/} will print the ## basename of $var, without the path. Here, I use ## it both to get the theme name (${i##*/}) and the ## icon's name (${ico##*/}). ln -sf "$ico" "${i##*/}"_"${ico##*/}" done done 

上面的脚本将创建目录~/foo ,其中包含指向每个独特图标文件的链接。 ln-f选项告诉它覆盖具有相同名称的现有文件,因为我们在链接名称中使用主题名称,所以不应该重复。 例如,给定上面显示的emacs.png图标,它将创建:

 hicolor_emacs.png -> /usr/share/icons/hicolor/48x48/apps/emacs.png Mint-X_emacs.png -> /usr/share/icons/Mint-X/apps/22/emacs.png 

您现在可以浏览~/foo并查看:

在此处输入图像描述

然后,要获取源包,您可以运行:

 for i in ~/foo/*; do dpkg -S $(readlink -f "$i"); done