torios team mailing list archive
-
torios team
-
Mailing list archive
-
Message #01508
Re: toriOSmenu
Den 2015-01-02 15:46, Israel skrev:
> 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?
>
Hi Israel,
It is fine with me as long as it works :-)
Best regards
Nio
Follow ups
References