torios team mailing list archive
-
torios team
-
Mailing list archive
-
Message #01507
toriOSmenu
-
To:
torios <torios@xxxxxxxxxxxxxxxxxxx>
-
From:
Israel <israel@xxxxxxxxxx>
-
Date:
Fri, 02 Jan 2015 08:46:37 -0600
-
Organization:
ToriOS
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
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
Follow ups