Re: FVWM: Changing menu entries while up w/ modifiers

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Thu, 21 Aug 2003 20:48:14 +0300

On 21 Aug 2003 12:58:15 -0400, Chris Ross wrote:
>
> Hi there. I am wondering if it's possible to do
> something with fvwm (2.4.4 currently installed).
> I would like to have menu entries that perform
> different actions based on modifiers. Ideally,
> they would also change their displayed text when
> the modifier changed.
>
> So, I could have a menu of hosts to telnet to,
> but when I pressed "Shift", the labels would all
> change to "<host> (ssh)" rather than "<host>".
> And if I selected that entry while the modifier
> was held, it would ssh to it instead. They
> would of course be able to do *any* other action,
> but this is the sort of place I'd expect to
> want to do this.

This is not currently possible. But why don't you just define 2 menu
versions (they will be more readable then one bulky menu you suggest)
and fire them on different key bindings (for example one with Alt-F5
and another with Shift-F5):

  Key F5 A M Menu MySSHMenu
  Key F5 A S Menu MyTelnetMenu

With small tricks you may even define only one menu version, like this:

  Key F5 A M OpenMySSHMenu
  Key F5 A A OpenMyTelnetMenu

  AddToFunc OpenMySSHMenu
  + I DestroyFunc MyRemoteCommand
  + I AddToFunc MyRemoteCommand
  + I + I Exec xterm -g 80x40 -bg darkred -e ssh $$0
  + I Menu MyShells

  AddToFunc OpenMyTelnetMenu
  + I DestroyFunc MyRemoteCommand
  + I AddToFunc MyRemoteCommand
  + I + I Exec xterm -g 80x40 -bg darkgreen -e telnet $$0
  + I Menu MyShells

And the actual menu would look like this:

  AddToMenu MyShells
  + "%rterm.xpm%Poseidon" MyRemoteCommand poseidon
  + "%polar.xpm%Polaris" MyRemoteCommand polaris
  ...

Not tested, but this technique should work.

Regards,
Mikhael.
--
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 majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Thu Aug 21 2003 - 12:50:39 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:55 BST