PPM: application icons

A home for all kinds of Puppy related projects
Post Reply
Message
Author
User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

PPM: application icons

#1 Post by BarryK »

I reported on my blog that the Puppy Package Manager now optionally supports displaying icons alongside each package entry. Blog post:

http://bkhome.org/blog/?viewDetailed=02851

Screenshot attached, with Ziggy user interface.

If anyone wants to try this, you have to grab all the latest scripts out of /usr/local/petget, see the link to the online Woof repo.

You also need to install my collection of 16x16 icons, again see link in blog post.

After installing the icons, you need to update the GTK icon cache:

Code: Select all

# gtk-update-icon-cache -f /usr/share/icons/hicolor
The reason that I have started this forum thread, is that it occurred to me that there is a project here that might greatly interest someone who is into graphics, but is not a programmer, and wants to be involved in helping with Puppy development.

My PET package has 532 icons, 3788 symlinks, intended to handle just about any application that the PPM will encounter. However, it does increase the size of Puppy a lot.

if we just want the nice visual affect of seeing icons, I think that a selection of less than 100 would be adequate. Rather than trying to have a unique icon for so many apps, have many more generic icons.

For example 'audioapp.xpm' and 'audioutil.xpm' could be generic icons, with many symlinks to them, for example 'audacious.xpm' could be a symlink to audioapp.xpm'. Or, it could be png images -- I used xpm, see my post about that:
http://bkhome.org/blog/?viewDetailed=02850

However, many important apps could have their own icons, to draw attention to themselves. In particular, those that we recommend for use with Puppy. Firefox for example.

There would still be a gadzillion symlinks, but in a squashfs .sfs I think they pack in very small.

The images have to be as tiny as possible. I created 16x16, typically 600 bytes as xpm or 250 bytes as png, however, I think it might be better to go for 24x24 as when it gets too small it becomes a bit ridiculous you can't see what the icon represents.

To create really tiny icons, for example, 24x24 with 16 colours, it is good to start with svg icons. Here is a script that automates it, if you have a directory of svg icons:

Code: Select all

#!/bin/sh
#INPATH='open_icon_library-full/icons/svg/apps'
#INPATH='G-Flat-SVG/scalable/apps'
INPATH='svg-in'

for ONESVG in `find $INPATH -type f -name '*.svg' | tr '\n' ' '`
do
 ONEBASE="`basename $ONESVG .svg`"
 echo "$ONEBASE"
 rsvg-convert -w 24 -h 24 -o /tmp/temppng.png $ONESVG
 sync
 pngtopnm /tmp/temppng.png | pnmquant 16 | ppmtoxpm > /tmp/tempxpm.xpm
 sync
 sPTN='s%"  c black"%"  c None"%'
 sed -e "$sPTN" /tmp/tempxpm.xpm > xpm-24x24-alpha/${ONEBASE}.xpm
 sync
done
Why so few colours? In a very small image, there is not much advantage to having lots of colours, although I was thinking of 16x16, and for 24x24 you might want also more colours.

This is interesting stuff, but I have to go back onto all my other Puppy development work. I am throwing this one out there for someone who is interested!

The challenge will be to get the size of the icons PET package right down. It is currently 211KB.

There are collections of svg app icons, I posted a link to one of them, but there are others. You might wonder, why not just use svg icons directly? -- they are too big. Unless someone can figure out a way of making them smaller, down about 600 - 900 bytes uncompressed to compete with xpm. But then, the trade-off is they render very nice.
Attachments
ppm-icons.png
(13.94 KiB) Downloaded 1262 times
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#2 Post by BarryK »

Note, that screenshot shows that some of the icons are wrong. For example, an 'Opera' icon for the 'erlang' package.

This is because I wrote a script to automatically generate all the symlinks, and it got a lot of them very wrong. They will have to be manually corrected, once a base set of icons is created.
[url]https://bkhome.org/news/[/url]

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#3 Post by technosaurus »

perhaps one icon for each subcategory in the xdg hierarchy

here is a little xpm stripper

Code: Select all

#!/bin/sh
for x in $@
do
DATA=$(grep -v "\/\*" "$x")
echo "/* XPM */
$DATA" >"$x"
done
This has the largest collection of quality xpm icons that I know of.
http://www.cs.indiana.edu/pub/AIcons/AIcons_1.8.tar.gz
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#4 Post by BarryK »

I have re-engineered the entire mechanism for showing sub-category application icons in the PPM.

Photo:
Attachments
ppm-subcategory-icons.png
(14.32 KiB) Downloaded 14438 times
[url]https://bkhome.org/news/[/url]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#5 Post by BarryK »

Details on the re-implementation here:

http://bkhome.org/blog/?viewDetailed=02947
[url]https://bkhome.org/news/[/url]

Post Reply