Re: FVWM: Alternative menu positions

From: Mikhael Goikhman <migo_at_homemail.com>
Date: Thu, 25 Jul 2002 13:07:34 +0000

On 25 Jul 2002 14:49:17 +0200, Marcus Lundblad wrote:
>
>
> > You can write a shell script and use it with PipeRead:
> >
> > Mouse 1 I N PipeRead "my_iconmenu.sh WindowMenu $[i.x] $[i.y] $[i.width] $[i.height]"
> >
> > --------------------------- my_iconmenu.sh -----------------------
> > if [[ $3 -lt 500 ]]; then
> > echo Menu $1 rectangle "$4"x"$5"+"$2"+"$3" c +100
> > else
> > echo Menu $1 rectangle "$4"x"$5"+"$2"+"$3" c -100m
> > fi
> > ------------------------------------------------------------------
>
> OK, thanks!
>
> > You may wonder why the "icon" context rectangle doesn't work. I'm
> > not sure yet, but it looks like a bug.
>
> Hmm, I actually use the icon cntext, like: icon 0 -100 (I'm not sure
> exactly, as I'm visiting my parents and am forced to use Windows *shudder*
> and a 56 kbit modem (so therefore there is some spelling errors, because
> it lags so much in pine :-()
>
> And as far as I can tell the icon contex works as I expect it (maybe
> luck...)

"Context" context works directly, but not using PipeRead or SendToModule.
It is fixed by Dominik as I write this message.

You may rewrite this without additional files (start FvwmPerl somewhere):

Mouse 1 I A SendToModule FvwmPerl eval command( \
        "Menu WindowMenu rectangle $[i.width]x$[i.height]+$[i.x]x+$[i.y] c " \
        . ($[i.y] > 500? "-100m-4p": "+100+4p")

One problem with SendToModule (but not with PipeRead) is that the menu
commands are invoked without any window context. Currently it is possible
to write "WindowId $w" before "Menu" to work around it.

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 Jul 25 2002 - 08:08:32 BST

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