On 22/11/13 06:39, Scott Ferguson wrote:
> Try:-
> echo "
> #!/bin/bash
> # .fmenu
> mv ~/.fluxbox/menu{,-$(/bin/date +%Y%m%d-%R)}
> mmaker fluxbox -f
> echo"
> [submenu] (My Menu)
> [include] (~/.fluxbox/usermenu)
> [end]
> [separator]" >> ~/.fluxbox/menu" > ~/.fmenu
> chmod +x ~/.fmenu

Try #2 :/

Ignore the above - that echo won't reliably create multiple lines,
printf will.

Try this which will:-
echo "
#!/bin/bash
# .fmenu
mv ~/.fluxbox/menu{,-$(date +%Y%m%d-%R)}
mmaker fluxbox -f
printf "\t[submenu] (My Menu)\n\t[include](~/.fluxbox/usermenu)\n\t
[end]\n\t[separator]" >> ~/.fluxbox/menu"" > ~/.fmenu
chmod +x ~/.fmenu


The above will:-
create a script ~./.fmenu

Running ~/.fmenu will:-
mv your existing ~/.fluxbox/menu to ~/.fluxbox/menu-YYYYmmdd-hh:mm
create a new ~/.fluxbox/menu
append your submenu to it


If you want to remove the last [end] tag from the main menu (as
suggested by Linux Fan try this:-
echo "
#!/bin/bash
# .fmenu
mv ~/.fluxbox/menu{,-$(date +%Y%m%d-%R)}
mmaker fluxbox -f
sed -i 's/\[end]//g' ~/.fluxbox/menu;sed -i '/^\s*$/d' ~/.fluxbox/menu
printf "\t[submenu] (My Menu)\n\t[include](~/.fluxbox/usermenu)\n\t
[end]\n\t[separator]" >> ~/.fluxbox/menu"" > ~/.fmenu
chmod +x ~/.fmenu



Couldn't test that as mmaker is not a Debian package.


Kind regards


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/528e801a.4080...@gmail.com

Reply via email to