IceForum: Window Mangers Topic: Ice started by: jpeters Posted by jpeters on Sep. 30 2007,22:11
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 ;; Posted by mikshaw on Oct. 01 2007,13: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.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) Posted by jpeters on Oct. 04 2007,09:02
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 } Posted by jpeters on Oct. 05 2007,02:52
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/ > Posted by jpeters on Oct. 06 2007,20:49
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 > Posted by mikshaw on Oct. 06 2007,22:39
Considering the license, I have no right to complain =o)One thing, though, that I thought about yesterday...If you're going to modify my script, please either remove my name from it or incude your changes in the "changelog" area. I don't want to be listed as the sole author of something that has been worked on by others, and I would like to know what has been changed if I decide to work on your version of the script in the future. I still haven't tried this version yet, but I'm definitely interested in seeing how you've improved it. Posted by jpeters on Oct. 07 2007,00:17
I put a comment before the MyDsl() section taking responsibility for the tweak. The only other change is in the case include) section, where I replaced the original code with include) MyDsl echo "}" >> $OUTPOOT ;; It's your call regarding posting to MyDsl since it's your extension. I'm guessing you'll be doing your own update anyway. Posted by mikshaw on Oct. 07 2007,02:25
Posted by jpeters on Oct. 07 2007,07:13
Maybe submitting it as a fixed replacement is the way to go, since the intention is to reproduce the fluxbox menu. < http://www.jpeters.net/apps/ > |