Re: FVWM: MissingSubmenuFunction or Piperead or bash simple problem...

2009-09-20 Thread Thomas Adam
2009/9/21 alexworld :
> a first dynamic menu list my cd drives.

RIght -- fvwm-menu-directory can help you with that.  But unless
you're going to link ivman in with this, I assume you're going to
hard-code this (i.e., the assumption is the CD drives will be mounted
already?)

> those 'cd drives' entry popup a 'media' dynamic menu
> in the 'media' dynamic menu i have a browser entry,
> make iso entry, blank cd entry, track entry, etc.. which needs to popup menu
> etc, etc..

Right -- again you can do this with MissingSubMenuFunction where you
include these "make iso" items along with this menu in addition to
anything fvwm-menu-directory can create for you, or you just hard-code
a static menu with just the options you've mentioned.

> i need to keep the name, and not only the name, i need to pass
> a variable from menu to menu.

No, you need to pass an action to each *item* in that menu -- again,
see fvwm-menu-directory.

> idealy my variable is kind of: bashFuncName_argToThisFunc
> so the MissingSubmenuFunction give this variable (the $0) to a pipe for .sh 
> wich call
> bashFuncName "argToThisFunc"

So, fvwm-menu-directory?

> the bashFuncName could now build a new menu containing whatever needed etc, 
> etc..

So fvwm-menu-directory?

> and my basic browser is a good simple exemple of that, passing path from menu 
> to menu.

So fvwm-menu-directory?

> hope it helps understand, not that easy..

I'm no expert, but I think fvwm-menu-directory might help.  And would
you believe it, I really don't have time to demonstrate it either --
but as luck would have it, it has a good man page.

Oh, you could also go for broke and just use:

Exec exec rox-filer

OR:

Exec exec nautilus

... why reinvent the wheel?  :)

-- Thomas Adam



Re: FVWM: MissingSubmenuFunction or Piperead or bash simple problem...

2009-09-20 Thread alexworld
sorry for the broken thread, never use mailing list before,
hope this time it's good, will stop use it if not.

what i want to do:

a first dynamic menu list my cd drives.
those 'cd drives' entry popup a 'media' dynamic menu
in the 'media' dynamic menu i have a browser entry,
make iso entry, blank cd entry, track entry, etc.. which needs to popup menu
etc, etc..
i need to keep the name, and not only the name, i need to pass
a variable from menu to menu.

idealy my variable is kind of: bashFuncName_argToThisFunc
so the MissingSubmenuFunction give this variable (the $0) to a pipe for .sh 
wich call
bashFuncName "argToThisFunc"
the bashFuncName could now build a new menu containing whatever needed etc, 
etc..

and my basic browser is a good simple exemple of that, passing path from menu 
to menu.

hope it helps understand, not that easy..





Re: FVWM: MissingSubmenuFunction or Piperead or bash simple problem...

2009-09-20 Thread despen
alexworld  writes:

> hi all,
>
> i have a small script, kind of menu directory once reducted to trace,
> but it can't go to deeper than first directory, and i've looking real much
> at this but don't find the solution.
> output is really, really similar to fvwm-menu-directory, at least in console.

Am I right in guessing you want to do something like fvwm-menu-directory
but you want to include sub-directories?

First tell us, do you want the sub-directories in sub-menus
OR
do you want one menu listing files AND sub-directories?



Re: FVWM: MissingSubmenuFunction or Piperead or bash simple problem...

2009-09-20 Thread Thomas Adam
2009/9/20 alexworld :
> oh, the problem is not to use fvwm directory menu, i do,
> the problem is that i want to use MissingSubmenuFunction for some other 
> things.
>
> i've recreate this little browser because i know that it should work and 
> perfectly
> represent what i need (get a variable from menu to menu finally..kind of.. :) 
> ).
>
> thanks for the reply anyway!

Brilliant.  Not only have you not replied to your original thread, and
then broken it by creating a new one (this one I am now forced to
reply to), it seems you also can't explain what it is you are wanting
to do.

Either way, until then, good luck.

-- Thomas Adam



FVWM: MissingSubmenuFunction or Piperead or bash simple problem...

2009-09-20 Thread alexworld
oh, the problem is not to use fvwm directory menu, i do,
the problem is that i want to use MissingSubmenuFunction for some other things.

i've recreate this little browser because i know that it should work and 
perfectly
represent what i need (get a variable from menu to menu finally..kind of.. :) ).

thanks for the reply anyway!





Re: FVWM: MissingSubmenuFunction or Piperead or bash simple problem...

2009-09-20 Thread Thomas Adam
2009/9/20 alexworld :
> DestroyFunc CdromExploreMenuList
> AddToFunc CdromExploreMenuList
> + I PipeRead "/root/.fvwm/test2.sh \"$0\""

This is where I would just scrap that and use:

+ I PipeRead `fvwm-menu-directory -d "$0" --exec-file ^something
--exec-title ^something-else --check-subdir --links`

... using the tools FVWM gives you is always the better option, don't you think?

-- Thomas Adam



FVWM: MissingSubmenuFunction or Piperead or bash simple problem...

2009-09-20 Thread alexworld
hi all,

i have a small script, kind of menu directory once reducted to trace,
but it can't go to deeper than first directory, and i've looking real much
at this but don't find the solution.
output is really, really similar to fvwm-menu-directory, at least in console.

#___
AddToMenu test_menu MissingSubmenuFunction CdromExploreMenuList
+ "Home" Popup "$[HOME]"
+ "/" Popup "/"

DestroyFunc CdromExploreMenuList
AddToFunc CdromExploreMenuList
+ I PipeRead "/root/.fvwm/test2.sh \"$0\""
#_


#!/bin/bash
#stop fight with spaces in names
IFS=$'\n'

file_browser="dolphin"
dir_name=`echo $1 | sed 's|.*/||'`

echo 'DestroyMenu recreate "'$1'"'
echo 'AddToMenu "'$1'"'
echo '+ DynamicPopDownAction DestroyMenu "'$1'"'
echo '+ MissingSubmenuFunction "CdromExploreMenuList"'
echo '+ "'$dir_name'" Exec exec '$file_browser' '$1
echo '+ "" Nop'

for i in `ls --group-directories-first --sort extension $1`
do
if [[ -d $1/$i ]]
then
echo '+ "'$i'" Popup "'$1'/'$i'"'
else
echo '+ "not dir '$i'"' 
fi
done
exit 0



first dir ok, deeper impossible.
looks the most basic use of missing submenu function but.. 

i apologize as i'm prety sure the answer will be king of 'stupid, you're 
stupid' :)

thanks for all!