Subject: FVWM: DynamicPopUpAction help

From: "Anders K. Lyhne Th0gersen" <[email-masked]>
Date: Sun, 3 Mar 2002 19:47:32 +0100 (CET)

Hello fellow fvwm users!

I am tying to use a small perlscript "fvwm-menu-dotfiles" to make
a menu of my dotfiles. The script outputs a menu-body like this one:

+ ".bashrc" Exec "xterm -e /usr/local/bin/vim        /home/alyhne/.bashrc"
+ ".bash_profile" Exec "xterm -e /usr/local/bin/vim
/home/alyhne/.bash_profile"

I try to make this menu popup by using this piece of code:

DestroyMenu MenuDotFiles
AddToMenu MenuDotFiles
   + DynamicPopUpAction PipeRead "$HOME/.fvwm/bin/fvwm-menu-dotfiles"

this menu i Popup, but all that happens is that my mouse cursor switches
between active and inactive state.. What am i doing wrong?

I use fvwm 2.4.0, and i have no problems when using fvwm-menu-directory
with the MissingSubMenuFunction.. which by the way has made my life much
easier!

Can anybody help me?

Regards
 Anders

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 3 Mar 2002 20:35:04 +0100

> /home/alyhne/.bash_profile"

If this is all thie script prints it can't work.  You have to
define a menu first to which the menu entries are added.
Otherwise the lines may be added to a random menu or even a
fucntion.  Try to replace the first '+' with
"AddToMenu <menuname>".

This may be a bit consusing.  With the '+' command, you can add
items to the last menu or function that appeared in an AddToMenu
or AddToFunc command.  If the initial menu definition is followed
by any other such commands, fvwm forgets it has ever added to the
MenuDotFiles menu.  The DynamicPopUpAction is executed when you
open the menu, not when it is defined.  A whole lot may happen in
between.

If you still can't make it run, post the perl script and all
relevant config lines.

> with the MissingSubMenuFunction.. which by the way has made my life much

Bye

Dominik ^_^  ^_^

 --
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Sun, 3 Mar 2002 19:41:12 +0000

On 03 Mar 2002 19:47:32 +0100, Anders K. Lyhne Th0gersen wrote:
> + ".bash_profile" Exec "xterm -e /usr/local/bin/vim /home/alyhne/.bash_profile"

This is incorrect. These entries will be added to a random (last defined,
not last activated) menu, or even to a function or a decor.

You should always execute AddToMenu before plus commands.

> with the MissingSubMenuFunction.. which by the way has made my life much

Here is another approach. This is your fvwm-menu-dotfiles script:

  #!/bin/sh
  fvwm-menu-directory --all "$@" | grep -v '+ "[^.]'

I may add --only-hidden option to fvwm-menu-directory if you like.

Regards,
Mikhael.

---

From: "Anders K. Lyhne Th0gersen" <[email-masked]>
Date: Wed, 6 Mar 2002 10:42:49 +0100 (CET)

Hi!

thanx for the quick answer and sorry for the late reply...

> fucntion.  Try to replace the first '+' with

After changing this it all worked for me with the command:

DestroyMenu MenuDotFiles
AddToMenu MenuDotFiles
+ DynamicPopUpAction PipeRead "$HOME/.fvwm/bin/fvwm-menu-dotfiles.pl
MenuDotFiles"

and having the first line of output to the PipeRead command contain the
line:
        DestroyMenu recreate "MyMenu"

Thanks!

> I may add --only-hidden option to fvwm-menu-directory if you like.

I think it is nice to call scripts to do stuff like that,... a matter of
preference i guess

Anders