#!/bin/ash
#20220214 insert more menus into the tray.

export TEXTDOMAIN=ui-jwm
export OUTPUT_CHARSET=UTF-8

if [ ! -f /root/.jwm/tray-menus ];then
 mDRIVES="$(gettext 'Drives')"
 mCONTAINERS="$(gettext 'Containers')"
echo "		<TrayButton popup=\"${mDRIVES}\" icon=\"drives48.png\">root:2</TrayButton>
		<TrayButton popup=\"${mCONTAINERS}\" icon=\"container48.png\">root:4</TrayButton>" > /root/.jwm/tray-menus
fi

#insert file between two patterns in /root/.jwmrc-tray...
sed -i -e '/STARTMENU/,/ENDMENU/{/STARTMENU/!{/ENDMENU/!d}}' -e '/STARTMENU/r /root/.jwm/tray-menus' /root/.jwmrc-tray

#sync
###end###
