View list of all available unique icons with their names and thumbnail
up vote
8
down vote
favorite
I want to see what icons are installed and available on my system and by which names I have to refer to them.
How can I get a nicely formatted list of all unique icons (don't show several resolutions separately) that contains the icon name, a preview thumbnail, the location and maybe if possible where it came from (e.g. which icon theme package)?
System: Ubuntu 15.10 Wily Werewolf 64 bit
Desktop: Unity
icons
|
show 4 more comments
up vote
8
down vote
favorite
I want to see what icons are installed and available on my system and by which names I have to refer to them.
How can I get a nicely formatted list of all unique icons (don't show several resolutions separately) that contains the icon name, a preview thumbnail, the location and maybe if possible where it came from (e.g. which icon theme package)?
System: Ubuntu 15.10 Wily Werewolf 64 bit
Desktop: Unity
icons
Regarding the "finding out from which package" part: "dpkg-query -S /bin/bash" outputs the package name of the bash executable in the /bin directory (as an example how it works). With only "/bin" as an argument it would output all installed packages for all the files in the /bin directory.
– neoc
Nov 9 '15 at 11:56
2
find /usr/share/icons/ -iname '*.png' -or -iname '*.svg' -printf '%h %f %pn' | sed -r 's;^/usr/share/icons/([^/]*)/[^ ]* ;1 ;' | sort -u -k1,2 | column -t
covers most of it (except the thumbnail part), I'd say. I'm not sure how you expect to see the thumbnail in a list.
– muru
Nov 9 '15 at 12:05
@muru In a GUI window? I did not say it should be a command-line solution...
– Byte Commander
Nov 9 '15 at 12:24
@ByteCommander You didn't, but you didn't say what sort of GUI either. Do you expect us to program a GUI for you?
– muru
Nov 9 '15 at 12:26
@muru No, but I thought somebody might maybe know an already existing tool for this? I know I used something like that once, it was probably built into some XFCE function, maybe to select an icon for launchers there...
– Byte Commander
Nov 9 '15 at 12:30
|
show 4 more comments
up vote
8
down vote
favorite
up vote
8
down vote
favorite
I want to see what icons are installed and available on my system and by which names I have to refer to them.
How can I get a nicely formatted list of all unique icons (don't show several resolutions separately) that contains the icon name, a preview thumbnail, the location and maybe if possible where it came from (e.g. which icon theme package)?
System: Ubuntu 15.10 Wily Werewolf 64 bit
Desktop: Unity
icons
I want to see what icons are installed and available on my system and by which names I have to refer to them.
How can I get a nicely formatted list of all unique icons (don't show several resolutions separately) that contains the icon name, a preview thumbnail, the location and maybe if possible where it came from (e.g. which icon theme package)?
System: Ubuntu 15.10 Wily Werewolf 64 bit
Desktop: Unity
icons
icons
edited Nov 17 '15 at 11:01
user364819
asked Nov 9 '15 at 11:31
Byte Commander
62.6k26169285
62.6k26169285
Regarding the "finding out from which package" part: "dpkg-query -S /bin/bash" outputs the package name of the bash executable in the /bin directory (as an example how it works). With only "/bin" as an argument it would output all installed packages for all the files in the /bin directory.
– neoc
Nov 9 '15 at 11:56
2
find /usr/share/icons/ -iname '*.png' -or -iname '*.svg' -printf '%h %f %pn' | sed -r 's;^/usr/share/icons/([^/]*)/[^ ]* ;1 ;' | sort -u -k1,2 | column -t
covers most of it (except the thumbnail part), I'd say. I'm not sure how you expect to see the thumbnail in a list.
– muru
Nov 9 '15 at 12:05
@muru In a GUI window? I did not say it should be a command-line solution...
– Byte Commander
Nov 9 '15 at 12:24
@ByteCommander You didn't, but you didn't say what sort of GUI either. Do you expect us to program a GUI for you?
– muru
Nov 9 '15 at 12:26
@muru No, but I thought somebody might maybe know an already existing tool for this? I know I used something like that once, it was probably built into some XFCE function, maybe to select an icon for launchers there...
– Byte Commander
Nov 9 '15 at 12:30
|
show 4 more comments
Regarding the "finding out from which package" part: "dpkg-query -S /bin/bash" outputs the package name of the bash executable in the /bin directory (as an example how it works). With only "/bin" as an argument it would output all installed packages for all the files in the /bin directory.
– neoc
Nov 9 '15 at 11:56
2
find /usr/share/icons/ -iname '*.png' -or -iname '*.svg' -printf '%h %f %pn' | sed -r 's;^/usr/share/icons/([^/]*)/[^ ]* ;1 ;' | sort -u -k1,2 | column -t
covers most of it (except the thumbnail part), I'd say. I'm not sure how you expect to see the thumbnail in a list.
– muru
Nov 9 '15 at 12:05
@muru In a GUI window? I did not say it should be a command-line solution...
– Byte Commander
Nov 9 '15 at 12:24
@ByteCommander You didn't, but you didn't say what sort of GUI either. Do you expect us to program a GUI for you?
– muru
Nov 9 '15 at 12:26
@muru No, but I thought somebody might maybe know an already existing tool for this? I know I used something like that once, it was probably built into some XFCE function, maybe to select an icon for launchers there...
– Byte Commander
Nov 9 '15 at 12:30
Regarding the "finding out from which package" part: "dpkg-query -S /bin/bash" outputs the package name of the bash executable in the /bin directory (as an example how it works). With only "/bin" as an argument it would output all installed packages for all the files in the /bin directory.
– neoc
Nov 9 '15 at 11:56
Regarding the "finding out from which package" part: "dpkg-query -S /bin/bash" outputs the package name of the bash executable in the /bin directory (as an example how it works). With only "/bin" as an argument it would output all installed packages for all the files in the /bin directory.
– neoc
Nov 9 '15 at 11:56
2
2
find /usr/share/icons/ -iname '*.png' -or -iname '*.svg' -printf '%h %f %pn' | sed -r 's;^/usr/share/icons/([^/]*)/[^ ]* ;1 ;' | sort -u -k1,2 | column -t
covers most of it (except the thumbnail part), I'd say. I'm not sure how you expect to see the thumbnail in a list.– muru
Nov 9 '15 at 12:05
find /usr/share/icons/ -iname '*.png' -or -iname '*.svg' -printf '%h %f %pn' | sed -r 's;^/usr/share/icons/([^/]*)/[^ ]* ;1 ;' | sort -u -k1,2 | column -t
covers most of it (except the thumbnail part), I'd say. I'm not sure how you expect to see the thumbnail in a list.– muru
Nov 9 '15 at 12:05
@muru In a GUI window? I did not say it should be a command-line solution...
– Byte Commander
Nov 9 '15 at 12:24
@muru In a GUI window? I did not say it should be a command-line solution...
– Byte Commander
Nov 9 '15 at 12:24
@ByteCommander You didn't, but you didn't say what sort of GUI either. Do you expect us to program a GUI for you?
– muru
Nov 9 '15 at 12:26
@ByteCommander You didn't, but you didn't say what sort of GUI either. Do you expect us to program a GUI for you?
– muru
Nov 9 '15 at 12:26
@muru No, but I thought somebody might maybe know an already existing tool for this? I know I used something like that once, it was probably built into some XFCE function, maybe to select an icon for launchers there...
– Byte Commander
Nov 9 '15 at 12:30
@muru No, but I thought somebody might maybe know an already existing tool for this? I know I used something like that once, it was probably built into some XFCE function, maybe to select an icon for launchers there...
– Byte Commander
Nov 9 '15 at 12:30
|
show 4 more comments
2 Answers
2
active
oldest
votes
up vote
8
down vote
accepted
gtk3-icon-browser is a graphical application to list themed icons.
To this date, it is still under development and available in gtk-3-examples
package for Vivid and newer releases. Its development can be traced back to this blog post dated 2014.
Browsing elementary Xfce dark icon
Quick review
- Nicely formatted list of all unique icons: Yes 1
- Contains the icon name: Yes
- Preview thumbnail: Yes
- Location of icons: No 2
- Icon theme origin: Yes 3
1 This tool will show as icon view by default (no way to change into list view). Double-click on each icon will show all available resolutions for that icon.
2 This tool most likely looks into
/usr/share/icons
directory (without mentioning locations for each icons) and pulls additional information according to the icon naming specification.
3 This tool only shows the icons for current theme. To show icons for other theme, change the appearance from current theme to another theme.
Browsing Humanity-dark icons (with popup dialog)
Requirements
- GTK+ 3.13.4 or newer
- Install
gtk-3-examples
in 15.04 (Vivid) or newer releases
How to install
sudo apt-get install gtk-3-examples
How to run
gtk3-icon-browser
Tested working on Xubuntu 15.04, using GTK+ 3.14.13 (latest version to this answered date).
Related sources
Source code of gtk/demos at master for GNOME/gtk on GitHub.
New icon browser tool for GTK+ developers in development on Fedora Magazine
Mentioned briefly with screenshot in this answer on Ask Ubuntu.
This solution is almost perfect. It would be if it showed icons from other themes that are not provided by the current theme as well, though.
– Byte Commander
Nov 10 '15 at 9:26
@ByteCommander somebody should tell A.B. to undelete their answer, which suggested exactly this program.
– muru
Nov 17 '15 at 11:45
add a comment |
up vote
2
down vote
Well, some DEs show this when you try to change the icon of something, but it is quite easy to do it yourself. Just find all icons, make links to them in some directory and browse the directory. The icons of different resolutions will have the same name, what changes is the path. For example:
$ 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
As you can see above, the general format is /ParentDir/ThemeName/CLass/Resolution/IconName
. So, since the icon's name is the same, we can avoid duplicates easily by having each link created overwrite any existing links of the same name. However, we do want to jeep the icons from the different themes separate, so that requires a little bit more scripting:
#!/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
The script above will create the directory ~/foo
which will contain links to each of your unique icon files. The -f
option to ln
tells it to overwrite existing files with the same name and, since we're using the theme name in the link's name, there should be no duplicates. For example, given the emacs.png
icons shown above, it will create:
hicolor_emacs.png -> /usr/share/icons/hicolor/48x48/apps/emacs.png
Mint-X_emacs.png -> /usr/share/icons/Mint-X/apps/22/emacs.png
You can now, browse to ~/foo
and have a look:
Then, to get the source packages, you could run:
for i in ~/foo/*; do dpkg -S $(readlink -f "$i"); done
This will however link images of all different available resolutions, right? Can I filter duplicates in different sizes out and just show the largest one?
– Byte Commander
Nov 9 '15 at 13:58
@ByteCommander no it won't. The-f
options makesln
overwrite existing links so only one icon of the same name will be shown. However, I just realized that while dupes won't be an issue, you will miss many since allgedit.png
icons will be overwritten by the last one found. That's what I wanted to deal with resolutions, but it doesn't deal with different themes: only one theme's icon will be shown. I'm trying to fix that now.
– terdon♦
Nov 9 '15 at 17:06
@ByteCommander OK, see updated answer. This still has no issue with duplicates but will now correctly show icons from different themes.
– terdon♦
Nov 9 '15 at 17:57
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f695796%2fview-list-of-all-available-unique-icons-with-their-names-and-thumbnail%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
8
down vote
accepted
gtk3-icon-browser is a graphical application to list themed icons.
To this date, it is still under development and available in gtk-3-examples
package for Vivid and newer releases. Its development can be traced back to this blog post dated 2014.
Browsing elementary Xfce dark icon
Quick review
- Nicely formatted list of all unique icons: Yes 1
- Contains the icon name: Yes
- Preview thumbnail: Yes
- Location of icons: No 2
- Icon theme origin: Yes 3
1 This tool will show as icon view by default (no way to change into list view). Double-click on each icon will show all available resolutions for that icon.
2 This tool most likely looks into
/usr/share/icons
directory (without mentioning locations for each icons) and pulls additional information according to the icon naming specification.
3 This tool only shows the icons for current theme. To show icons for other theme, change the appearance from current theme to another theme.
Browsing Humanity-dark icons (with popup dialog)
Requirements
- GTK+ 3.13.4 or newer
- Install
gtk-3-examples
in 15.04 (Vivid) or newer releases
How to install
sudo apt-get install gtk-3-examples
How to run
gtk3-icon-browser
Tested working on Xubuntu 15.04, using GTK+ 3.14.13 (latest version to this answered date).
Related sources
Source code of gtk/demos at master for GNOME/gtk on GitHub.
New icon browser tool for GTK+ developers in development on Fedora Magazine
Mentioned briefly with screenshot in this answer on Ask Ubuntu.
This solution is almost perfect. It would be if it showed icons from other themes that are not provided by the current theme as well, though.
– Byte Commander
Nov 10 '15 at 9:26
@ByteCommander somebody should tell A.B. to undelete their answer, which suggested exactly this program.
– muru
Nov 17 '15 at 11:45
add a comment |
up vote
8
down vote
accepted
gtk3-icon-browser is a graphical application to list themed icons.
To this date, it is still under development and available in gtk-3-examples
package for Vivid and newer releases. Its development can be traced back to this blog post dated 2014.
Browsing elementary Xfce dark icon
Quick review
- Nicely formatted list of all unique icons: Yes 1
- Contains the icon name: Yes
- Preview thumbnail: Yes
- Location of icons: No 2
- Icon theme origin: Yes 3
1 This tool will show as icon view by default (no way to change into list view). Double-click on each icon will show all available resolutions for that icon.
2 This tool most likely looks into
/usr/share/icons
directory (without mentioning locations for each icons) and pulls additional information according to the icon naming specification.
3 This tool only shows the icons for current theme. To show icons for other theme, change the appearance from current theme to another theme.
Browsing Humanity-dark icons (with popup dialog)
Requirements
- GTK+ 3.13.4 or newer
- Install
gtk-3-examples
in 15.04 (Vivid) or newer releases
How to install
sudo apt-get install gtk-3-examples
How to run
gtk3-icon-browser
Tested working on Xubuntu 15.04, using GTK+ 3.14.13 (latest version to this answered date).
Related sources
Source code of gtk/demos at master for GNOME/gtk on GitHub.
New icon browser tool for GTK+ developers in development on Fedora Magazine
Mentioned briefly with screenshot in this answer on Ask Ubuntu.
This solution is almost perfect. It would be if it showed icons from other themes that are not provided by the current theme as well, though.
– Byte Commander
Nov 10 '15 at 9:26
@ByteCommander somebody should tell A.B. to undelete their answer, which suggested exactly this program.
– muru
Nov 17 '15 at 11:45
add a comment |
up vote
8
down vote
accepted
up vote
8
down vote
accepted
gtk3-icon-browser is a graphical application to list themed icons.
To this date, it is still under development and available in gtk-3-examples
package for Vivid and newer releases. Its development can be traced back to this blog post dated 2014.
Browsing elementary Xfce dark icon
Quick review
- Nicely formatted list of all unique icons: Yes 1
- Contains the icon name: Yes
- Preview thumbnail: Yes
- Location of icons: No 2
- Icon theme origin: Yes 3
1 This tool will show as icon view by default (no way to change into list view). Double-click on each icon will show all available resolutions for that icon.
2 This tool most likely looks into
/usr/share/icons
directory (without mentioning locations for each icons) and pulls additional information according to the icon naming specification.
3 This tool only shows the icons for current theme. To show icons for other theme, change the appearance from current theme to another theme.
Browsing Humanity-dark icons (with popup dialog)
Requirements
- GTK+ 3.13.4 or newer
- Install
gtk-3-examples
in 15.04 (Vivid) or newer releases
How to install
sudo apt-get install gtk-3-examples
How to run
gtk3-icon-browser
Tested working on Xubuntu 15.04, using GTK+ 3.14.13 (latest version to this answered date).
Related sources
Source code of gtk/demos at master for GNOME/gtk on GitHub.
New icon browser tool for GTK+ developers in development on Fedora Magazine
Mentioned briefly with screenshot in this answer on Ask Ubuntu.
gtk3-icon-browser is a graphical application to list themed icons.
To this date, it is still under development and available in gtk-3-examples
package for Vivid and newer releases. Its development can be traced back to this blog post dated 2014.
Browsing elementary Xfce dark icon
Quick review
- Nicely formatted list of all unique icons: Yes 1
- Contains the icon name: Yes
- Preview thumbnail: Yes
- Location of icons: No 2
- Icon theme origin: Yes 3
1 This tool will show as icon view by default (no way to change into list view). Double-click on each icon will show all available resolutions for that icon.
2 This tool most likely looks into
/usr/share/icons
directory (without mentioning locations for each icons) and pulls additional information according to the icon naming specification.
3 This tool only shows the icons for current theme. To show icons for other theme, change the appearance from current theme to another theme.
Browsing Humanity-dark icons (with popup dialog)
Requirements
- GTK+ 3.13.4 or newer
- Install
gtk-3-examples
in 15.04 (Vivid) or newer releases
How to install
sudo apt-get install gtk-3-examples
How to run
gtk3-icon-browser
Tested working on Xubuntu 15.04, using GTK+ 3.14.13 (latest version to this answered date).
Related sources
Source code of gtk/demos at master for GNOME/gtk on GitHub.
New icon browser tool for GTK+ developers in development on Fedora Magazine
Mentioned briefly with screenshot in this answer on Ask Ubuntu.
edited Apr 13 '17 at 12:23
Community♦
1
1
answered Nov 9 '15 at 19:08
clearkimura
3,74811952
3,74811952
This solution is almost perfect. It would be if it showed icons from other themes that are not provided by the current theme as well, though.
– Byte Commander
Nov 10 '15 at 9:26
@ByteCommander somebody should tell A.B. to undelete their answer, which suggested exactly this program.
– muru
Nov 17 '15 at 11:45
add a comment |
This solution is almost perfect. It would be if it showed icons from other themes that are not provided by the current theme as well, though.
– Byte Commander
Nov 10 '15 at 9:26
@ByteCommander somebody should tell A.B. to undelete their answer, which suggested exactly this program.
– muru
Nov 17 '15 at 11:45
This solution is almost perfect. It would be if it showed icons from other themes that are not provided by the current theme as well, though.
– Byte Commander
Nov 10 '15 at 9:26
This solution is almost perfect. It would be if it showed icons from other themes that are not provided by the current theme as well, though.
– Byte Commander
Nov 10 '15 at 9:26
@ByteCommander somebody should tell A.B. to undelete their answer, which suggested exactly this program.
– muru
Nov 17 '15 at 11:45
@ByteCommander somebody should tell A.B. to undelete their answer, which suggested exactly this program.
– muru
Nov 17 '15 at 11:45
add a comment |
up vote
2
down vote
Well, some DEs show this when you try to change the icon of something, but it is quite easy to do it yourself. Just find all icons, make links to them in some directory and browse the directory. The icons of different resolutions will have the same name, what changes is the path. For example:
$ 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
As you can see above, the general format is /ParentDir/ThemeName/CLass/Resolution/IconName
. So, since the icon's name is the same, we can avoid duplicates easily by having each link created overwrite any existing links of the same name. However, we do want to jeep the icons from the different themes separate, so that requires a little bit more scripting:
#!/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
The script above will create the directory ~/foo
which will contain links to each of your unique icon files. The -f
option to ln
tells it to overwrite existing files with the same name and, since we're using the theme name in the link's name, there should be no duplicates. For example, given the emacs.png
icons shown above, it will create:
hicolor_emacs.png -> /usr/share/icons/hicolor/48x48/apps/emacs.png
Mint-X_emacs.png -> /usr/share/icons/Mint-X/apps/22/emacs.png
You can now, browse to ~/foo
and have a look:
Then, to get the source packages, you could run:
for i in ~/foo/*; do dpkg -S $(readlink -f "$i"); done
This will however link images of all different available resolutions, right? Can I filter duplicates in different sizes out and just show the largest one?
– Byte Commander
Nov 9 '15 at 13:58
@ByteCommander no it won't. The-f
options makesln
overwrite existing links so only one icon of the same name will be shown. However, I just realized that while dupes won't be an issue, you will miss many since allgedit.png
icons will be overwritten by the last one found. That's what I wanted to deal with resolutions, but it doesn't deal with different themes: only one theme's icon will be shown. I'm trying to fix that now.
– terdon♦
Nov 9 '15 at 17:06
@ByteCommander OK, see updated answer. This still has no issue with duplicates but will now correctly show icons from different themes.
– terdon♦
Nov 9 '15 at 17:57
add a comment |
up vote
2
down vote
Well, some DEs show this when you try to change the icon of something, but it is quite easy to do it yourself. Just find all icons, make links to them in some directory and browse the directory. The icons of different resolutions will have the same name, what changes is the path. For example:
$ 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
As you can see above, the general format is /ParentDir/ThemeName/CLass/Resolution/IconName
. So, since the icon's name is the same, we can avoid duplicates easily by having each link created overwrite any existing links of the same name. However, we do want to jeep the icons from the different themes separate, so that requires a little bit more scripting:
#!/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
The script above will create the directory ~/foo
which will contain links to each of your unique icon files. The -f
option to ln
tells it to overwrite existing files with the same name and, since we're using the theme name in the link's name, there should be no duplicates. For example, given the emacs.png
icons shown above, it will create:
hicolor_emacs.png -> /usr/share/icons/hicolor/48x48/apps/emacs.png
Mint-X_emacs.png -> /usr/share/icons/Mint-X/apps/22/emacs.png
You can now, browse to ~/foo
and have a look:
Then, to get the source packages, you could run:
for i in ~/foo/*; do dpkg -S $(readlink -f "$i"); done
This will however link images of all different available resolutions, right? Can I filter duplicates in different sizes out and just show the largest one?
– Byte Commander
Nov 9 '15 at 13:58
@ByteCommander no it won't. The-f
options makesln
overwrite existing links so only one icon of the same name will be shown. However, I just realized that while dupes won't be an issue, you will miss many since allgedit.png
icons will be overwritten by the last one found. That's what I wanted to deal with resolutions, but it doesn't deal with different themes: only one theme's icon will be shown. I'm trying to fix that now.
– terdon♦
Nov 9 '15 at 17:06
@ByteCommander OK, see updated answer. This still has no issue with duplicates but will now correctly show icons from different themes.
– terdon♦
Nov 9 '15 at 17:57
add a comment |
up vote
2
down vote
up vote
2
down vote
Well, some DEs show this when you try to change the icon of something, but it is quite easy to do it yourself. Just find all icons, make links to them in some directory and browse the directory. The icons of different resolutions will have the same name, what changes is the path. For example:
$ 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
As you can see above, the general format is /ParentDir/ThemeName/CLass/Resolution/IconName
. So, since the icon's name is the same, we can avoid duplicates easily by having each link created overwrite any existing links of the same name. However, we do want to jeep the icons from the different themes separate, so that requires a little bit more scripting:
#!/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
The script above will create the directory ~/foo
which will contain links to each of your unique icon files. The -f
option to ln
tells it to overwrite existing files with the same name and, since we're using the theme name in the link's name, there should be no duplicates. For example, given the emacs.png
icons shown above, it will create:
hicolor_emacs.png -> /usr/share/icons/hicolor/48x48/apps/emacs.png
Mint-X_emacs.png -> /usr/share/icons/Mint-X/apps/22/emacs.png
You can now, browse to ~/foo
and have a look:
Then, to get the source packages, you could run:
for i in ~/foo/*; do dpkg -S $(readlink -f "$i"); done
Well, some DEs show this when you try to change the icon of something, but it is quite easy to do it yourself. Just find all icons, make links to them in some directory and browse the directory. The icons of different resolutions will have the same name, what changes is the path. For example:
$ 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
As you can see above, the general format is /ParentDir/ThemeName/CLass/Resolution/IconName
. So, since the icon's name is the same, we can avoid duplicates easily by having each link created overwrite any existing links of the same name. However, we do want to jeep the icons from the different themes separate, so that requires a little bit more scripting:
#!/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
The script above will create the directory ~/foo
which will contain links to each of your unique icon files. The -f
option to ln
tells it to overwrite existing files with the same name and, since we're using the theme name in the link's name, there should be no duplicates. For example, given the emacs.png
icons shown above, it will create:
hicolor_emacs.png -> /usr/share/icons/hicolor/48x48/apps/emacs.png
Mint-X_emacs.png -> /usr/share/icons/Mint-X/apps/22/emacs.png
You can now, browse to ~/foo
and have a look:
Then, to get the source packages, you could run:
for i in ~/foo/*; do dpkg -S $(readlink -f "$i"); done
edited Nov 9 '15 at 17:57
answered Nov 9 '15 at 13:42
terdon♦
63.9k12135212
63.9k12135212
This will however link images of all different available resolutions, right? Can I filter duplicates in different sizes out and just show the largest one?
– Byte Commander
Nov 9 '15 at 13:58
@ByteCommander no it won't. The-f
options makesln
overwrite existing links so only one icon of the same name will be shown. However, I just realized that while dupes won't be an issue, you will miss many since allgedit.png
icons will be overwritten by the last one found. That's what I wanted to deal with resolutions, but it doesn't deal with different themes: only one theme's icon will be shown. I'm trying to fix that now.
– terdon♦
Nov 9 '15 at 17:06
@ByteCommander OK, see updated answer. This still has no issue with duplicates but will now correctly show icons from different themes.
– terdon♦
Nov 9 '15 at 17:57
add a comment |
This will however link images of all different available resolutions, right? Can I filter duplicates in different sizes out and just show the largest one?
– Byte Commander
Nov 9 '15 at 13:58
@ByteCommander no it won't. The-f
options makesln
overwrite existing links so only one icon of the same name will be shown. However, I just realized that while dupes won't be an issue, you will miss many since allgedit.png
icons will be overwritten by the last one found. That's what I wanted to deal with resolutions, but it doesn't deal with different themes: only one theme's icon will be shown. I'm trying to fix that now.
– terdon♦
Nov 9 '15 at 17:06
@ByteCommander OK, see updated answer. This still has no issue with duplicates but will now correctly show icons from different themes.
– terdon♦
Nov 9 '15 at 17:57
This will however link images of all different available resolutions, right? Can I filter duplicates in different sizes out and just show the largest one?
– Byte Commander
Nov 9 '15 at 13:58
This will however link images of all different available resolutions, right? Can I filter duplicates in different sizes out and just show the largest one?
– Byte Commander
Nov 9 '15 at 13:58
@ByteCommander no it won't. The
-f
options makes ln
overwrite existing links so only one icon of the same name will be shown. However, I just realized that while dupes won't be an issue, you will miss many since all gedit.png
icons will be overwritten by the last one found. That's what I wanted to deal with resolutions, but it doesn't deal with different themes: only one theme's icon will be shown. I'm trying to fix that now.– terdon♦
Nov 9 '15 at 17:06
@ByteCommander no it won't. The
-f
options makes ln
overwrite existing links so only one icon of the same name will be shown. However, I just realized that while dupes won't be an issue, you will miss many since all gedit.png
icons will be overwritten by the last one found. That's what I wanted to deal with resolutions, but it doesn't deal with different themes: only one theme's icon will be shown. I'm trying to fix that now.– terdon♦
Nov 9 '15 at 17:06
@ByteCommander OK, see updated answer. This still has no issue with duplicates but will now correctly show icons from different themes.
– terdon♦
Nov 9 '15 at 17:57
@ByteCommander OK, see updated answer. This still has no issue with duplicates but will now correctly show icons from different themes.
– terdon♦
Nov 9 '15 at 17:57
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f695796%2fview-list-of-all-available-unique-icons-with-their-names-and-thumbnail%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Regarding the "finding out from which package" part: "dpkg-query -S /bin/bash" outputs the package name of the bash executable in the /bin directory (as an example how it works). With only "/bin" as an argument it would output all installed packages for all the files in the /bin directory.
– neoc
Nov 9 '15 at 11:56
2
find /usr/share/icons/ -iname '*.png' -or -iname '*.svg' -printf '%h %f %pn' | sed -r 's;^/usr/share/icons/([^/]*)/[^ ]* ;1 ;' | sort -u -k1,2 | column -t
covers most of it (except the thumbnail part), I'd say. I'm not sure how you expect to see the thumbnail in a list.– muru
Nov 9 '15 at 12:05
@muru In a GUI window? I did not say it should be a command-line solution...
– Byte Commander
Nov 9 '15 at 12:24
@ByteCommander You didn't, but you didn't say what sort of GUI either. Do you expect us to program a GUI for you?
– muru
Nov 9 '15 at 12:26
@muru No, but I thought somebody might maybe know an already existing tool for this? I know I used something like that once, it was probably built into some XFCE function, maybe to select an icon for launchers there...
– Byte Commander
Nov 9 '15 at 12:30