Hi all,
I revisited the icon menu generator.
I did a few things to improve the generation. The main thing I have
done is to check what the prevailing icon extension is... it isn't
quite perfect yet, but this way I don't hardcode the '.svg' into the
file anymore...
Here is what I do:
ICONDIRS=($(cat $HOME/.jwmrc | grep "<IconPath" | sed 's/<IconPath>//' |
sed 's|</IconPath>||'| sed 's|/usr/share/pixmaps ||'| sed
's|/usr/share/icons ||'))
#EXT=".svg"
for i in ${ICONDIRS[$i]}
do
PNG=$(ls ${ICONDIRS[1]}*.png)
if [ ! -z "${PNG}" ]
then
EXT=".png"
fi
SVG=$(ls ${ICONDIRS[1]}*.svg)
if [ ! -z "${SVG}" ]
then
EXT=".svg"
fi
done
I remove the pixmaps directory and the base icons directory if they are
included... because neither of those are 'themes'
then I make an array from the remaining IconPath entries and use ls to
determine if there is svg or png inside.
Any suggestions for improvements?
--
Regards
-Israel
ToriOS Team
--
Mailing list: https://launchpad.net/~torios
Post to : [email protected]
Unsubscribe : https://launchpad.net/~torios
More help : https://help.launchpad.net/ListHelp