Window Mangers :: Ice



Ice lists extensions in the optional folder together with the installed extensions from the MyDsl folder. This can get a little confusing, knowing what is installed and what isn't. I looked at a Perl script to copy the .fluxbox menu, which unfortunately didn't work with the loaded version of Perl.

edit: I got the script to work, but it didn't help; guess it needs editing..
edit2: I see the present script was written by Mikshaw.  

#  flux2icewm
#  convert fluxbox menu to icewm menu
#  mikshaw 2006

So here's an example of what the .icewm/menu should look like for mydsl:

prog "Rebuild menu" app aterm -e /opt/icewm/bin/flux2icewm
menu "MyDSL" folder {
prog "firefox-1.5" - /opt/firefox-1.5/firefox
prog "Gnumeric" - /usr/bin/gnumeric &>/dev/null &
prog "Update_to_GTK2" - /usr/bin/start_gtk2
prog "Firewall Start" - /usr/bin/start_firewall start
prog "Firewall Stop" - /usr/bin/start_firewall stop
menu "Optional" folder {
prog "gnu-utils" -  /usr/bin/mydsl-load /cdrom/mydsl/optional/gnu-utils.unc
prog "man" - /usr/bin/mydsl-load /cdrom/mydsl/optional/man.uci
}
}

Quick & dirty (without testing, etc.)

          60 echo "MyDSL menu found at $LABEL"
          61 echo "menu \"MyDSL\" folder {" >> $OUTPOOT
          62 cat $LABEL | while read LINE; do
          63 get_parts
          64 if [ "$TYPE" = "exec" ]; then
          65 echo  "prog \"$LABEL\" - $COMMAND" >> $OUTPOOT
          66 fi
          67 OPTIONAL=0  #flag
          68 if grep \(Install "$LABEL" &>/dev/null; then
          69 if grep exec\] "LABEL" &>/dev/null; then
          70 echo "menu \"Optional\" folder {" >> $OUTPOOT
          71 cat $LABEL | while read LINE; do
          72 get_parts
          73 if [ "$TYPE" = "exec" ]; then
          74 echo "prog \"$LABEL\" - $COMMAND" >> $OUTPOOT
          75 OPTIONAL=1
          76 fi
           77fi
          77 done
          78 echo "}" >> $OUTPOOT
          79 [ $OPTIONAL == 1 ] && echo "}" >> $OUTPOOT
          80 fi
          81 fi
          82 ;;

When it was written (as far as I recall), the script should have created a nearly identical tree to the one in the fluxbox menu, including separate optional submenu. It's very possible, though, that I completely overlooked the optional menu. I can't recall if it was done at a time when I wasn't using an optional directory.

That script still needs other work as well, particularly needs to run much faster than it does.  I was planning to update it with the next icewm package, but so far have been having trouble just getting the latest version compiled.  I need to start keeping a record of what compile options are used for each app I build =o)

Quote (mikshaw @ Oct. 01 2007,09:37)
When it was written (as far as I recall), the script should have created a nearly identical tree to the one in the fluxbox menu, including separate optional submenu. It's very possible, though, that I completely overlooked the optional menu. I can't recall if it was done at a time when I wasn't using an optional directory.

Here's a tweak that seems to work. I included a MyDsl() section
after the get_parts() code.  Then:  
                           
                           include)
                           MyDsl
                           echo "}" >> $OUTPOOT
                            ;;

Edit:  I got the folders to load correctly by adding an "end)" case vs the flag I edited previously. Should be a good duplication of the flux menu now.

MyDsl() {

# Check for separate mydsl menu
if grep \(MyDSL\) "$LABEL" &>/dev/null; then
if grep exec\] "$LABEL" &>/dev/null; then
echo "MyDSL menu found at $LABEL"
fi
fi
INPOOT2=$HOME/.fluxbox/mydsl.menu
     
cat $INPOOT2 | egrep -v "#|^ *$" | while read LINE; do
get_parts
case $TYPE in
submenu)
echo " menu \"$LABEL\" folder {"  >> $OUTPOOT
;;
exec)
echo "prog \"$LABEL\" - $COMMAND"  >> $OUTPOOT
;;
end)
echo "}"  >> $OUTPOOT
;;
esac
done

}

I uploaded a copy of the tweaked flux2ice app for testing:

Edit: updated at 10.17 pm: (now duplicates flux menu for mydsl folder arrangement)

http://www.jpeters.net/apps/

I just uploaded icewm.uci extension with the working flux2ice file;
(Mikshaw, hope this is okay with you; if not I'll take it down.).  

http://www.jpeters.net/apps

Next Page...
original here.