I'm glad you like the flyout trays. I didn't realise anybody was actually using it. One thing to note is that it uses jwm 1.8 which requires slightly different configuration tags to 2.01. I did look yesterday at porting the patch to 2.01 but it is going to take a couple more hours than I have free at the moment. I did write a script which parses your .jwmrc and creates a set of trays for all the menus items.
Code: Select all
#!/bin/sh
if [ -e /root/.jwmrc-tray2 ] ; then
echo I will not overwrite existing .jwmrc-tray2 please delete it before rerunning
exit
fi
grep -E '<Menu|<Program' '.jwmrc' | grep -Ev '<MenuStyle|<!--' > /tmp/dotjwmrc-tray
sed -i 's/<Program label=/<TrayButton popup=/' /tmp/dotjwmrc-tray
sed -i 's/>/>exec:/;s/exec:$//' /tmp/dotjwmrc-tray
sed -i 's/<\/Program>/<\/TrayButton>/' /tmp/dotjwmrc-tray
Y=2
:>/tmp/tray-bottom
echo '<Tray autohide="true" x="0" y="0" border="1" width="34" layout="vertical">' > /tmp/tray-top
while read LINE ;do
if [ "$(echo $LINE | grep '<Menu')" ];then
echo $LINE | sed 's/<Menu label=/<TrayButton popup=/;s/>/>exec:<\/TrayButton>/' >> /tmp/tray-top
[ $Y -gt 2 ] && echo '</Tray' >> /tmp/tray-bottom
echo '
<Tray autohide="true" x="0" y="'$Y'" border="1" height="30" layout="horizontal_flyout">
' >> /tmp/tray-bottom
let "Y += 32"
else
echo $LINE >> /tmp/tray-bottom
fi
done < dotjwmrc-tray
echo '</Tray' >> /tmp/tray-bottom
echo '</Tray>' >> /tmp/tray-top
echo '<JWM>' > /root/.jwmrc-tray2
cat /tmp/tray-top >> /root/.jwmrc-tray2
cat /tmp/tray-bottom >> /root/.jwmrc-tray2
echo '</JWM>' >> /root/.jwmrc-tray2
if [ ! "$(grep '<Include>/root/.jwmrc-tray2</Include>' /root/.jwmrc)" ]; then
sed -i 's/<\/JWM>/<Include>\/root\/.jwmrc-tray2<\/Include>\n<\/JWM>/' /root/.jwmrc
fi
jwm -p