Re: FVWM: FvwmButtons: popup on button down?

From: Todd Fries <tfries_at_umr.edu>
Date: Wed, 29 Nov 1995 10:24:42 -0600 (CST)

> I use a popup menu on the button bar to take my ppp link up/down.
> In order to popup the menu, I have to click and release mouse button 1
> on the appropriate button.
>
> What I really want is to have the menu popup on a "button down" event,
> not "button up", just like the root menus. Is there any way to do this?
>
> Here are the appropriate sections from .fvwm2rc (2.0.39)
>
> AddToMenu "PPP" "PPP" Title
> + "PPP-up" Exec exec /usr/local/bin/pppup > /dev/console 2>&1 &
> + "PPP-down" Exec exec /usr/local/bin/pppdown > /dev/console 2>&1 &
>
> *FvwmButtons PPP calvin2-trans.xpm Menu "PPP"

While I don't know about the exact behavior you wish, how about making the
button clickable on the button bar and run a script like this:

*FvwmButtons ....... Exec exec /usr/local/bin/pppup-or-down &

--------/usr/local/bin/pppup-or-down-------------
#!/bin/bash

if [ "`/sbin/ifconfig ppp0 2> /dev/null`" ];
   /usr/local/bin/pppdown 2>&1 > /dev/console
else
  /usr/local/bin/pppup 2>&1 > /dev/console
fi
-------------------------------------------------

Maybe this will come in useful..
-- 
Todd Fries...tfries_at_umr.edu
http://www.cs.umr.edu/~tfries
--
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Wed Nov 29 1995 - 10:36:13 GMT

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